diff --git a/Cargo.lock b/Cargo.lock index af9dabd..c0710a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5851,9 +5851,9 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "25.0.0" +version = "25.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed335abd32d357dd9750dae7fb87b01dfd8fe69faadcb94a6e0e0a43057d923" +checksum = "d6829cbaae2a8d23d4a7db159192297728df40d51f4555bd8a6ea4374aad62f5" dependencies = [ "frame-benchmarking", "frame-election-provider-support", diff --git a/relay/paseo/Cargo.toml b/relay/paseo/Cargo.toml index 260cd1e..cf628d3 100644 --- a/relay/paseo/Cargo.toml +++ b/relay/paseo/Cargo.toml @@ -78,7 +78,7 @@ pallet-scheduler = { default-features = false , version = "26.0.0" } pallet-session = { default-features = false , version = "25.0.0" } frame-support = { default-features = false , version = "25.0.0" } pallet-sudo = { default-features = false , version = "25.0.0" } -pallet-staking = { default-features = false , version = "25.0.0" } +pallet-staking = { default-features = false , version = "25.0.1" } pallet-staking-reward-fn = { default-features = false, version = "16.0.0" } pallet-staking-reward-curve = { version = "10.0.0" } pallet-staking-runtime-api = { default-features = false , version = "11.0.0" } diff --git a/relay/paseo/src/lib.rs b/relay/paseo/src/lib.rs index 065fda1..20d8461 100644 --- a/relay/paseo/src/lib.rs +++ b/relay/paseo/src/lib.rs @@ -430,52 +430,15 @@ impl pallet_authorship::Config for Runtime { } impl_opaque_keys! { - pub struct OldSessionKeys { - pub grandpa: Grandpa, - pub babe: Babe, - pub im_online: ImOnline, - pub para_validator: Initializer, - pub para_assignment: ParaSessionInfo, - pub authority_discovery: AuthorityDiscovery, - } -} - -impl_opaque_keys! { - pub struct SessionKeys { - pub grandpa: Grandpa, - pub babe: Babe, - pub im_online: ImOnline, - pub para_validator: Initializer, - pub para_assignment: ParaSessionInfo, - pub authority_discovery: AuthorityDiscovery, - pub beefy: Beefy, - } -} - -// remove this when removing `OldSessionKeys` -fn transform_session_keys(v: AccountId, old: OldSessionKeys) -> SessionKeys { - SessionKeys { - grandpa: old.grandpa, - babe: old.babe, - im_online: old.im_online, - para_validator: old.para_validator, - para_assignment: old.para_assignment, - authority_discovery: old.authority_discovery, - beefy: { - // From Session::upgrade_keys(): - // - // Care should be taken that the raw versions of the - // added keys are unique for every `ValidatorId, KeyTypeId` combination. - // This is an invariant that the session pallet typically maintains internally. - // - // So, produce a dummy value that's unique for the `ValidatorId, KeyTypeId` combination. - let mut id: BeefyId = sp_application_crypto::ecdsa::Public::from_raw([0u8; 33]).into(); - let id_raw: &mut [u8] = id.as_mut(); - id_raw[1..33].copy_from_slice(v.as_ref()); - id_raw[0..4].copy_from_slice(b"beef"); - id - }, - } + pub struct SessionKeys { + pub grandpa: Grandpa, + pub babe: Babe, + pub im_online: ImOnline, + pub para_validator: Initializer, + pub para_assignment: ParaSessionInfo, + pub authority_discovery: AuthorityDiscovery, + pub beefy: Beefy, + } } impl pallet_session::Config for Runtime { @@ -1708,25 +1671,8 @@ pub type Migrations = migrations::Unreleased; /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { - use super::*; - - /// Upgrade Session keys to include BEEFY key. - /// When this is removed, should also remove `OldSessionKeys`. - pub struct UpgradeSessionKeys; - impl frame_support::traits::OnRuntimeUpgrade for UpgradeSessionKeys { - fn on_runtime_upgrade() -> Weight { - Session::upgrade_keys::(transform_session_keys); - Perbill::from_percent(50) * BlockWeights::get().max_block - } - } - - /// Unreleased migrations. Add new ones here: - pub type Unreleased = ( - // Upgrade SessionKeys to include BEEFY key - UpgradeSessionKeys, - pallet_nomination_pools::migration::versioned_migrations::V5toV6, - pallet_nomination_pools::migration::versioned_migrations::V6ToV7, - ); + /// Unreleased migrations. Add new ones here: + pub type Unreleased = (); } /// Unchecked extrinsic type as expected by this runtime.