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 17 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 @@ -26,6 +26,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))

## [1.1.1] 25.01.2024

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
7 changes: 0 additions & 7 deletions integration-tests/emulated/chains/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use integration_tests_common::{
// Substrate
use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId;
use grandpa_primitives::AuthorityId as GrandpaId;
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use sp_consensus_babe::AuthorityId as BabeId;
use sp_core::{sr25519, storage::Storage};
Expand Down Expand Up @@ -61,7 +60,6 @@ pub mod polkadot {
fn session_keys(
babe: BabeId,
grandpa: GrandpaId,
im_online: ImOnlineId,
para_validator: ValidatorId,
para_assignment: AssignmentId,
authority_discovery: AuthorityDiscoveryId,
Expand All @@ -70,7 +68,6 @@ pub mod polkadot {
polkadot_runtime::SessionKeys {
babe,
grandpa,
im_online,
para_validator,
para_assignment,
authority_discovery,
Expand Down Expand Up @@ -102,7 +99,6 @@ pub mod polkadot {
x.5.clone(),
x.6.clone(),
x.7.clone(),
x.8.clone(),
),
)
})
Expand Down Expand Up @@ -212,7 +208,6 @@ pub mod kusama {
fn session_keys(
babe: BabeId,
grandpa: GrandpaId,
im_online: ImOnlineId,
para_validator: ValidatorId,
para_assignment: AssignmentId,
authority_discovery: AuthorityDiscoveryId,
Expand All @@ -221,7 +216,6 @@ pub mod kusama {
kusama_runtime::SessionKeys {
babe,
grandpa,
im_online,
para_validator,
para_assignment,
authority_discovery,
Expand Down Expand Up @@ -252,7 +246,6 @@ pub mod kusama {
x.5.clone(),
x.6.clone(),
x.7.clone(),
x.8.clone(),
),
)
})
Expand Down
3 changes: 0 additions & 3 deletions integration-tests/emulated/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ pub mod xcm_helpers;
// Substrate
use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId;
use grandpa_primitives::AuthorityId as GrandpaId;
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use sp_consensus_babe::AuthorityId as BabeId;
use sp_core::{sr25519, Pair, Public};
Expand Down Expand Up @@ -127,7 +126,6 @@ pub mod validators {
AccountId,
BabeId,
GrandpaId,
ImOnlineId,
ValidatorId,
AssignmentId,
AuthorityDiscoveryId,
Expand All @@ -139,7 +137,6 @@ pub 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 Down
Loading
Loading