Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove im-online pallet from Kusama and Polkadot runtimes #178

Merged
merged 26 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
46bcf87
Remove `ImOnline` pallet
s0me0ne-unkn0wn Dec 10, 2023
9fd6c44
Merge remote-tracking branch 'upstream/main' into remove-im-online
s0me0ne-unkn0wn Dec 27, 2023
0eb7a8a
Merge remote-tracking branch 'upstream/main' into remove-im-online
s0me0ne-unkn0wn Jan 19, 2024
99af35f
Merge remote-tracking branch 'upstream/main' into remove-im-online
s0me0ne-unkn0wn Feb 9, 2024
158db36
Fix spec version
s0me0ne-unkn0wn Feb 9, 2024
3c0f6fb
Merge remote-tracking branch 'upstream/main' into remove-im-online
s0me0ne-unkn0wn Feb 15, 2024
d31e148
Remove weights
s0me0ne-unkn0wn Feb 15, 2024
df24e6b
Remove from chainspec generator and from tests
s0me0ne-unkn0wn Feb 15, 2024
b4aad8c
Bump Polkadot pre-upgrade spec version
s0me0ne-unkn0wn Feb 15, 2024
a031594
Add changelog entry
s0me0ne-unkn0wn Feb 15, 2024
0e0156d
Revert erroneous changes in BEEFY keys handling
s0me0ne-unkn0wn Feb 15, 2024
59f2aca
`cargo fmt`
s0me0ne-unkn0wn Feb 15, 2024
24a35ec
Typo
s0me0ne-unkn0wn Feb 16, 2024
6f2ecf7
Fix try-runtime checks
s0me0ne-unkn0wn Feb 21, 2024
f63012d
Merge remote-tracking branch 'upstream/main' into remove-im-online;
s0me0ne-unkn0wn Feb 22, 2024
02908d7
Minor fix
s0me0ne-unkn0wn Feb 22, 2024
fd74ac9
Merge branch 'main' into remove-im-online
s0me0ne-unkn0wn Feb 26, 2024
7d8655d
Remove redundant migrations
s0me0ne-unkn0wn Feb 27, 2024
a70ac67
Merge remote-tracking branch 'upstream/main' into remove-im-online
s0me0ne-unkn0wn Feb 27, 2024
6a850fe
Merge branch 'remove-im-online' of github.com:s0me0ne-unkn0wn/runtime…
s0me0ne-unkn0wn Feb 27, 2024
309dfc1
Merge remote-tracking branch 'upstream/main' into remove-im-online
s0me0ne-unkn0wn Feb 28, 2024
d030e5b
Remove stale empty files
s0me0ne-unkn0wn Feb 28, 2024
f77d536
Remove redundant dependencies
s0me0ne-unkn0wn Feb 29, 2024
809136f
Bump spec version
s0me0ne-unkn0wn Feb 29, 2024
4fbabb7
Bump runtime versions to correct ones
s0me0ne-unkn0wn Feb 29, 2024
c6c17fc
Merge branch 'main' into remove-im-online
bkchr Feb 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Removed

