Skip to content

Commit

Permalink
Remove im-online completely (#466)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
s0me0ne-unkn0wn authored Oct 3, 2024
1 parent 55bd514 commit b483d37
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 24 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
4 changes: 0 additions & 4 deletions relay/kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 0 additions & 6 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2144,12 +2144,6 @@ sp_api::impl_runtime_apis! {

impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
fn offchain_worker(header: &<Block as BlockT>::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)
}
}
Expand Down
4 changes: 0 additions & 4 deletions relay/polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 1 addition & 7 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -2429,12 +2429,6 @@ sp_api::impl_runtime_apis! {

impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
fn offchain_worker(header: &<Block as BlockT>::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)
}
}
Expand Down

0 comments on commit b483d37

Please sign in to comment.