From b483d370034fbdc6a2c5978e7ba5ea55fcb2defb Mon Sep 17 00:00:00 2001 From: s0me0ne-unkn0wn <48632512+s0me0ne-unkn0wn@users.noreply.github.com> Date: Thu, 3 Oct 2024 17:55:34 +0200 Subject: [PATCH] Remove `im-online` completely (#466) After 1.3.0 was enacted and offchain migration clearing `im-online` offchain storage was run, it is safe to remove any mention of the `im-online`. - [x] Does not require a CHANGELOG entry CC @ordian --- Cargo.lock | 2 -- Cargo.toml | 1 - relay/kusama/Cargo.toml | 4 ---- relay/kusama/src/lib.rs | 6 ------ relay/polkadot/Cargo.toml | 4 ---- relay/polkadot/src/lib.rs | 8 +------- 6 files changed, 1 insertion(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 30daa2294e..4f4d467771 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10092,7 +10092,6 @@ dependencies = [ "pallet-election-provider-support-benchmarking", "pallet-fast-unstake", "pallet-grandpa", - "pallet-im-online", "pallet-indices", "pallet-message-queue", "pallet-mmr", @@ -14417,7 +14416,6 @@ dependencies = [ "pallet-election-provider-support-benchmarking", "pallet-fast-unstake", "pallet-grandpa", - "pallet-im-online", "pallet-indices", "pallet-message-queue", "pallet-mmr", diff --git a/Cargo.toml b/Cargo.toml index 3c70df0ac5..13199f41e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -124,7 +124,6 @@ pallet-fast-unstake = { version = "35.0.0", default-features = false } pallet-glutton = { version = "22.0.0", default-features = false } pallet-grandpa = { version = "36.0.0", default-features = false } pallet-identity = { version = "36.0.0", default-features = false } -pallet-im-online = { version = "35.0.0", default-features = false } pallet-indices = { version = "36.0.0", default-features = false } pallet-insecure-randomness-collective-flip = { version = "24.0.0", default-features = false } pallet-membership = { version = "36.0.0", default-features = false } diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index bb35b40543..83a5bf194b 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -57,7 +57,6 @@ frame-executive = { workspace = true } frame-metadata-hash-extension = { workspace = true } pallet-grandpa = { workspace = true } pallet-nis = { workspace = true } -pallet-im-online = { workspace = true } pallet-indices = { workspace = true } pallet-message-queue = { workspace = true } pallet-mmr = { workspace = true } @@ -156,7 +155,6 @@ std = [ "pallet-election-provider-support-benchmarking?/std", "pallet-fast-unstake/std", "pallet-grandpa/std", - "pallet-im-online/std", "pallet-indices/std", "pallet-message-queue/std", "pallet-mmr/std", @@ -236,7 +234,6 @@ runtime-benchmarks = [ "pallet-election-provider-support-benchmarking/runtime-benchmarks", "pallet-fast-unstake/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", - "pallet-im-online/runtime-benchmarks", "pallet-indices/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", "pallet-mmr/runtime-benchmarks", @@ -293,7 +290,6 @@ try-runtime = [ "pallet-election-provider-multi-phase/try-runtime", "pallet-fast-unstake/try-runtime", "pallet-grandpa/try-runtime", - "pallet-im-online/try-runtime", "pallet-indices/try-runtime", "pallet-message-queue/try-runtime", "pallet-mmr/try-runtime", diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 586ccfd7d7..13d0bfbbda 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -2144,12 +2144,6 @@ sp_api::impl_runtime_apis! { impl sp_offchain::OffchainWorkerApi for Runtime { fn offchain_worker(header: &::Header) { - use sp_runtime::{traits::Header, DigestItem}; - - if header.digest().logs().iter().any(|di| di == &DigestItem::RuntimeEnvironmentUpdated) { - pallet_im_online::migration::clear_offchain_storage(Session::validators().len() as u32); - } - Executive::offchain_worker(header) } } diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 4cad587ce0..89d0c4879e 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -54,7 +54,6 @@ pallet-fast-unstake = { workspace = true } frame-executive = { workspace = true } frame-metadata-hash-extension = { workspace = true } pallet-grandpa = { workspace = true } -pallet-im-online = { workspace = true } pallet-indices = { workspace = true } pallet-message-queue = { workspace = true } pallet-mmr = { workspace = true } @@ -159,7 +158,6 @@ std = [ "pallet-election-provider-support-benchmarking?/std", "pallet-fast-unstake/std", "pallet-grandpa/std", - "pallet-im-online/std", "pallet-indices/std", "pallet-message-queue/std", "pallet-mmr/std", @@ -240,7 +238,6 @@ runtime-benchmarks = [ "pallet-election-provider-support-benchmarking/runtime-benchmarks", "pallet-fast-unstake/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", - "pallet-im-online/runtime-benchmarks", "pallet-indices/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", "pallet-mmr/runtime-benchmarks", @@ -296,7 +293,6 @@ try-runtime = [ "pallet-election-provider-multi-phase/try-runtime", "pallet-fast-unstake/try-runtime", "pallet-grandpa/try-runtime", - "pallet-im-online/try-runtime", "pallet-indices/try-runtime", "pallet-message-queue/try-runtime", "pallet-mmr/try-runtime", diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 2cbd6adf81..7431585f0d 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1630,7 +1630,7 @@ construct_runtime! { // Consensus support. // Authorship must be before session in order to note author in the correct session and era - // for im-online and staking. + // for staking. Authorship: pallet_authorship = 6, Staking: pallet_staking = 7, Offences: pallet_offences = 8, @@ -2429,12 +2429,6 @@ sp_api::impl_runtime_apis! { impl sp_offchain::OffchainWorkerApi for Runtime { fn offchain_worker(header: &::Header) { - use sp_runtime::{traits::Header, DigestItem}; - - if header.digest().logs().iter().any(|di| di == &DigestItem::RuntimeEnvironmentUpdated) { - pallet_im_online::migration::clear_offchain_storage(Session::validators().len() as u32); - } - Executive::offchain_worker(header) } }