- Removed the `SafeCallFilter` from the Relay Chain XCM config ([polkadot-fellows/runtimes#172](https://github.com/polkadot-fellows/runtimes/pull/172)).
- Removed the `ImOnline` pallet ([polkadot-fellows/runtimes#178](https://github.com/polkadot-fellows/runtimes/pull/178))

### Based on Polkadot-SDK

Expand Down
3 changes: 0 additions & 3 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 chain-spec-generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ sp-authority-discovery = "26.0.0"
sp-core = "28.0.0"
pallet-staking = "28.0.0"
sc-consensus-grandpa = "0.19.0"
pallet-im-online = "27.0.0"
sp-runtime = "31.0.1"
sp-consensus-beefy = "13.0.0"
xcm = { package = "staging-xcm", version = "7.0.0" }
Expand Down
24 changes: 2 additions & 22 deletions chain-spec-generator/src/relay_chain_specs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

use kusama_runtime_constants::currency::UNITS as KSM;
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use pallet_staking::Forcing;
use polkadot_primitives::{AccountId, AccountPublic, AssignmentId, ValidatorId};
use polkadot_runtime_constants::currency::UNITS as DOT;
Expand Down Expand Up @@ -84,7 +83,6 @@ fn default_parachains_host_configuration() -> HostConfiguration<polkadot_primiti
fn polkadot_session_keys(
babe: BabeId,
grandpa: GrandpaId,
im_online: ImOnlineId,
para_validator: ValidatorId,
para_assignment: AssignmentId,
authority_discovery: AuthorityDiscoveryId,
Expand All @@ -93,7 +91,6 @@ fn polkadot_session_keys(
polkadot_runtime::SessionKeys {
babe,
grandpa,
im_online,
para_validator,
para_assignment,
authority_discovery,
Expand All @@ -104,7 +101,6 @@ fn polkadot_session_keys(
fn kusama_session_keys(
babe: BabeId,
grandpa: GrandpaId,
im_online: ImOnlineId,
para_validator: ValidatorId,
para_assignment: AssignmentId,
authority_discovery: AuthorityDiscoveryId,
Expand All @@ -113,7 +109,6 @@ fn kusama_session_keys(
kusama_runtime::SessionKeys {
babe,
grandpa,
im_online,
para_validator,
para_assignment,
authority_discovery,
Expand Down Expand Up @@ -144,35 +139,24 @@ pub fn get_authority_keys_from_seed(
AccountId,
BabeId,
GrandpaId,
ImOnlineId,
ValidatorId,
AssignmentId,
AuthorityDiscoveryId,
BeefyId,
) {
let keys = get_authority_keys_from_seed_no_beefy(seed);
(keys.0, keys.1, keys.2, keys.3, keys.4, keys.5, keys.6, keys.7, get_from_seed::<BeefyId>(seed))
(keys.0, keys.1, keys.2, keys.3, keys.4, keys.5, keys.6, get_from_seed::<BeefyId>(seed))
}

/// Helper function to generate stash, controller and session key from seed
pub fn get_authority_keys_from_seed_no_beefy(
seed: &str,
) -> (
AccountId,
AccountId,
BabeId,
GrandpaId,
ImOnlineId,
ValidatorId,
AssignmentId,
AuthorityDiscoveryId,
) {
) -> (AccountId, AccountId, BabeId, GrandpaId, ValidatorId, AssignmentId, AuthorityDiscoveryId) {
(
get_account_id_from_seed::<sr25519::Public>(&format!("{}//stash", seed)),
get_account_id_from_seed::<sr25519::Public>(seed),
get_from_seed::<BabeId>(seed),
get_from_seed::<GrandpaId>(seed),
get_from_seed::<ImOnlineId>(seed),
get_from_seed::<ValidatorId>(seed),
get_from_seed::<AssignmentId>(seed),
get_from_seed::<AuthorityDiscoveryId>(seed),
Expand Down Expand Up @@ -202,7 +186,6 @@ pub fn polkadot_testnet_genesis(
AccountId,
BabeId,
GrandpaId,
ImOnlineId,
ValidatorId,
AssignmentId,
AuthorityDiscoveryId,
Expand Down Expand Up @@ -234,7 +217,6 @@ pub fn polkadot_testnet_genesis(
x.5.clone(),
x.6.clone(),
x.7.clone(),
x.8.clone(),
),
)
})
Expand Down Expand Up @@ -266,7 +248,6 @@ pub fn kusama_testnet_genesis(
AccountId,
BabeId,
GrandpaId,
ImOnlineId,
ValidatorId,
AssignmentId,
AuthorityDiscoveryId,
Expand Down Expand Up @@ -298,7 +279,6 @@ pub fn kusama_testnet_genesis(
x.5.clone(),
x.6.clone(),
x.7.clone(),
x.8.clone(),
),
)
})
Expand Down
1 change: 0 additions & 1 deletion integration-tests/emulated/chains/relays/kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ authority-discovery-primitives = { package = "sp-authority-discovery", version =
babe-primitives = { package = "sp-consensus-babe", version = "0.32.0" }
beefy-primitives = { package = "sp-consensus-beefy", version = "13.0.0" }
grandpa = { package = "sc-consensus-grandpa", version = "0.19.0" }
pallet-im-online = { version = "27.0.0" }

# Polkadot
polkadot-primitives = { version = "7.0.0" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use babe_primitives::AuthorityId as BabeId;
use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId;
use grandpa::AuthorityId as GrandpaId;
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
s0me0ne-unkn0wn marked this conversation as resolved.
Show resolved Hide resolved
use sp_core::{sr25519, storage::Storage};

// Polkadot
Expand All @@ -43,7 +42,6 @@ mod validators {
AccountId,
BabeId,
GrandpaId,
ImOnlineId,
ValidatorId,
AssignmentId,
AuthorityDiscoveryId,
Expand All @@ -55,7 +53,6 @@ mod validators {
get_account_id_from_seed::<sr25519::Public>(seed),
get_from_seed::<BabeId>(seed),
get_from_seed::<GrandpaId>(seed),
get_from_seed::<ImOnlineId>(seed),
get_from_seed::<ValidatorId>(seed),
get_from_seed::<AssignmentId>(seed),
get_from_seed::<AuthorityDiscoveryId>(seed),
Expand All @@ -67,7 +64,6 @@ mod validators {
fn session_keys(
babe: BabeId,
grandpa: GrandpaId,
im_online: ImOnlineId,
para_validator: ValidatorId,
para_assignment: AssignmentId,
authority_discovery: AuthorityDiscoveryId,
Expand All @@ -76,7 +72,6 @@ fn session_keys(
kusama_runtime::SessionKeys {
grandpa,
babe,
im_online,
para_validator,
para_assignment,
authority_discovery,
Expand Down Expand Up @@ -104,7 +99,6 @@ pub fn genesis() -> Storage {
x.5.clone(),
x.6.clone(),
x.7.clone(),
x.8.clone(),
),
)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ authority-discovery-primitives = { package = "sp-authority-discovery", version =
babe-primitives = { package = "sp-consensus-babe", version = "0.32.0" }
beefy-primitives = { package = "sp-consensus-beefy", version = "13.0.0" }
grandpa = { package = "sc-consensus-grandpa", version = "0.19.0" }
pallet-im-online = { version = "27.0.0" }
pallet-staking = { version = "28.0.0" }

# Polkadot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use babe_primitives::AuthorityId as BabeId;
use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId;
use grandpa::AuthorityId as GrandpaId;
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
s0me0ne-unkn0wn marked this conversation as resolved.
Show resolved Hide resolved
use sp_core::{sr25519, storage::Storage};
use sp_runtime::Perbill;

Expand All @@ -45,7 +44,6 @@ mod validators {
AccountId,
BabeId,
GrandpaId,
ImOnlineId,
ValidatorId,
AssignmentId,
AuthorityDiscoveryId,
Expand All @@ -57,7 +55,6 @@ mod validators {
get_account_id_from_seed::<sr25519::Public>(seed),
get_from_seed::<BabeId>(seed),
get_from_seed::<GrandpaId>(seed),
get_from_seed::<ImOnlineId>(seed),
get_from_seed::<ValidatorId>(seed),
get_from_seed::<AssignmentId>(seed),
get_from_seed::<AuthorityDiscoveryId>(seed),
Expand All @@ -69,7 +66,6 @@ mod validators {
fn session_keys(
babe: BabeId,
grandpa: GrandpaId,
im_online: ImOnlineId,
para_validator: ValidatorId,
para_assignment: AssignmentId,
authority_discovery: AuthorityDiscoveryId,
Expand All @@ -78,7 +74,6 @@ fn session_keys(
polkadot_runtime::SessionKeys {
babe,
grandpa,
im_online,
para_validator,
para_assignment,
authority_discovery,
Expand Down Expand Up @@ -106,7 +101,6 @@ pub fn genesis() -> Storage {
x.5.clone(),
x.6.clone(),
x.7.clone(),
x.8.clone(),
),
)
})
Expand Down
Loading
Loading