From f4bd723df05eccbb63509b4294066fc4dd4206ef Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Mon, 21 Jul 2025 14:19:16 +0200 Subject: [PATCH 01/14] backup Signed-off-by: Oliver Tale-Yazdi --- .config/zepter.yaml | 2 +- Cargo.lock | 2 + pallets/ah-migrator/Cargo.toml | 3 + pallets/ah-migrator/src/lib.rs | 2 +- pallets/ah-migrator/src/staking/staking.rs | 8 +- pallets/rc-migrator/Cargo.toml | 10 + pallets/rc-migrator/src/lib.rs | 3 +- pallets/rc-migrator/src/staking/message.rs | 574 +++++++----------- pallets/rc-migrator/src/staking/staking.rs | 53 +- pallets/rc-migrator/src/types.rs | 16 +- relay/polkadot/Cargo.toml | 4 + .../asset-hubs/asset-hub-polkadot/Cargo.toml | 5 + 12 files changed, 277 insertions(+), 405 deletions(-) diff --git a/.config/zepter.yaml b/.config/zepter.yaml index 44a2b559fa..dde8226f98 100644 --- a/.config/zepter.yaml +++ b/.config/zepter.yaml @@ -12,7 +12,7 @@ workflows: # Check that `A` activates the features of `B`. 'propagate-feature', # These are the features to check: - '--features=try-runtime,runtime-benchmarks,std,ahm-kusama,ahm-staking-migration,stable2503', + '--features=try-runtime,runtime-benchmarks,std,ahm-kusama,ahm-staking-migration,stable2503,ahm-staking-migration', # Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually. '--left-side-feature-missing=ignore', # Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on. diff --git a/Cargo.lock b/Cargo.lock index 4f21d4238f..0d78befa2a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8917,6 +8917,8 @@ dependencies = [ "pallet-scheduler", "pallet-session", "pallet-staking", + "pallet-staking-async", + "pallet-staking-async-ah-client", "pallet-state-trie-migration", "pallet-treasury", "pallet-vesting", diff --git a/pallets/ah-migrator/Cargo.toml b/pallets/ah-migrator/Cargo.toml index f7917a38dc..ee8ceec292 100644 --- a/pallets/ah-migrator/Cargo.toml +++ b/pallets/ah-migrator/Cargo.toml @@ -64,6 +64,9 @@ pallet-ah-ops = { workspace = true } [features] default = ["std"] +ahm-staking-migration = [ + "pallet-rc-migrator/ahm-staking-migration" +] std = [ "assets-common/std", "assets-common/std", diff --git a/pallets/ah-migrator/src/lib.rs b/pallets/ah-migrator/src/lib.rs index 1f8cafaf78..06c7b68605 100644 --- a/pallets/ah-migrator/src/lib.rs +++ b/pallets/ah-migrator/src/lib.rs @@ -862,7 +862,7 @@ pub mod pallet { #[pallet::weight({1})] // TODO: @ggwpez weight pub fn receive_staking_messages( origin: OriginFor, - messages: Vec, + messages: Vec, ) -> DispatchResult { ensure_root(origin)?; diff --git a/pallets/ah-migrator/src/staking/staking.rs b/pallets/ah-migrator/src/staking/staking.rs index 18a1f18ead..3a23ff08ec 100644 --- a/pallets/ah-migrator/src/staking/staking.rs +++ b/pallets/ah-migrator/src/staking/staking.rs @@ -17,7 +17,7 @@ //! Pallet staking migration. use crate::*; -use frame_support::traits::DefensiveTruncateInto; +use crate::types::DefensiveTruncateInto; use sp_runtime::Perbill; impl Pallet { @@ -25,7 +25,7 @@ impl Pallet { pub fn staking_migration_finish_hook() {} - pub fn do_receive_staking_messages(messages: Vec) -> Result<(), Error> { + pub fn do_receive_staking_messages(messages: Vec) -> Result<(), Error> { let (mut good, mut bad) = (0, 0); log::info!(target: LOG_TARGET, "Integrating {} StakingMessages", messages.len()); Self::deposit_event(Event::BatchReceived { @@ -34,7 +34,7 @@ impl Pallet { }); for message in messages { - let translated = T::RcStakingMessage::intoAh(message); + let translated = T::PortableStakingMessage::intoAh(message); match Self::do_receive_staking_message(translated) { Ok(_) => good += 1, Err(_) => bad += 1, @@ -53,7 +53,7 @@ impl Pallet { fn do_receive_staking_message( message: AhEquivalentStakingMessageOf, ) -> Result<(), Error> { - use RcStakingMessage::*; + use PortableStakingMessage::*; match message { Values(values) => { diff --git a/pallets/rc-migrator/Cargo.toml b/pallets/rc-migrator/Cargo.toml index 1b5a64af54..894746c035 100644 --- a/pallets/rc-migrator/Cargo.toml +++ b/pallets/rc-migrator/Cargo.toml @@ -32,11 +32,13 @@ pallet-proxy = { workspace = true } pallet-indices = { workspace = true } pallet-message-queue = { workspace = true } pallet-multisig = { workspace = true } +pallet-staking-async = { workspace = true } pallet-preimage = { workspace = true } pallet-treasury = { workspace = true } pallet-fast-unstake = { workspace = true } pallet-referenda = { workspace = true } pallet-vesting = { workspace = true } +pallet-staking-async-ah-client = { workspace = true } pallet-session = { workspace = true } pallet-nomination-pools = { workspace = true } pallet-state-trie-migration = { workspace = true } @@ -54,6 +56,8 @@ frame-election-provider-support = { workspace = true } [features] default = ["std"] +ahm-staking-migration = [] + std = [ "codec/std", "frame-benchmarking?/std", @@ -99,6 +103,8 @@ std = [ "xcm-executor/std", "xcm-executor/std", "xcm/std", + "pallet-staking-async/std", + "pallet-staking-async-ah-client/std" ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", @@ -134,6 +140,8 @@ runtime-benchmarks = [ "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", "xcm/runtime-benchmarks", + "pallet-staking-async/runtime-benchmarks", + "pallet-staking-async-ah-client/runtime-benchmarks" ] try-runtime = [ "frame-election-provider-support/try-runtime", @@ -163,4 +171,6 @@ try-runtime = [ "polkadot-runtime-common/try-runtime", "runtime-parachains/try-runtime", "sp-runtime/try-runtime", + "pallet-staking-async/try-runtime", + "pallet-staking-async-ah-client/try-runtime" ] diff --git a/pallets/rc-migrator/src/lib.rs b/pallets/rc-migrator/src/lib.rs index 57839ecd58..7f2318d75c 100644 --- a/pallets/rc-migrator/src/lib.rs +++ b/pallets/rc-migrator/src/lib.rs @@ -449,12 +449,13 @@ pub mod pallet { + pallet_asset_rate::Config + pallet_slots::Config + pallet_crowdloan::Config - + pallet_staking::Config + + pallet_staking::Config + pallet_claims::Config + pallet_bounties::Config + pallet_treasury::Config + pallet_delegated_staking::Config + pallet_xcm::Config + + pallet_staking_async_ah_client::Config { /// The overall runtime origin type. type RuntimeOrigin: Into::RuntimeOrigin>> diff --git a/pallets/rc-migrator/src/staking/message.rs b/pallets/rc-migrator/src/staking/message.rs index e2ed31e192..2d454d0755 100644 --- a/pallets/rc-migrator/src/staking/message.rs +++ b/pallets/rc-migrator/src/staking/message.rs @@ -26,14 +26,14 @@ use alloc::collections::BTreeMap; use codec::{EncodeLike, HasCompact}; use core::fmt::Debug; pub use frame_election_provider_support::PageIndex; -use frame_support::traits::DefensiveTruncateInto; +use crate::types::DefensiveTruncateInto; use pallet_staking::{ slashing::{SlashingSpans, SpanIndex, SpanRecord}, ActiveEraInfo, EraRewardPoints, Forcing, Nominations, RewardDestination, StakingLedger, ValidatorPrefs, }; use sp_runtime::{Perbill, Percent}; -use sp_staking::{EraIndex, ExposurePage, Page, PagedExposureMetadata, SessionIndex}; +use sp_staking::{EraIndex, Page, SessionIndex}; #[derive( Encode, @@ -45,150 +45,82 @@ use sp_staking::{EraIndex, ExposurePage, Page, PagedExposureMetadata, SessionInd PartialEqNoBound, EqNoBound, )] -#[scale_info(skip_type_params(T))] -pub enum RcStakingMessage< - AccountId, - Balance, - StakingLedger, - Nominations, - SpanRecord, - EraRewardPoints, - RewardDestination, - ValidatorPrefs, - UnappliedSlash, - SlashingSpans, -> -// We do not want to pull in the Config trait; hence this -where - AccountId: Ord + Debug + Clone, - Balance: HasCompact + MaxEncodedLen + Debug + PartialEq + Clone, - StakingLedger: Debug + PartialEq + Clone, - Nominations: Debug + PartialEq + Clone, - SpanRecord: Debug + PartialEq + Clone, - EraRewardPoints: Debug + PartialEq + Clone, - RewardDestination: Debug + PartialEq + Clone, - ValidatorPrefs: Debug + PartialEq + Clone, - UnappliedSlash: Debug + PartialEq + Clone, - SlashingSpans: Debug + PartialEq + Clone, +pub enum PortableStakingMessage { - Values(StakingValues), - Invulnerables(Vec), + Values(PortableStakingValues), + Invulnerables(Vec), Bonded { - stash: AccountId, - controller: AccountId, + stash: AccountId32, + controller: AccountId32, }, // Stupid staking pallet forces us to use `T` since its staking ledger requires that... Ledger { - controller: AccountId, - ledger: StakingLedger, + controller: AccountId32, + ledger: PortableStakingLedger, }, Payee { - stash: AccountId, - payment: RewardDestination, + stash: AccountId32, + payment: PortableRewardDestination, }, Validators { - stash: AccountId, + stash: AccountId32, validators: ValidatorPrefs, }, Nominators { - stash: AccountId, - nominations: Nominations, + stash: AccountId32, + nominations: PortableNominations, }, - VirtualStakers(AccountId), + VirtualStakers(AccountId32), ErasStakersOverview { era: EraIndex, - validator: AccountId, - exposure: PagedExposureMetadata, + validator: AccountId32, + exposure: PortablePagedExposureMetadata, }, ErasStakersPaged { era: EraIndex, - validator: AccountId, + validator: AccountId32, page: Page, - exposure: ExposurePage, + exposure: PortableExposurePage, }, ClaimedRewards { era: EraIndex, - validator: AccountId, + validator: AccountId32, rewards: Vec, }, ErasValidatorPrefs { era: EraIndex, - validator: AccountId, + validator: AccountId32, prefs: ValidatorPrefs, }, ErasValidatorReward { era: EraIndex, - reward: Balance, + reward: u128, }, ErasRewardPoints { era: EraIndex, - points: EraRewardPoints, + points: PortableEraRewardPoints, }, ErasTotalStake { era: EraIndex, - total_stake: Balance, + total_stake: u128, }, UnappliedSlashes { era: EraIndex, - slash: UnappliedSlash, + slash: PortableUnappliedSlash, }, BondedEras(Vec<(EraIndex, SessionIndex)>), ValidatorSlashInEra { era: EraIndex, - validator: AccountId, - slash: (Perbill, Balance), + validator: AccountId32, + slash: (Perbill, u128), }, NominatorSlashInEra { era: EraIndex, - validator: AccountId, - slash: Balance, - }, - SlashingSpans { - account: AccountId, - spans: SlashingSpans, - }, - SpanSlash { - account: AccountId, - span: SpanIndex, - slash: SpanRecord, - }, + validator: AccountId32, + slash: (Perbill, u128), + } } -/// Untranslated message for the staking migration. -pub type RcStakingMessageOf = RcStakingMessage< - ::AccountId, - ::CurrencyBalance, - pallet_staking::StakingLedger, - pallet_staking::Nominations, - pallet_staking::slashing::SpanRecord<::CurrencyBalance>, - pallet_staking::EraRewardPoints<::AccountId>, - pallet_staking::RewardDestination<::AccountId>, - pallet_staking::ValidatorPrefs, - pallet_staking::UnappliedSlash< - ::AccountId, - ::CurrencyBalance, - >, - pallet_staking::slashing::SlashingSpans, ->; - -/// Translated staking message that the Asset Hub can understand. -/// -/// This will normally have been created by using `RcStakingMessage::convert`. -pub type AhEquivalentStakingMessageOf = RcStakingMessage< - ::AccountId, - ::CurrencyBalance, - pallet_staking_async::StakingLedger, - pallet_staking_async::Nominations, - pallet_staking_async::slashing::SpanRecord< - ::CurrencyBalance, - >, - pallet_staking_async::EraRewardPoints, - pallet_staking_async::RewardDestination<::AccountId>, - pallet_staking_async::ValidatorPrefs, - pallet_staking_async::UnappliedSlash, - pallet_staking_async::slashing::SlashingSpans, ->; - #[derive(Encode, Decode, DecodeWithMemTracking, TypeInfo, RuntimeDebug, Clone, PartialEq, Eq)] pub struct StakingValues { pub validator_count: Option, @@ -209,239 +141,9 @@ pub struct StakingValues { pub chill_threshold: Option, } -pub type RcStakingValuesOf = StakingValues<::CurrencyBalance>; -pub type AhStakingValuesOf = StakingValues<::CurrencyBalance>; - -impl IntoAh, pallet_staking_async::StakingLedger> - for pallet_staking::StakingLedger -where - T: pallet_staking::Config, - Ah: pallet_staking_async::Config, CurrencyBalance = BalanceOf>, -{ - fn intoAh(ledger: pallet_staking::StakingLedger) -> pallet_staking_async::StakingLedger { - pallet_staking_async::StakingLedger { - stash: ledger.stash, - total: ledger.total, - active: ledger.active, - unlocking: ledger - .unlocking - .into_iter() - .map(pallet_staking::UnlockChunk::intoAh) - .collect::>() - .defensive_truncate_into(), - // legacy_claimed_rewards not migrated - controller: ledger.controller, - } - } -} - -// NominationsQuota is an associated trait - not a type, therefore more mental gymnastics are needed -impl - IntoAh, pallet_staking_async::Nominations> - for pallet_staking::Nominations -where - T: pallet_staking::Config, - Ah: pallet_staking_async::Config< - AccountId = AccountIdOf, - CurrencyBalance = BalanceOf, - NominationsQuota = SSNomQuota, - >, - SNomQuota: pallet_staking::NominationsQuota>, - SSNomQuota: pallet_staking_async::NominationsQuota< - pallet_staking_async::BalanceOf, - MaxNominations = SNomQuota::MaxNominations, - >, -{ - fn intoAh( - nominations: pallet_staking::Nominations, - ) -> pallet_staking_async::Nominations { - pallet_staking_async::Nominations { - targets: nominations.targets, - submitted_in: nominations.submitted_in, - suppressed: nominations.suppressed, - } - } -} - -impl - IntoAh< - pallet_staking::slashing::SpanRecord, - pallet_staking_async::slashing::SpanRecord, - > for pallet_staking::slashing::SpanRecord -{ - fn intoAh( - record: pallet_staking::slashing::SpanRecord, - ) -> pallet_staking_async::slashing::SpanRecord { - pallet_staking_async::slashing::SpanRecord { - slashed: record.slashed, - paid_out: record.paid_out, - } - } -} - -impl> - IntoAh, pallet_staking_async::EraRewardPoints> - for pallet_staking::EraRewardPoints -where - AccountId: Ord, - Ah: pallet_staking_async::Config, -{ - fn intoAh( - points: pallet_staking::EraRewardPoints, - ) -> pallet_staking_async::EraRewardPoints { - let bounded = points - .individual - .into_iter() - .take(::MaxValidatorSet::get() as usize) - .collect::>(); - pallet_staking_async::EraRewardPoints { - total: points.total, - individual: BoundedBTreeMap::try_from(bounded).defensive().unwrap_or_default(), - } - } -} - -impl - IntoAh< - pallet_staking::RewardDestination, - pallet_staking_async::RewardDestination, - > for pallet_staking::RewardDestination -{ - fn intoAh( - destination: pallet_staking::RewardDestination, - ) -> pallet_staking_async::RewardDestination { - match destination { - pallet_staking::RewardDestination::Staked => - pallet_staking_async::RewardDestination::Staked, - pallet_staking::RewardDestination::Stash => - pallet_staking_async::RewardDestination::Stash, - pallet_staking::RewardDestination::Controller => - pallet_staking_async::RewardDestination::Controller, - pallet_staking::RewardDestination::Account(account) => - pallet_staking_async::RewardDestination::Account(account), - pallet_staking::RewardDestination::None => - pallet_staking_async::RewardDestination::None, - } - } -} - -impl IntoAh - for pallet_staking::ValidatorPrefs -{ - fn intoAh(prefs: pallet_staking::ValidatorPrefs) -> pallet_staking_async::ValidatorPrefs { - pallet_staking_async::ValidatorPrefs { - commission: prefs.commission, - blocked: prefs.blocked, - } - } -} -impl - IntoAh, pallet_staking_async::UnlockChunk> - for pallet_staking::UnlockChunk -{ - fn intoAh( - chunk: pallet_staking::UnlockChunk, - ) -> pallet_staking_async::UnlockChunk { - pallet_staking_async::UnlockChunk { value: chunk.value, era: chunk.era } - } -} - -impl IntoAh - for pallet_staking::slashing::SlashingSpans -{ - fn intoAh( - spans: pallet_staking::slashing::SlashingSpans, - ) -> pallet_staking_async::slashing::SlashingSpans { - pallet_staking_async::slashing::SlashingSpans { - span_index: spans.span_index, - last_start: spans.last_start, - last_nonzero_slash: spans.last_nonzero_slash, - prior: spans.prior, - } - } -} -// StakingLedger requires a T instead of having a `StakingLedgerOf` :( -impl IntoAh, AhEquivalentStakingMessageOf> - for RcStakingMessageOf -where - T: pallet_staking::Config, - Ah: pallet_staking_async::Config< - NominationsQuota = SSNomQuota, - CurrencyBalance = BalanceOf, - AccountId = AccountIdOf, - >, - SNomQuota: pallet_staking::NominationsQuota>, - SSNomQuota: pallet_staking_async::NominationsQuota< - pallet_staking_async::BalanceOf, - MaxNominations = SNomQuota::MaxNominations, - >, -{ - fn intoAh(message: RcStakingMessageOf) -> AhEquivalentStakingMessageOf { - use RcStakingMessage::*; - match message { - // It looks like nothing happens here, but it does. We swap the omitted generics of - // `RcStakingMessage` from `T` to `Ah`: - Values(values) => Values(values), - Invulnerables(invulnerables) => Invulnerables(invulnerables), - Bonded { stash, controller } => Bonded { stash, controller }, - Ledger { controller, ledger } => - Ledger { controller, ledger: pallet_staking::StakingLedger::intoAh(ledger) }, - Payee { stash, payment } => - Payee { stash, payment: pallet_staking::RewardDestination::intoAh(payment) }, - Validators { stash, validators } => - Validators { stash, validators: pallet_staking::ValidatorPrefs::intoAh(validators) }, - Nominators { stash, nominations } => - Nominators { stash, nominations: pallet_staking::Nominations::intoAh(nominations) }, - VirtualStakers(staker) => VirtualStakers(staker), - ErasStakersOverview { era, validator, exposure } => - ErasStakersOverview { era, validator, exposure }, - ErasStakersPaged { era, validator, page, exposure } => - ErasStakersPaged { era, validator, page, exposure }, - ClaimedRewards { era, validator, rewards } => - ClaimedRewards { era, validator, rewards }, - ErasValidatorPrefs { era, validator, prefs } => ErasValidatorPrefs { - era, - validator, - prefs: pallet_staking::ValidatorPrefs::intoAh(prefs), - }, - ErasValidatorReward { era, reward } => ErasValidatorReward { era, reward }, - ErasRewardPoints { era, points } => - ErasRewardPoints { era, points: pallet_staking::EraRewardPoints::intoAh(points) }, - ErasTotalStake { era, total_stake } => ErasTotalStake { era, total_stake }, - UnappliedSlashes { era, slash } => { - // Translate according to https://github.com/paritytech/polkadot-sdk/blob/43ea306f6307dff908551cb91099ef6268502ee0/substrate/frame/staking/src/migrations.rs#L94-L108 - UnappliedSlashes { - era, - slash: pallet_staking_async::UnappliedSlash { - validator: slash.validator, - own: slash.own, - // TODO: @ggwpez defensive truncate - others: WeakBoundedVec::force_from(slash.others, None), - payout: slash.payout, - reporter: slash.reporters.first().cloned(), - }, - } - }, - BondedEras(eras) => BondedEras(eras), - ValidatorSlashInEra { era, validator, slash } => - ValidatorSlashInEra { era, validator, slash }, - NominatorSlashInEra { era, validator, slash } => - NominatorSlashInEra { era, validator, slash }, - SlashingSpans { account, spans } => SlashingSpans { - account, - spans: pallet_staking::slashing::SlashingSpans::intoAh(spans), - }, - SpanSlash { account, span, slash } => SpanSlash { - account, - span, - slash: pallet_staking::slashing::SpanRecord::intoAh(slash), - }, - } - } -} - impl StakingMigrator { - pub fn take_values() -> RcStakingValuesOf { + /// Take and remove the values from the storage. + pub fn take_values() -> StakingValues> { use pallet_staking::*; StakingValues { @@ -469,49 +171,181 @@ impl StakingMigrator { } } -impl StakingMigrator { - pub fn put_values(values: AhStakingValuesOf) { - use pallet_staking_async::*; +pub type PortableStakingValues = StakingValues; - values.validator_count.map(ValidatorCount::::put); - // MinimumValidatorCount is not migrated - values.min_nominator_bond.map(MinNominatorBond::::put); - values.min_validator_bond.map(MinValidatorBond::::put); - values.min_active_stake.map(MinimumActiveStake::::put); - values.min_commission.map(MinCommission::::put); - values.max_validators_count.map(MaxValidatorsCount::::put); - values.max_nominators_count.map(MaxNominatorsCount::::put); - values.active_era.map(|active_era| { - let active_era = pallet_staking::ActiveEraInfo::intoAh(active_era); - ActiveEra::::put(active_era); - CurrentEra::::put(active_era.map(|a| a.index)); - }); - values.force_era.map(|force_era| { - ForceEra::::put(pallet_staking::Forcing::intoAh(force_era)); - }); - values.max_staked_rewards.map(MaxStakedRewards::::put); - values.slash_reward_fraction.map(SlashRewardFraction::::put); - values.canceled_slash_payout.map(CanceledSlashPayout::::put); - // CurrentPlannedSession is not migrated - values.chill_threshold.map(ChillThreshold::::put); - } +#[derive( + PartialEq, + Eq, + Clone, + Encode, + Decode, + DecodeWithMemTracking, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, +)] +pub struct PortableStakingLedger { + /// The stash account whose balance is actually locked and at stake. + pub stash: AccountId32, + + /// The total amount of the stash's balance that we are currently accounting for. + /// It's just `active` plus all the `unlocking` balances. + pub total: u128, + + /// The total amount of the stash's balance that will be at stake in any forthcoming + /// rounds. + pub active: u128, + + /// Any balance that is becoming free, which may eventually be transferred out of the stash + /// (assuming it doesn't get slashed first). It is assumed that this will be treated as a first + /// in, first out queue where the new (higher value) eras get pushed on the back. + pub unlocking: BoundedVec>, // 100 is an upper bound TODO @kianenigma review } -impl IntoAh for pallet_staking::Forcing { - fn intoAh(forcing: pallet_staking::Forcing) -> pallet_staking_async::Forcing { - match forcing { - pallet_staking::Forcing::NotForcing => pallet_staking_async::Forcing::NotForcing, - pallet_staking::Forcing::ForceNew => pallet_staking_async::Forcing::ForceNew, - pallet_staking::Forcing::ForceNone => pallet_staking_async::Forcing::ForceNone, - pallet_staking::Forcing::ForceAlways => pallet_staking_async::Forcing::ForceAlways, - } - } +#[derive( + PartialEq, + Eq, + Clone, + Encode, + Decode, + DecodeWithMemTracking, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, +)] +pub struct PortableUnlockChunk { + /// Amount of funds to be unlocked. + pub value: u128, + /// Era number at which point it'll be unlocked. + pub era: EraIndex, } -impl IntoAh - for pallet_staking::ActiveEraInfo -{ - fn intoAh(active_era: pallet_staking::ActiveEraInfo) -> pallet_staking_async::ActiveEraInfo { - pallet_staking_async::ActiveEraInfo { index: active_era.index, start: active_era.start } - } +#[derive( + PartialEq, + Eq, + Clone, + Encode, + Decode, + DecodeWithMemTracking, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, +)] +pub struct PortableUnappliedSlash { + /// The stash ID of the offending validator. + pub validator: AccountId32, + /// The validator's own slash. + pub own: u128, + /// All other slashed stakers and amounts. + pub others: BoundedVec<(AccountId32, u128), ConstU32<100>>, // 100 is an upper bound TODO @kianenigma review + /// Reporters of the offence; bounty payout recipients. + pub reporter: Option, + /// The amount of payout. + pub payout: u128, +} + +#[derive( + PartialEq, + Eq, + Clone, + Encode, + Decode, + DecodeWithMemTracking, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, +)] +pub enum PortableRewardDestination { + /// Pay into the stash account, increasing the amount at stake accordingly. + Staked, + /// Pay into the stash account, not increasing the amount at stake. + Stash, + #[deprecated( + note = "`Controller` will be removed after January 2024. Use `Account(controller)` instead." + )] + Controller, + /// Pay into a specified account. + Account(AccountId32), + /// Receive no reward. + None, +} + +#[derive( + PartialEqNoBound, EqNoBound, Clone, Encode, Decode, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen, DecodeWithMemTracking, +)] +pub struct PortableNominations { + /// The targets of nomination. + pub targets: BoundedVec>, // 100 is an upper bound TODO @kianenigma review + /// The era the nominations were submitted. + /// + /// Except for initial nominations which are considered submitted at era 0. + pub submitted_in: EraIndex, + /// Whether the nominations have been suppressed. This can happen due to slashing of the + /// validators, or other events that might invalidate the nomination. + /// + /// NOTE: this for future proofing and is thus far not used. + pub suppressed: bool, +} + +#[derive( + PartialEq, + Eq, + PartialOrd, + Ord, + Clone, + Encode, + Decode, + RuntimeDebug, + TypeInfo, + Default, + MaxEncodedLen, + DecodeWithMemTracking, +)] +pub struct PortablePagedExposureMetadata { + /// The total balance backing this validator. + pub total: u128, + /// The validator's own stash that is exposed. + pub own: u128, + /// Number of nominators backing this validator. + pub nominator_count: u32, + /// Number of pages of nominators. + pub page_count: Page, +} + +/// A snapshot of the stake backing a single validator in the system. +#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, RuntimeDebug, TypeInfo, DecodeWithMemTracking)] +pub struct PortableExposurePage { + /// The total balance of this chunk/page. + pub page_total: u128, + /// The portions of nominators stashes that are exposed. + pub others: Vec, +} + +#[derive( + PartialEq, + Eq, + PartialOrd, + Ord, + Clone, + Encode, + Decode, + DecodeWithMemTracking, + RuntimeDebug, + TypeInfo, +)] +pub struct PortableIndividualExposure { + /// The stash account of the nominator in question. + pub who: AccountId32, + /// Amount of funds exposed. + pub value: u128, +} + +#[derive( + PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen, DecodeWithMemTracking, +)] +pub struct PortableEraRewardPoints { + /// Total number of points. Equals the sum of reward points for each validator. + pub total: u32, + /// The reward points earned by a given validator. + pub individual: BoundedBTreeMap>, // 100 is an upper bound TODO @kianenigma review } diff --git a/pallets/rc-migrator/src/staking/staking.rs b/pallets/rc-migrator/src/staking/staking.rs index 4aee65e052..005eca7fc8 100644 --- a/pallets/rc-migrator/src/staking/staking.rs +++ b/pallets/rc-migrator/src/staking/staking.rs @@ -16,14 +16,12 @@ //! Pallet staking migration. -pub use crate::staking::message::{ - AhEquivalentStakingMessageOf, RcStakingMessage, RcStakingMessageOf, -}; +pub use crate::staking::message::PortableStakingMessage; use crate::{staking::IntoAh, *}; use codec::{EncodeLike, HasCompact}; use core::fmt::Debug; pub use frame_election_provider_support::PageIndex; -use frame_support::traits::DefensiveTruncateInto; +use crate::types::DefensiveTruncateInto; use pallet_staking::{ slashing::{SlashingSpans, SpanIndex, SpanRecord}, ActiveEraInfo, EraRewardPoints, Forcing, Nominations, RewardDestination, StakingLedger, @@ -110,15 +108,15 @@ impl PalletMigration for StakingMigrator { inner_key = match inner_key { StakingStage::Values => { let values = Self::take_values(); - messages.push(RcStakingMessage::Values(values)); + messages.push(PortableStakingMessage::Values(values)); StakingStage::Invulnerables }, StakingStage::Invulnerables => { let invulnerables = pallet_staking::Invulnerables::::take(); - messages.push(RcStakingMessage::Invulnerables(invulnerables)); + messages.push(PortableStakingMessage::Invulnerables(invulnerables)); StakingStage::Bonded(None) }, - StakingStage::Bonded(who) => { + /*StakingStage::Bonded(who) => { let mut iter = if let Some(who) = who { pallet_staking::Bonded::::iter_from_key(who) } else { @@ -128,7 +126,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((stash, controller)) => { pallet_staking::Bonded::::remove(&stash); - messages.push(RcStakingMessage::Bonded { + messages.push(PortableStakingMessage::Bonded { stash: stash.clone(), controller, }); @@ -147,7 +145,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((controller, ledger)) => { pallet_staking::Ledger::::remove(&controller); - messages.push(RcStakingMessage::Ledger { + messages.push(PortableStakingMessage::Ledger { controller: controller.clone(), ledger, }); @@ -167,7 +165,7 @@ impl PalletMigration for StakingMigrator { Some((stash, payment)) => { pallet_staking::Payee::::remove(&stash); messages - .push(RcStakingMessage::Payee { stash: stash.clone(), payment }); + .push(PortableStakingMessage::Payee { stash: stash.clone(), payment }); StakingStage::Payee(Some(stash)) }, None => StakingStage::Validators(None), @@ -185,7 +183,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((stash, validators)) => { pallet_staking::Validators::::remove(&stash); - messages.push(RcStakingMessage::Validators { + messages.push(PortableStakingMessage::Validators { stash: stash.clone(), validators, }); @@ -206,7 +204,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((stash, nominations)) => { pallet_staking::Nominators::::remove(&stash); - messages.push(RcStakingMessage::Nominators { + messages.push(PortableStakingMessage::Nominators { stash: stash.clone(), nominations, }); @@ -228,7 +226,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((staker, ())) => { pallet_staking::VirtualStakers::::remove(&staker); - messages.push(RcStakingMessage::VirtualStakers(staker.clone())); + messages.push(PortableStakingMessage::VirtualStakers(staker.clone())); StakingStage::VirtualStakers(Some(staker)) }, None => StakingStage::ErasStakersOverview(None), @@ -248,7 +246,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, validator, exposure)) => { pallet_staking::ErasStakersOverview::::remove(&era, &validator); - messages.push(RcStakingMessage::ErasStakersOverview { + messages.push(PortableStakingMessage::ErasStakersOverview { era, validator: validator.clone(), exposure, @@ -272,7 +270,7 @@ impl PalletMigration for StakingMigrator { pallet_staking::ErasStakersPaged::::remove(( &era, &validator, &page, )); - messages.push(RcStakingMessage::ErasStakersPaged { + messages.push(PortableStakingMessage::ErasStakersPaged { era, validator: validator.clone(), page, @@ -297,7 +295,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, validator, rewards)) => { pallet_staking::ClaimedRewards::::remove(&era, &validator); - messages.push(RcStakingMessage::ClaimedRewards { + messages.push(PortableStakingMessage::ClaimedRewards { era, validator: validator.clone(), rewards, @@ -321,7 +319,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, validator, prefs)) => { pallet_staking::ErasValidatorPrefs::::remove(&era, &validator); - messages.push(RcStakingMessage::ErasValidatorPrefs { + messages.push(PortableStakingMessage::ErasValidatorPrefs { era, validator: validator.clone(), prefs, @@ -337,7 +335,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, reward)) => { pallet_staking::ErasValidatorReward::::remove(&era); - messages.push(RcStakingMessage::ErasValidatorReward { era, reward }); + messages.push(PortableStakingMessage::ErasValidatorReward { era, reward }); StakingStage::ErasValidatorReward(Some(era)) }, None => StakingStage::ErasRewardPoints(None), @@ -349,7 +347,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, points)) => { pallet_staking::ErasRewardPoints::::remove(&era); - messages.push(RcStakingMessage::ErasRewardPoints { era, points }); + messages.push(PortableStakingMessage::ErasRewardPoints { era, points }); StakingStage::ErasRewardPoints(Some(era)) }, None => StakingStage::ErasTotalStake(None), @@ -361,7 +359,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, total_stake)) => { pallet_staking::ErasTotalStake::::remove(&era); - messages.push(RcStakingMessage::ErasTotalStake { era, total_stake }); + messages.push(PortableStakingMessage::ErasTotalStake { era, total_stake }); StakingStage::ErasTotalStake(Some(era)) }, None => StakingStage::UnappliedSlashes(None), @@ -381,7 +379,7 @@ impl PalletMigration for StakingMigrator { // Translate according to https://github.com/paritytech/polkadot-sdk/blob/43ea306f6307dff908551cb91099ef6268502ee0/substrate/frame/staking/src/migrations.rs#L94-L108 for slash in slashes.into_iter().take(1000) { // First 1000 slashes should be enough, just to avoid unbound loop - messages.push(RcStakingMessage::UnappliedSlashes { era, slash }); + messages.push(PortableStakingMessage::UnappliedSlashes { era, slash }); } StakingStage::UnappliedSlashes(Some(era)) }, @@ -390,7 +388,7 @@ impl PalletMigration for StakingMigrator { }, StakingStage::BondedEras => { let bonded_eras = pallet_staking::BondedEras::::take(); - messages.push(RcStakingMessage::BondedEras(bonded_eras)); + messages.push(PortableStakingMessage::BondedEras(bonded_eras)); StakingStage::ValidatorSlashInEra(None) }, StakingStage::ValidatorSlashInEra(next) => { @@ -407,7 +405,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, validator, slash)) => { pallet_staking::ValidatorSlashInEra::::remove(&era, &validator); - messages.push(RcStakingMessage::ValidatorSlashInEra { + messages.push(PortableStakingMessage::ValidatorSlashInEra { era, validator: validator.clone(), slash, @@ -431,7 +429,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, validator, slash)) => { pallet_staking::NominatorSlashInEra::::remove(&era, &validator); - messages.push(RcStakingMessage::NominatorSlashInEra { + messages.push(PortableStakingMessage::NominatorSlashInEra { era, validator: validator.clone(), slash, @@ -447,7 +445,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((account, spans)) => { pallet_staking::SlashingSpans::::remove(&account); - messages.push(RcStakingMessage::SlashingSpans { + messages.push(PortableStakingMessage::SlashingSpans { account: account.clone(), spans, }); @@ -462,7 +460,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some(((account, span), slash)) => { pallet_staking::SpanSlash::::remove((&account, &span)); - messages.push(RcStakingMessage::SpanSlash { + messages.push(PortableStakingMessage::SpanSlash { account: account.clone(), span, slash, @@ -474,7 +472,8 @@ impl PalletMigration for StakingMigrator { }, StakingStage::Finished => { break; - }, + },*/ + _ => todo!(), }; } diff --git a/pallets/rc-migrator/src/types.rs b/pallets/rc-migrator/src/types.rs index 11e78dd41e..97fed64e56 100644 --- a/pallets/rc-migrator/src/types.rs +++ b/pallets/rc-migrator/src/types.rs @@ -36,6 +36,8 @@ impl ToPolkadotSs58 for AccountId32 { } } + + /// Convert a type into its portable format. /// /// The portable format is chain-agnostic. The flow the following: Convert RC object to portable @@ -54,6 +56,18 @@ impl IntoPortable for IdAmount { } } +/// Defensively truncate a value and convert it into its bounded form. +pub trait DefensiveTruncateInto { + /// Defensively truncate a value and convert it into its bounded form. + fn defensive_truncate_into(self) -> T; +} + +impl> DefensiveTruncateInto for T { + fn defensive_truncate_into(self) -> U { + U::defensive_truncate_from(self) + } +} + /// Generate a default instance for benchmarking purposes. pub trait BenchmarkingDefault { /// Default for benchmarking purposes only. @@ -141,7 +155,7 @@ pub enum AhMigratorCall { }, #[codec(index = 30)] #[cfg(feature = "ahm-staking-migration")] // Staking migration not yet enabled - ReceiveStakingMessages { messages: Vec> }, + ReceiveStakingMessages { messages: Vec }, #[codec(index = 101)] StartMigration, #[codec(index = 110)] diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index a5875ec7e8..0e8e21eb3b 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -133,6 +133,10 @@ substrate-wasm-builder = { workspace = true, optional = true } default = ["std"] no_std = [] paseo = [] # For Paseo AHM +ahm-staking-migration = [ + "pallet-rc-migrator/ahm-staking-migration" +] + std = [ "pallet-rc-migrator/std", diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 5d76017b7a..a35b47ae7a 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -141,6 +141,11 @@ substrate-wasm-builder = { optional = true, workspace = true } [features] default = ["std"] paseo = [] # For Paseo AHM +ahm-staking-migration = [ + "pallet-ah-migrator/ahm-staking-migration", + "pallet-rc-migrator/ahm-staking-migration" +] + runtime-benchmarks = [ "assets-common/runtime-benchmarks", "bp-asset-hub-kusama/runtime-benchmarks", From 47fb0e63ab456750f05ed89e7e4c57fd6a541155 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Mon, 21 Jul 2025 14:50:56 +0200 Subject: [PATCH 02/14] backup Signed-off-by: Oliver Tale-Yazdi --- pallets/rc-migrator/src/staking/message.rs | 76 ++++++++++++++++++++-- pallets/rc-migrator/src/staking/staking.rs | 12 ++-- pallets/rc-migrator/src/types.rs | 11 +++- 3 files changed, 87 insertions(+), 12 deletions(-) diff --git a/pallets/rc-migrator/src/staking/message.rs b/pallets/rc-migrator/src/staking/message.rs index 2d454d0755..a95496918c 100644 --- a/pallets/rc-migrator/src/staking/message.rs +++ b/pallets/rc-migrator/src/staking/message.rs @@ -20,7 +20,7 @@ extern crate alloc; use crate::{ staking::{AccountIdOf, BalanceOf, IntoAh, StakingMigrator}, - *, + *, types::{defensive_vector_truncate, defensive_vector_translate}, }; use alloc::collections::BTreeMap; use codec::{EncodeLike, HasCompact}; @@ -35,6 +35,9 @@ use pallet_staking::{ use sp_runtime::{Perbill, Percent}; use sp_staking::{EraIndex, Page, SessionIndex}; +/// Portable staking migration message. +/// +/// It is portable since it does not have any generic type parameters. #[derive( Encode, Decode, @@ -202,6 +205,24 @@ pub struct PortableStakingLedger { pub unlocking: BoundedVec>, // 100 is an upper bound TODO @kianenigma review } +impl IntoPortable for pallet_staking::StakingLedger { + type Portable = PortableStakingLedger; + + fn into_portable(self) -> Self::Portable { + // TODO @kianenigma what to do with `legacy_claimed_rewards`? + defensive_assert!(self.legacy_claimed_rewards.is_empty()); + + PortableStakingLedger { + stash: self.stash, + total: self.total, + active: self.active, + unlocking: defensive_vector_translate(self.unlocking), + // TODO @kianenigma controller is ignored, right? + // self.controller, + } + } +} + #[derive( PartialEq, Eq, @@ -220,6 +241,14 @@ pub struct PortableUnlockChunk { pub era: EraIndex, } +impl IntoPortable for pallet_staking::UnlockChunk { + type Portable = PortableUnlockChunk; + + fn into_portable(self) -> Self::Portable { + PortableUnlockChunk { value: self.value, era: self.era } + } +} + #[derive( PartialEq, Eq, @@ -260,9 +289,7 @@ pub enum PortableRewardDestination { Staked, /// Pay into the stash account, not increasing the amount at stake. Stash, - #[deprecated( - note = "`Controller` will be removed after January 2024. Use `Account(controller)` instead." - )] + /// Deprecated Controller, /// Pay into a specified account. Account(AccountId32), @@ -270,6 +297,22 @@ pub enum PortableRewardDestination { None, } +impl IntoPortable for pallet_staking::RewardDestination { + type Portable = PortableRewardDestination; + + fn into_portable(self) -> Self::Portable { + use PortableRewardDestination::*; + + match self { + RewardDestination::Staked => Staked, + RewardDestination::Stash => Stash, + RewardDestination::Controller => Controller, + RewardDestination::Account(account) => Account(account), + RewardDestination::None => None, + } + } +} + #[derive( PartialEqNoBound, EqNoBound, Clone, Encode, Decode, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen, DecodeWithMemTracking, )] @@ -287,6 +330,18 @@ pub struct PortableNominations { pub suppressed: bool, } +impl IntoPortable for pallet_staking::Nominations { + type Portable = PortableNominations; + + fn into_portable(self) -> Self::Portable { + PortableNominations { + targets: defensive_vector_truncate(self.targets), + submitted_in: self.submitted_in, + suppressed: self.suppressed, + } + } +} + #[derive( PartialEq, Eq, @@ -312,6 +367,19 @@ pub struct PortablePagedExposureMetadata { pub page_count: Page, } +impl IntoPortable for sp_staking::PagedExposureMetadata { + type Portable = PortablePagedExposureMetadata; + + fn into_portable(self) -> Self::Portable { + PortablePagedExposureMetadata { + total: self.total, + own: self.own, + nominator_count: self.nominator_count, + page_count: self.page_count, + } + } +} + /// A snapshot of the stake backing a single validator in the system. #[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, RuntimeDebug, TypeInfo, DecodeWithMemTracking)] pub struct PortableExposurePage { diff --git a/pallets/rc-migrator/src/staking/staking.rs b/pallets/rc-migrator/src/staking/staking.rs index 005eca7fc8..587f2364db 100644 --- a/pallets/rc-migrator/src/staking/staking.rs +++ b/pallets/rc-migrator/src/staking/staking.rs @@ -116,7 +116,7 @@ impl PalletMigration for StakingMigrator { messages.push(PortableStakingMessage::Invulnerables(invulnerables)); StakingStage::Bonded(None) }, - /*StakingStage::Bonded(who) => { + StakingStage::Bonded(who) => { let mut iter = if let Some(who) = who { pallet_staking::Bonded::::iter_from_key(who) } else { @@ -147,7 +147,7 @@ impl PalletMigration for StakingMigrator { pallet_staking::Ledger::::remove(&controller); messages.push(PortableStakingMessage::Ledger { controller: controller.clone(), - ledger, + ledger: ledger.into_portable(), }); StakingStage::Ledger(Some(controller)) }, @@ -165,7 +165,7 @@ impl PalletMigration for StakingMigrator { Some((stash, payment)) => { pallet_staking::Payee::::remove(&stash); messages - .push(PortableStakingMessage::Payee { stash: stash.clone(), payment }); + .push(PortableStakingMessage::Payee { stash: stash.clone(), payment: payment.into_portable() }); StakingStage::Payee(Some(stash)) }, None => StakingStage::Validators(None), @@ -206,7 +206,7 @@ impl PalletMigration for StakingMigrator { pallet_staking::Nominators::::remove(&stash); messages.push(PortableStakingMessage::Nominators { stash: stash.clone(), - nominations, + nominations: nominations.into_portable(), }); StakingStage::Nominators(Some(stash)) }, @@ -249,14 +249,14 @@ impl PalletMigration for StakingMigrator { messages.push(PortableStakingMessage::ErasStakersOverview { era, validator: validator.clone(), - exposure, + exposure: exposure.into_portable(), }); StakingStage::ErasStakersOverview(Some((era, validator))) }, None => StakingStage::ErasStakersPaged(None), } }, - StakingStage::ErasStakersPaged(progress) => { + /*StakingStage::ErasStakersPaged(progress) => { let mut iter = if let Some(progress) = progress { pallet_staking::ErasStakersPaged::::iter_from( pallet_staking::ErasStakersPaged::::hashed_key_for(progress), diff --git a/pallets/rc-migrator/src/types.rs b/pallets/rc-migrator/src/types.rs index 97fed64e56..d1ceff2389 100644 --- a/pallets/rc-migrator/src/types.rs +++ b/pallets/rc-migrator/src/types.rs @@ -36,8 +36,6 @@ impl ToPolkadotSs58 for AccountId32 { } } - - /// Convert a type into its portable format. /// /// The portable format is chain-agnostic. The flow the following: Convert RC object to portable @@ -68,6 +66,15 @@ impl> DefensiveTruncateInto for T { } } +/// Translate and truncate the elements of a bounded vector defensively. +pub fn defensive_vector_translate, Bs: Get>(vec: BoundedVec) -> BoundedVec { + vec.into_iter().map(|e| e.into_portable()).collect::>().defensive_truncate_into() +} + +pub fn defensive_vector_truncate, Bs: Get>(vec: BoundedVec) -> BoundedVec { + vec.into_iter().collect::>().defensive_truncate_into() +} + /// Generate a default instance for benchmarking purposes. pub trait BenchmarkingDefault { /// Default for benchmarking purposes only. From 3618ede4ecb2d2535d5f776ca11419af9f36553a Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Mon, 21 Jul 2025 17:20:17 +0200 Subject: [PATCH 03/14] backup Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 1 + pallets/ah-migrator/Cargo.toml | 4 + pallets/ah-migrator/src/lib.rs | 4 +- pallets/ah-migrator/src/staking/staking.rs | 15 +- pallets/rc-migrator/src/staking/message.rs | 183 +++++++++++++++++++-- pallets/rc-migrator/src/staking/staking.rs | 25 +-- 6 files changed, 198 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0d78befa2a..6d77f21331 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7956,6 +7956,7 @@ dependencies = [ "pallet-referenda", "pallet-scheduler", "pallet-staking", + "pallet-staking-async", "pallet-state-trie-migration", "pallet-timestamp", "pallet-treasury", diff --git a/pallets/ah-migrator/Cargo.toml b/pallets/ah-migrator/Cargo.toml index ee8ceec292..5391da1871 100644 --- a/pallets/ah-migrator/Cargo.toml +++ b/pallets/ah-migrator/Cargo.toml @@ -35,6 +35,7 @@ pallet-rc-migrator = { workspace = true } pallet-referenda = { workspace = true } pallet-scheduler = { workspace = true } pallet-staking = { workspace = true } +pallet-staking-async = { workspace = true } pallet-state-trie-migration = { workspace = true } pallet-vesting = { workspace = true } pallet-treasury = { workspace = true } @@ -120,6 +121,7 @@ std = [ "xcm-executor/std", "xcm-executor/std", "xcm/std", + "pallet-staking-async/std" ] runtime-benchmarks = [ "assets-common/runtime-benchmarks", @@ -162,6 +164,7 @@ runtime-benchmarks = [ "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", "xcm/runtime-benchmarks", + "pallet-staking-async/runtime-benchmarks" # "asset-hub-polkadot-runtime/runtime-benchmarks" ] try-runtime = [ @@ -193,4 +196,5 @@ try-runtime = [ "polkadot-runtime-common/try-runtime", "runtime-parachains/try-runtime", "sp-runtime/try-runtime", + "pallet-staking-async/try-runtime" ] diff --git a/pallets/ah-migrator/src/lib.rs b/pallets/ah-migrator/src/lib.rs index 06c7b68605..24cf2d217c 100644 --- a/pallets/ah-migrator/src/lib.rs +++ b/pallets/ah-migrator/src/lib.rs @@ -80,6 +80,7 @@ use pallet_balances::{AccountData, Reasons as LockReasons}; use pallet_rc_migrator::{ bounties::RcBountiesMessageOf, claims::RcClaimsMessageOf, crowdloan::RcCrowdloanMessageOf, treasury::RcTreasuryMessage, types::MigrationStatus, + staking::PortableStakingMessage, }; use cumulus_primitives_core::AggregateMessageOrigin; @@ -265,6 +266,7 @@ pub mod pallet { + pallet_bounties::Config + pallet_treasury::Config + pallet_delegated_staking::Config + + pallet_staking_async::Config { type RuntimeHoldReason: Parameter + VariantCount @@ -862,7 +864,7 @@ pub mod pallet { #[pallet::weight({1})] // TODO: @ggwpez weight pub fn receive_staking_messages( origin: OriginFor, - messages: Vec, + messages: Vec, ) -> DispatchResult { ensure_root(origin)?; diff --git a/pallets/ah-migrator/src/staking/staking.rs b/pallets/ah-migrator/src/staking/staking.rs index 3a23ff08ec..2b02b116e0 100644 --- a/pallets/ah-migrator/src/staking/staking.rs +++ b/pallets/ah-migrator/src/staking/staking.rs @@ -17,7 +17,8 @@ //! Pallet staking migration. use crate::*; -use crate::types::DefensiveTruncateInto; +use pallet_rc_migrator::types::DefensiveTruncateInto; +use pallet_rc_migrator::staking::PortableStakingMessage; use sp_runtime::Perbill; impl Pallet { @@ -25,7 +26,7 @@ impl Pallet { pub fn staking_migration_finish_hook() {} - pub fn do_receive_staking_messages(messages: Vec) -> Result<(), Error> { + pub fn do_receive_staking_messages(messages: Vec) -> Result<(), Error> { let (mut good, mut bad) = (0, 0); log::info!(target: LOG_TARGET, "Integrating {} StakingMessages", messages.len()); Self::deposit_event(Event::BatchReceived { @@ -34,8 +35,7 @@ impl Pallet { }); for message in messages { - let translated = T::PortableStakingMessage::intoAh(message); - match Self::do_receive_staking_message(translated) { + match Self::do_receive_staking_message(message) { Ok(_) => good += 1, Err(_) => bad += 1, } @@ -51,7 +51,7 @@ impl Pallet { } fn do_receive_staking_message( - message: AhEquivalentStakingMessageOf, + message: PortableStakingMessage, ) -> Result<(), Error> { use PortableStakingMessage::*; @@ -60,7 +60,7 @@ impl Pallet { log::debug!(target: LOG_TARGET, "Integrating StakingValues"); pallet_rc_migrator::staking::StakingMigrator::::put_values(values); }, - Invulnerables(invulnerables) => { + /*Invulnerables(invulnerables) => { log::debug!(target: LOG_TARGET, "Integrating StakingInvulnerables"); let bounded = BoundedVec::truncate_from(invulnerables); pallet_staking_async::Invulnerables::::put(bounded); @@ -148,7 +148,8 @@ impl Pallet { SpanSlash { account, span, slash } => { log::debug!(target: LOG_TARGET, "Integrating SpanSlash {:?}/{:?}", account, span); pallet_staking_async::SpanSlash::::insert((account, span), slash); - }, + },*/ + _ => todo!(), } Ok(()) diff --git a/pallets/rc-migrator/src/staking/message.rs b/pallets/rc-migrator/src/staking/message.rs index a95496918c..34e2773dac 100644 --- a/pallets/rc-migrator/src/staking/message.rs +++ b/pallets/rc-migrator/src/staking/message.rs @@ -28,8 +28,7 @@ use core::fmt::Debug; pub use frame_election_provider_support::PageIndex; use crate::types::DefensiveTruncateInto; use pallet_staking::{ - slashing::{SlashingSpans, SpanIndex, SpanRecord}, - ActiveEraInfo, EraRewardPoints, Forcing, Nominations, RewardDestination, StakingLedger, + slashing::{SlashingSpans, SpanIndex, SpanRecord}, EraRewardPoints, Nominations, RewardDestination, StakingLedger, ValidatorPrefs, }; use sp_runtime::{Perbill, Percent}; @@ -120,8 +119,8 @@ pub enum PortableStakingMessage NominatorSlashInEra { era: EraIndex, validator: AccountId32, - slash: (Perbill, u128), - } + slash: u128, + }, } #[derive(Encode, Decode, DecodeWithMemTracking, TypeInfo, RuntimeDebug, Clone, PartialEq, Eq)] @@ -135,8 +134,8 @@ pub struct StakingValues { pub max_validators_count: Option, pub max_nominators_count: Option, pub current_era: Option, - pub active_era: Option, - pub force_era: Option, + pub active_era: Option, + pub force_era: Option, pub max_staked_rewards: Option, pub slash_reward_fraction: Option, pub canceled_slash_payout: Option, @@ -160,8 +159,8 @@ impl StakingMigrator { max_validators_count: MaxValidatorsCount::::take(), max_nominators_count: MaxNominatorsCount::::take(), current_era: CurrentEra::::take(), - active_era: ActiveEra::::take(), - force_era: ForceEra::::exists().then(ForceEra::::take), + active_era: ActiveEra::::take().map(IntoPortable::into_portable), + force_era: ForceEra::::exists().then(ForceEra::::take).map(IntoPortable::into_portable), max_staked_rewards: MaxStakedRewards::::take(), slash_reward_fraction: SlashRewardFraction::::exists() .then(SlashRewardFraction::::take), @@ -174,8 +173,122 @@ impl StakingMigrator { } } +impl StakingMigrator { + pub fn put_values(values: StakingValues>) { + use pallet_staking_async::*; + + values.validator_count.map(ValidatorCount::::put); + // MinimumValidatorCount is not migrated + values.min_nominator_bond.map(MinNominatorBond::::put); + values.min_validator_bond.map(MinValidatorBond::::put); + values.min_active_stake.map(MinimumActiveStake::::put); + values.min_commission.map(MinCommission::::put); + values.max_validators_count.map(MaxValidatorsCount::::put); + values.max_nominators_count.map(MaxNominatorsCount::::put); + values.active_era.map(|active_era| { + let active_era: pallet_staking_async::ActiveEraInfo = active_era.into(); + ActiveEra::::put(&active_era); + CurrentEra::::put(active_era.index); + }); + values.force_era.map(|force_era| { + let force_era: pallet_staking_async::Forcing = force_era.into(); + ForceEra::::put(force_era); + }); + values.max_staked_rewards.map(MaxStakedRewards::::put); + values.slash_reward_fraction.map(SlashRewardFraction::::put); + values.canceled_slash_payout.map(CanceledSlashPayout::::put); + // CurrentPlannedSession is not migrated + values.chill_threshold.map(ChillThreshold::::put); + } +} + pub type PortableStakingValues = StakingValues; +#[derive( + PartialEq, + Eq, + Clone, + Encode, + Decode, + DecodeWithMemTracking, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, +)] +pub struct PortableActiveEraInfo { + /// Index of era. + pub index: EraIndex, + /// Moment of start expressed as millisecond from `$UNIX_EPOCH`. + /// + /// Start can be none if start hasn't been set for the era yet, + /// Start is set on the first on_finalize of the era to guarantee usage of `Time`. + pub start: Option, +} + +impl IntoPortable for pallet_staking::ActiveEraInfo { + type Portable = PortableActiveEraInfo; + + fn into_portable(self) -> Self::Portable { + PortableActiveEraInfo { index: self.index, start: self.start } + } +} + +impl Into for PortableActiveEraInfo { + fn into(self) -> pallet_staking_async::ActiveEraInfo { + pallet_staking_async::ActiveEraInfo { index: self.index, start: self.start } + } +} + +#[derive( + PartialEq, + Eq, + Clone, + Encode, + Decode, + DecodeWithMemTracking, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, +)] +pub enum PortableForcing { + /// Not forcing anything - just let whatever happen. + NotForcing, + /// Force a new era, then reset to `NotForcing` as soon as it is done. + /// Note that this will force to trigger an election until a new era is triggered, if the + /// election failed, the next session end will trigger a new election again, until success. + ForceNew, + /// Avoid a new era indefinitely. + ForceNone, + /// Force a new era at the end of all sessions indefinitely. + ForceAlways, +} + +// Forcing: RC -> Portable +impl IntoPortable for pallet_staking::Forcing { + type Portable = PortableForcing; + + fn into_portable(self) -> Self::Portable { + match self { + pallet_staking::Forcing::NotForcing => PortableForcing::NotForcing, + pallet_staking::Forcing::ForceNew => PortableForcing::ForceNew, + pallet_staking::Forcing::ForceNone => PortableForcing::ForceNone, + pallet_staking::Forcing::ForceAlways => PortableForcing::ForceAlways, + } + } +} + +// Forcing: Portable -> AH +impl Into for PortableForcing { + fn into(self) -> pallet_staking_async::Forcing { + match self { + PortableForcing::NotForcing => pallet_staking_async::Forcing::NotForcing, + PortableForcing::ForceNew => pallet_staking_async::Forcing::ForceNew, + PortableForcing::ForceNone => pallet_staking_async::Forcing::ForceNone, + PortableForcing::ForceAlways => pallet_staking_async::Forcing::ForceAlways, + } + } +} + #[derive( PartialEq, Eq, @@ -268,11 +381,25 @@ pub struct PortableUnappliedSlash { /// All other slashed stakers and amounts. pub others: BoundedVec<(AccountId32, u128), ConstU32<100>>, // 100 is an upper bound TODO @kianenigma review /// Reporters of the offence; bounty payout recipients. - pub reporter: Option, + pub reporters: BoundedVec>, // 100 is an upper bound TODO @kianenigma review /// The amount of payout. pub payout: u128, } +impl IntoPortable for pallet_staking::UnappliedSlash { + type Portable = PortableUnappliedSlash; + + fn into_portable(self) -> Self::Portable { + PortableUnappliedSlash { + validator: self.validator, + own: self.own, + others: self.others.defensive_truncate_into(), + reporters: self.reporters.defensive_truncate_into(), + payout: self.payout, + } + } +} + #[derive( PartialEq, Eq, @@ -386,7 +513,18 @@ pub struct PortableExposurePage { /// The total balance of this chunk/page. pub page_total: u128, /// The portions of nominators stashes that are exposed. - pub others: Vec, + pub others: BoundedVec>, // 100 is an upper bound TODO @kianenigma review +} + +impl IntoPortable for sp_staking::ExposurePage { + type Portable = PortableExposurePage; + + fn into_portable(self) -> Self::Portable { + PortableExposurePage { + page_total: self.page_total, + others: self.others.into_iter().map(IntoPortable::into_portable).collect::>().defensive_truncate_into(), + } + } } #[derive( @@ -408,6 +546,14 @@ pub struct PortableIndividualExposure { pub value: u128, } +impl IntoPortable for sp_staking::IndividualExposure { + type Portable = PortableIndividualExposure; + + fn into_portable(self) -> Self::Portable { + PortableIndividualExposure { who: self.who, value: self.value } + } +} + #[derive( PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen, DecodeWithMemTracking, )] @@ -417,3 +563,20 @@ pub struct PortableEraRewardPoints { /// The reward points earned by a given validator. pub individual: BoundedBTreeMap>, // 100 is an upper bound TODO @kianenigma review } + +impl IntoPortable for pallet_staking::EraRewardPoints { + type Portable = PortableEraRewardPoints; + + fn into_portable(self) -> Self::Portable { + // TODO @ggwpez + if self.individual.len() > 100 { + defensive!("EraRewardPoints truncated"); + } + let individual = self.individual.into_iter().take(100).collect::>(); + + PortableEraRewardPoints { + total: self.total, + individual: BoundedBTreeMap::try_from(individual).defensive().unwrap_or_default(), + } + } +} diff --git a/pallets/rc-migrator/src/staking/staking.rs b/pallets/rc-migrator/src/staking/staking.rs index 587f2364db..dee4b5608e 100644 --- a/pallets/rc-migrator/src/staking/staking.rs +++ b/pallets/rc-migrator/src/staking/staking.rs @@ -27,6 +27,7 @@ use pallet_staking::{ ActiveEraInfo, EraRewardPoints, Forcing, Nominations, RewardDestination, StakingLedger, ValidatorPrefs, }; +use codec::{FullCodec, FullEncode}; use sp_runtime::{Perbill, Percent}; use sp_staking::{EraIndex, ExposurePage, Page, PagedExposureMetadata, SessionIndex}; @@ -256,7 +257,7 @@ impl PalletMigration for StakingMigrator { None => StakingStage::ErasStakersPaged(None), } }, - /*StakingStage::ErasStakersPaged(progress) => { + StakingStage::ErasStakersPaged(progress) => { let mut iter = if let Some(progress) = progress { pallet_staking::ErasStakersPaged::::iter_from( pallet_staking::ErasStakersPaged::::hashed_key_for(progress), @@ -274,7 +275,7 @@ impl PalletMigration for StakingMigrator { era, validator: validator.clone(), page, - exposure, + exposure: exposure.into_portable(), }); StakingStage::ErasStakersPaged(Some((era, validator, page))) }, @@ -347,7 +348,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, points)) => { pallet_staking::ErasRewardPoints::::remove(&era); - messages.push(PortableStakingMessage::ErasRewardPoints { era, points }); + messages.push(PortableStakingMessage::ErasRewardPoints { era, points: points.into_portable() }); StakingStage::ErasRewardPoints(Some(era)) }, None => StakingStage::ErasTotalStake(None), @@ -379,7 +380,7 @@ impl PalletMigration for StakingMigrator { // Translate according to https://github.com/paritytech/polkadot-sdk/blob/43ea306f6307dff908551cb91099ef6268502ee0/substrate/frame/staking/src/migrations.rs#L94-L108 for slash in slashes.into_iter().take(1000) { // First 1000 slashes should be enough, just to avoid unbound loop - messages.push(PortableStakingMessage::UnappliedSlashes { era, slash }); + messages.push(PortableStakingMessage::UnappliedSlashes { era, slash: slash.into_portable() }); } StakingStage::UnappliedSlashes(Some(era)) }, @@ -445,10 +446,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((account, spans)) => { pallet_staking::SlashingSpans::::remove(&account); - messages.push(PortableStakingMessage::SlashingSpans { - account: account.clone(), - spans, - }); + // We do not migrate them. TODO @kianenigma review StakingStage::SlashingSpans(Some(account)) }, None => StakingStage::SpanSlash(None), @@ -460,11 +458,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some(((account, span), slash)) => { pallet_staking::SpanSlash::::remove((&account, &span)); - messages.push(PortableStakingMessage::SpanSlash { - account: account.clone(), - span, - slash, - }); + // We do not migrate them. TODO @kianenigma review StakingStage::SpanSlash(Some((account, span))) }, None => StakingStage::Finished, @@ -472,8 +466,7 @@ impl PalletMigration for StakingMigrator { }, StakingStage::Finished => { break; - },*/ - _ => todo!(), + }, }; } @@ -493,7 +486,7 @@ impl PalletMigration for StakingMigrator { } } -use codec::{FullCodec, FullEncode}; +/// Resume a storage map iterator from a key or start from the beginning if None. fn resume, K: FullEncode, V: FullCodec>( key: Option, ) -> impl Iterator { From eaa2b8df3b8f1df06a062b2e18b2e0260bba9d17 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 22 Jul 2025 12:16:26 +0200 Subject: [PATCH 04/14] fixes Signed-off-by: Oliver Tale-Yazdi --- .config/zepter.yaml | 2 +- pallets/ah-migrator/Cargo.toml | 3 - pallets/ah-migrator/src/lib.rs | 4 +- pallets/ah-migrator/src/staking/mod.rs | 1 - pallets/ah-migrator/src/staking/staking.rs | 44 ++- pallets/rc-migrator/Cargo.toml | 1 - pallets/rc-migrator/src/lib.rs | 9 - pallets/rc-migrator/src/staking/message.rs | 288 +++++++++++++++--- pallets/rc-migrator/src/staking/mod.rs | 3 - pallets/rc-migrator/src/staking/staking.rs | 42 +-- pallets/rc-migrator/src/types.rs | 18 +- relay/polkadot/Cargo.toml | 3 - .../asset-hubs/asset-hub-polkadot/Cargo.toml | 4 - 13 files changed, 308 insertions(+), 114 deletions(-) diff --git a/.config/zepter.yaml b/.config/zepter.yaml index dde8226f98..7db6967b9b 100644 --- a/.config/zepter.yaml +++ b/.config/zepter.yaml @@ -12,7 +12,7 @@ workflows: # Check that `A` activates the features of `B`. 'propagate-feature', # These are the features to check: - '--features=try-runtime,runtime-benchmarks,std,ahm-kusama,ahm-staking-migration,stable2503,ahm-staking-migration', + '--features=try-runtime,runtime-benchmarks,std,ahm-kusama,stable2503', # Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually. '--left-side-feature-missing=ignore', # Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on. diff --git a/pallets/ah-migrator/Cargo.toml b/pallets/ah-migrator/Cargo.toml index 5391da1871..8cbf1c155d 100644 --- a/pallets/ah-migrator/Cargo.toml +++ b/pallets/ah-migrator/Cargo.toml @@ -65,9 +65,6 @@ pallet-ah-ops = { workspace = true } [features] default = ["std"] -ahm-staking-migration = [ - "pallet-rc-migrator/ahm-staking-migration" -] std = [ "assets-common/std", "assets-common/std", diff --git a/pallets/ah-migrator/src/lib.rs b/pallets/ah-migrator/src/lib.rs index 24cf2d217c..74a0e34b13 100644 --- a/pallets/ah-migrator/src/lib.rs +++ b/pallets/ah-migrator/src/lib.rs @@ -79,8 +79,7 @@ use frame_system::pallet_prelude::*; use pallet_balances::{AccountData, Reasons as LockReasons}; use pallet_rc_migrator::{ bounties::RcBountiesMessageOf, claims::RcClaimsMessageOf, crowdloan::RcCrowdloanMessageOf, - treasury::RcTreasuryMessage, types::MigrationStatus, - staking::PortableStakingMessage, + staking::PortableStakingMessage, treasury::RcTreasuryMessage, types::MigrationStatus, }; use cumulus_primitives_core::AggregateMessageOrigin; @@ -859,7 +858,6 @@ pub mod pallet { Self::do_receive_delegated_staking_messages(messages).map_err(Into::into) } - #[cfg(feature = "ahm-staking-migration")] #[pallet::call_index(30)] #[pallet::weight({1})] // TODO: @ggwpez weight pub fn receive_staking_messages( diff --git a/pallets/ah-migrator/src/staking/mod.rs b/pallets/ah-migrator/src/staking/mod.rs index 6dd05e8c0f..ac3dd65deb 100644 --- a/pallets/ah-migrator/src/staking/mod.rs +++ b/pallets/ah-migrator/src/staking/mod.rs @@ -22,5 +22,4 @@ pub mod delegated_staking; pub mod fast_unstake; pub mod nom_pools; -#[cfg(feature = "ahm-staking-migration")] pub mod staking; diff --git a/pallets/ah-migrator/src/staking/staking.rs b/pallets/ah-migrator/src/staking/staking.rs index 2b02b116e0..7303399e0c 100644 --- a/pallets/ah-migrator/src/staking/staking.rs +++ b/pallets/ah-migrator/src/staking/staking.rs @@ -17,8 +17,7 @@ //! Pallet staking migration. use crate::*; -use pallet_rc_migrator::types::DefensiveTruncateInto; -use pallet_rc_migrator::staking::PortableStakingMessage; +use pallet_rc_migrator::{staking::PortableStakingMessage, types::DefensiveTruncateInto}; use sp_runtime::Perbill; impl Pallet { @@ -26,7 +25,9 @@ impl Pallet { pub fn staking_migration_finish_hook() {} - pub fn do_receive_staking_messages(messages: Vec) -> Result<(), Error> { + pub fn do_receive_staking_messages( + messages: Vec, + ) -> Result<(), Error> { let (mut good, mut bad) = (0, 0); log::info!(target: LOG_TARGET, "Integrating {} StakingMessages", messages.len()); Self::deposit_event(Event::BatchReceived { @@ -50,9 +51,7 @@ impl Pallet { Ok(()) } - fn do_receive_staking_message( - message: PortableStakingMessage, - ) -> Result<(), Error> { + fn do_receive_staking_message(message: PortableStakingMessage) -> Result<(), Error> { use PortableStakingMessage::*; match message { @@ -60,7 +59,7 @@ impl Pallet { log::debug!(target: LOG_TARGET, "Integrating StakingValues"); pallet_rc_migrator::staking::StakingMigrator::::put_values(values); }, - /*Invulnerables(invulnerables) => { + Invulnerables(invulnerables) => { log::debug!(target: LOG_TARGET, "Integrating StakingInvulnerables"); let bounded = BoundedVec::truncate_from(invulnerables); pallet_staking_async::Invulnerables::::put(bounded); @@ -71,18 +70,22 @@ impl Pallet { }, Ledger { controller, ledger } => { log::debug!(target: LOG_TARGET, "Integrating Ledger of controller {:?}", controller); + let ledger: pallet_staking_async::StakingLedger<_> = ledger.into(); pallet_staking_async::Ledger::::insert(controller, ledger); }, Payee { stash, payment } => { log::debug!(target: LOG_TARGET, "Integrating Payee of stash {:?}", stash); + let payment: pallet_staking_async::RewardDestination<_> = payment.into(); pallet_staking_async::Payee::::insert(stash, payment); }, Validators { stash, validators } => { log::debug!(target: LOG_TARGET, "Integrating Validators of stash {:?}", stash); + let validators: pallet_staking_async::ValidatorPrefs = validators.into(); pallet_staking_async::Validators::::insert(stash, validators); }, Nominators { stash, nominations } => { log::debug!(target: LOG_TARGET, "Integrating Nominators of stash {:?}", stash); + let nominations: pallet_staking_async::Nominations<_> = nominations.into(); pallet_staking_async::Nominators::::insert(stash, nominations); }, VirtualStakers(staker) => { @@ -91,10 +94,12 @@ impl Pallet { }, ErasStakersOverview { era, validator, exposure } => { log::debug!(target: LOG_TARGET, "Integrating ErasStakersOverview {:?}/{:?}", validator, era); + let exposure: sp_staking::PagedExposureMetadata<_> = exposure.into(); pallet_staking_async::ErasStakersOverview::::insert(era, validator, exposure); }, ErasStakersPaged { era, validator, page, exposure } => { log::debug!(target: LOG_TARGET, "Integrating ErasStakersPaged {:?}/{:?}/{:?}", validator, era, page); + let exposure: pallet_staking_async::BoundedExposurePage<_> = exposure.into(); pallet_staking_async::ErasStakersPaged::::insert( (era, validator, page), exposure, @@ -103,12 +108,16 @@ impl Pallet { ClaimedRewards { era, validator, rewards } => { // NOTE: This is being renamed from `ClaimedRewards` to `ErasClaimedRewards` log::debug!(target: LOG_TARGET, "Integrating ErasClaimedRewards {:?}/{:?}", validator, era); - let bounded = BoundedVec::<_, pallet_staking_async::ErasClaimedRewardsBound>::truncate_from(rewards); + let bounded = + BoundedVec::<_, pallet_staking_async::ClaimedRewardsBound>::truncate_from( + rewards, + ); let weak_bounded = WeakBoundedVec::force_from(bounded.into_inner(), None); - pallet_staking_async::ErasClaimedRewards::::insert(era, validator, weak_bounded); + pallet_staking_async::ClaimedRewards::::insert(era, validator, weak_bounded); }, ErasValidatorPrefs { era, validator, prefs } => { log::debug!(target: LOG_TARGET, "Integrating ErasValidatorPrefs {:?}/{:?}", validator, era); + let prefs: pallet_staking_async::ValidatorPrefs = prefs.into(); pallet_staking_async::ErasValidatorPrefs::::insert(era, validator, prefs); }, ErasValidatorReward { era, reward } => { @@ -117,6 +126,7 @@ impl Pallet { }, ErasRewardPoints { era, points } => { log::debug!(target: LOG_TARGET, "Integrating ErasRewardPoints of era {:?}", era); + let points: pallet_staking_async::EraRewardPoints<_> = points.into(); pallet_staking_async::ErasRewardPoints::::insert(era, points); }, ErasTotalStake { era, total_stake } => { @@ -126,30 +136,18 @@ impl Pallet { UnappliedSlashes { era, slash } => { log::debug!(target: LOG_TARGET, "Integrating UnappliedSlashes of era {:?}", era); let slash_key = (slash.validator.clone(), Perbill::from_percent(99), 9999); + let slash: pallet_staking_async::UnappliedSlash<_> = slash.into(); pallet_staking_async::UnappliedSlashes::::insert(era, slash_key, slash); }, BondedEras(bonded_eras) => { log::debug!(target: LOG_TARGET, "Integrating BondedEras"); - let bounded = BoundedVec::truncate_from(bonded_eras); // FIXME + let bounded = BoundedVec::truncate_from(bonded_eras); // TODO @ggwpez pallet_staking_async::BondedEras::::put(bounded); }, ValidatorSlashInEra { era, validator, slash } => { log::debug!(target: LOG_TARGET, "Integrating ValidatorSlashInEra {:?}/{:?}", validator, era); pallet_staking_async::ValidatorSlashInEra::::insert(era, validator, slash); }, - NominatorSlashInEra { era, validator, slash } => { - log::debug!(target: LOG_TARGET, "Integrating NominatorSlashInEra {:?}/{:?}", validator, era); - pallet_staking_async::NominatorSlashInEra::::insert(era, validator, slash); - }, - SlashingSpans { account, spans } => { - log::debug!(target: LOG_TARGET, "Integrating SlashingSpans {:?}", account); - pallet_staking_async::SlashingSpans::::insert(account, spans); - }, - SpanSlash { account, span, slash } => { - log::debug!(target: LOG_TARGET, "Integrating SpanSlash {:?}/{:?}", account, span); - pallet_staking_async::SpanSlash::::insert((account, span), slash); - },*/ - _ => todo!(), } Ok(()) diff --git a/pallets/rc-migrator/Cargo.toml b/pallets/rc-migrator/Cargo.toml index 894746c035..35f7069d0d 100644 --- a/pallets/rc-migrator/Cargo.toml +++ b/pallets/rc-migrator/Cargo.toml @@ -56,7 +56,6 @@ frame-election-provider-support = { workspace = true } [features] default = ["std"] -ahm-staking-migration = [] std = [ "codec/std", diff --git a/pallets/rc-migrator/src/lib.rs b/pallets/rc-migrator/src/lib.rs index 7f2318d75c..0e489891e1 100644 --- a/pallets/rc-migrator/src/lib.rs +++ b/pallets/rc-migrator/src/lib.rs @@ -345,9 +345,7 @@ pub enum MigrationStage< }, TreasuryMigrationDone, - #[cfg(feature = "ahm-staking-migration")] StakingMigrationInit, - #[cfg(feature = "ahm-staking-migration")] StakingMigrationOngoing { next_key: Option>, }, @@ -1003,7 +1001,6 @@ pub mod pallet { }, MigrationStage::Starting => { log::info!(target: LOG_TARGET, "Starting the migration"); - #[cfg(feature = "ahm-staking-migration")] pallet_staking_async_ah_client::Pallet::::on_migration_start(); Self::transition(MigrationStage::AccountsMigrationInit); @@ -1725,16 +1722,11 @@ pub mod pallet { } }, MigrationStage::TreasuryMigrationDone => { - #[cfg(feature = "ahm-staking-migration")] Self::transition(MigrationStage::StakingMigrationInit); - #[cfg(not(feature = "ahm-staking-migration"))] - Self::transition(MigrationStage::StakingMigrationDone); }, - #[cfg(feature = "ahm-staking-migration")] MigrationStage::StakingMigrationInit => { Self::transition(MigrationStage::StakingMigrationOngoing { next_key: None }); }, - #[cfg(feature = "ahm-staking-migration")] MigrationStage::StakingMigrationOngoing { next_key } => { let res = with_transaction_opaque_err::, Error, _>(|| { match staking::StakingMigrator::::migrate_many( @@ -1771,7 +1763,6 @@ pub mod pallet { .saturating_add(T::RcWeightInfo::send_chunked_xcm_and_track()) ); - #[cfg(feature = "ahm-staking-migration")] pallet_staking_async_ah_client::Pallet::::on_migration_end(); // Send finish message to AH. diff --git a/pallets/rc-migrator/src/staking/message.rs b/pallets/rc-migrator/src/staking/message.rs index 34e2773dac..49024f7267 100644 --- a/pallets/rc-migrator/src/staking/message.rs +++ b/pallets/rc-migrator/src/staking/message.rs @@ -20,16 +20,16 @@ extern crate alloc; use crate::{ staking::{AccountIdOf, BalanceOf, IntoAh, StakingMigrator}, - *, types::{defensive_vector_truncate, defensive_vector_translate}, + types::{defensive_vector_translate, defensive_vector_truncate, DefensiveTruncateInto}, + *, }; use alloc::collections::BTreeMap; use codec::{EncodeLike, HasCompact}; use core::fmt::Debug; pub use frame_election_provider_support::PageIndex; -use crate::types::DefensiveTruncateInto; use pallet_staking::{ - slashing::{SlashingSpans, SpanIndex, SpanRecord}, EraRewardPoints, Nominations, RewardDestination, StakingLedger, - ValidatorPrefs, + slashing::{SlashingSpans, SpanIndex, SpanRecord}, + EraRewardPoints, Nominations, RewardDestination, StakingLedger, }; use sp_runtime::{Perbill, Percent}; use sp_staking::{EraIndex, Page, SessionIndex}; @@ -47,8 +47,7 @@ use sp_staking::{EraIndex, Page, SessionIndex}; PartialEqNoBound, EqNoBound, )] -pub enum PortableStakingMessage -{ +pub enum PortableStakingMessage { Values(PortableStakingValues), Invulnerables(Vec), Bonded { @@ -66,7 +65,7 @@ pub enum PortableStakingMessage }, Validators { stash: AccountId32, - validators: ValidatorPrefs, + validators: PortableValidatorPrefs, }, Nominators { stash: AccountId32, @@ -92,7 +91,7 @@ pub enum PortableStakingMessage ErasValidatorPrefs { era: EraIndex, validator: AccountId32, - prefs: ValidatorPrefs, + prefs: PortableValidatorPrefs, }, ErasValidatorReward { era: EraIndex, @@ -116,11 +115,6 @@ pub enum PortableStakingMessage validator: AccountId32, slash: (Perbill, u128), }, - NominatorSlashInEra { - era: EraIndex, - validator: AccountId32, - slash: u128, - }, } #[derive(Encode, Decode, DecodeWithMemTracking, TypeInfo, RuntimeDebug, Clone, PartialEq, Eq)] @@ -160,7 +154,9 @@ impl StakingMigrator { max_nominators_count: MaxNominatorsCount::::take(), current_era: CurrentEra::::take(), active_era: ActiveEra::::take().map(IntoPortable::into_portable), - force_era: ForceEra::::exists().then(ForceEra::::take).map(IntoPortable::into_portable), + force_era: ForceEra::::exists() + .then(ForceEra::::take) + .map(IntoPortable::into_portable), max_staked_rewards: MaxStakedRewards::::take(), slash_reward_fraction: SlashRewardFraction::::exists() .then(SlashRewardFraction::::take), @@ -227,7 +223,7 @@ pub struct PortableActiveEraInfo { impl IntoPortable for pallet_staking::ActiveEraInfo { type Portable = PortableActiveEraInfo; - + fn into_portable(self) -> Self::Portable { PortableActiveEraInfo { index: self.index, start: self.start } } @@ -266,7 +262,7 @@ pub enum PortableForcing { // Forcing: RC -> Portable impl IntoPortable for pallet_staking::Forcing { type Portable = PortableForcing; - + fn into_portable(self) -> Self::Portable { match self { pallet_staking::Forcing::NotForcing => PortableForcing::NotForcing, @@ -315,16 +311,18 @@ pub struct PortableStakingLedger { /// Any balance that is becoming free, which may eventually be transferred out of the stash /// (assuming it doesn't get slashed first). It is assumed that this will be treated as a first /// in, first out queue where the new (higher value) eras get pushed on the back. - pub unlocking: BoundedVec>, // 100 is an upper bound TODO @kianenigma review + pub unlocking: BoundedVec>, /* 100 is an upper bound TODO + * @kianenigma review */ } +// StakingLedger: RC -> Portable impl IntoPortable for pallet_staking::StakingLedger { type Portable = PortableStakingLedger; - + fn into_portable(self) -> Self::Portable { // TODO @kianenigma what to do with `legacy_claimed_rewards`? - defensive_assert!(self.legacy_claimed_rewards.is_empty()); - + //defensive_assert!(self.legacy_claimed_rewards.is_empty()); + PortableStakingLedger { stash: self.stash, total: self.total, @@ -336,6 +334,28 @@ impl IntoPortable for pallet_staking::StakingLedger { } } +// StakingLedger: Portable -> AH +impl< + T: pallet_staking_async::Config + + frame_system::Config, + > Into> for PortableStakingLedger +{ + fn into(self) -> pallet_staking_async::StakingLedger { + pallet_staking_async::StakingLedger { + stash: self.stash, + total: self.total, + active: self.active, + unlocking: self + .unlocking + .into_iter() + .map(Into::into) + .collect::>() + .defensive_truncate_into(), + controller: None, // TODO @kianenigma review + } + } +} + #[derive( PartialEq, Eq, @@ -354,14 +374,22 @@ pub struct PortableUnlockChunk { pub era: EraIndex, } +// UnlockChunk: RC -> Portable impl IntoPortable for pallet_staking::UnlockChunk { type Portable = PortableUnlockChunk; - + fn into_portable(self) -> Self::Portable { PortableUnlockChunk { value: self.value, era: self.era } } } +// UnlockChunk: Portable -> AH +impl Into> for PortableUnlockChunk { + fn into(self) -> pallet_staking_async::UnlockChunk { + pallet_staking_async::UnlockChunk { value: self.value, era: self.era } + } +} + #[derive( PartialEq, Eq, @@ -379,16 +407,19 @@ pub struct PortableUnappliedSlash { /// The validator's own slash. pub own: u128, /// All other slashed stakers and amounts. - pub others: BoundedVec<(AccountId32, u128), ConstU32<100>>, // 100 is an upper bound TODO @kianenigma review + pub others: BoundedVec<(AccountId32, u128), ConstU32<100>>, /* 100 is an upper bound TODO + * @kianenigma review */ /// Reporters of the offence; bounty payout recipients. - pub reporters: BoundedVec>, // 100 is an upper bound TODO @kianenigma review + pub reporters: BoundedVec>, /* 100 is an upper bound TODO + * @kianenigma review */ /// The amount of payout. pub payout: u128, } +// UnappliedSlash: RC -> Portable impl IntoPortable for pallet_staking::UnappliedSlash { type Portable = PortableUnappliedSlash; - + fn into_portable(self) -> Self::Portable { PortableUnappliedSlash { validator: self.validator, @@ -400,6 +431,27 @@ impl IntoPortable for pallet_staking::UnappliedSlash { } } +// UnappliedSlash: Portable -> AH +impl< + T: pallet_staking_async::Config + + frame_system::Config, + > Into> for PortableUnappliedSlash +{ + fn into(self) -> pallet_staking_async::UnappliedSlash { + pallet_staking_async::UnappliedSlash { + validator: self.validator, + own: self.own, + // TODO @ggwpez cleanup + others: WeakBoundedVec::<_, _>::force_from( + self.others.into_iter().map(Into::into).collect::>(), + None, + ), + reporter: self.reporters.into_iter().next(), // TODO @kianenigma review + payout: self.payout, + } + } +} + #[derive( PartialEq, Eq, @@ -424,12 +476,13 @@ pub enum PortableRewardDestination { None, } +// RewardDestination: RC -> Portable impl IntoPortable for pallet_staking::RewardDestination { type Portable = PortableRewardDestination; - + fn into_portable(self) -> Self::Portable { use PortableRewardDestination::*; - + match self { RewardDestination::Staked => Staked, RewardDestination::Stash => Stash, @@ -440,12 +493,35 @@ impl IntoPortable for pallet_staking::RewardDestination { } } +// RewardDestination: Portable -> AH +impl Into> for PortableRewardDestination { + fn into(self) -> pallet_staking_async::RewardDestination { + use pallet_staking_async::RewardDestination::*; + match self { + PortableRewardDestination::Staked => Staked, + PortableRewardDestination::Stash => Stash, + PortableRewardDestination::Controller => Controller, + PortableRewardDestination::Account(account) => Account(account), + PortableRewardDestination::None => None, + } + } +} + #[derive( - PartialEqNoBound, EqNoBound, Clone, Encode, Decode, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen, DecodeWithMemTracking, + PartialEqNoBound, + EqNoBound, + Clone, + Encode, + Decode, + RuntimeDebugNoBound, + TypeInfo, + MaxEncodedLen, + DecodeWithMemTracking, )] pub struct PortableNominations { /// The targets of nomination. - pub targets: BoundedVec>, // 100 is an upper bound TODO @kianenigma review + pub targets: BoundedVec>, /* 100 is an upper bound TODO + * @kianenigma review */ /// The era the nominations were submitted. /// /// Except for initial nominations which are considered submitted at era 0. @@ -457,9 +533,10 @@ pub struct PortableNominations { pub suppressed: bool, } +// Nominations: RC -> Portable impl IntoPortable for pallet_staking::Nominations { type Portable = PortableNominations; - + fn into_portable(self) -> Self::Portable { PortableNominations { targets: defensive_vector_truncate(self.targets), @@ -469,6 +546,26 @@ impl IntoPortable for pallet_staking::Nominations { } } +// Nominations: Portable -> AH +impl> + Into> for PortableNominations +where + ::AccountId: From, +{ + fn into(self) -> pallet_staking_async::Nominations { + pallet_staking_async::Nominations { + targets: self + .targets + .into_iter() + .map(Into::into) + .collect::>() + .defensive_truncate_into(), + submitted_in: self.submitted_in, + suppressed: self.suppressed, + } + } +} + #[derive( PartialEq, Eq, @@ -494,9 +591,10 @@ pub struct PortablePagedExposureMetadata { pub page_count: Page, } +// PagedExposureMetadata: RC -> Portable impl IntoPortable for sp_staking::PagedExposureMetadata { type Portable = PortablePagedExposureMetadata; - + fn into_portable(self) -> Self::Portable { PortablePagedExposureMetadata { total: self.total, @@ -507,26 +605,79 @@ impl IntoPortable for sp_staking::PagedExposureMetadata { } } +// PagedExposureMetadata: Portable -> AH +impl Into> for PortablePagedExposureMetadata { + fn into(self) -> sp_staking::PagedExposureMetadata { + sp_staking::PagedExposureMetadata { + total: self.total, + own: self.own, + nominator_count: self.nominator_count, + page_count: self.page_count, + } + } +} + /// A snapshot of the stake backing a single validator in the system. -#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, RuntimeDebug, TypeInfo, DecodeWithMemTracking)] +#[derive( + PartialEq, + Eq, + PartialOrd, + Ord, + Clone, + Encode, + Decode, + RuntimeDebug, + TypeInfo, + DecodeWithMemTracking, +)] pub struct PortableExposurePage { /// The total balance of this chunk/page. pub page_total: u128, /// The portions of nominators stashes that are exposed. - pub others: BoundedVec>, // 100 is an upper bound TODO @kianenigma review + pub others: BoundedVec>, /* 600 is an upper bound + * TODO @kianenigma + * review */ } +// ExposurePage: RC -> Portable impl IntoPortable for sp_staking::ExposurePage { type Portable = PortableExposurePage; - + fn into_portable(self) -> Self::Portable { PortableExposurePage { page_total: self.page_total, - others: self.others.into_iter().map(IntoPortable::into_portable).collect::>().defensive_truncate_into(), + others: self + .others + .into_iter() + .map(IntoPortable::into_portable) + .collect::>() + .defensive_truncate_into(), + } + } +} + +// ExposurePage: Portable -> AH (part 1) +impl Into> for PortableExposurePage { + fn into(self) -> sp_staking::ExposurePage { + sp_staking::ExposurePage { + page_total: self.page_total, + others: self.others.into_iter().map(Into::into).collect::>(), } } } +// ExposurePage: Portable -> AH (part 2) +impl< + T: pallet_staking_async::Config + + frame_system::Config, + > Into> for PortableExposurePage +{ + fn into(self) -> pallet_staking_async::BoundedExposurePage { + let page: sp_staking::ExposurePage<_, _> = self.into(); + pallet_staking_async::BoundedExposurePage::from(page) + } +} + #[derive( PartialEq, Eq, @@ -546,14 +697,22 @@ pub struct PortableIndividualExposure { pub value: u128, } +// IndividualExposure: RC -> Portable impl IntoPortable for sp_staking::IndividualExposure { type Portable = PortableIndividualExposure; - + fn into_portable(self) -> Self::Portable { PortableIndividualExposure { who: self.who, value: self.value } } } +// IndividualExposure: Portable -> AH +impl Into> for PortableIndividualExposure { + fn into(self) -> sp_staking::IndividualExposure { + sp_staking::IndividualExposure { who: self.who, value: self.value } + } +} + #[derive( PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen, DecodeWithMemTracking, )] @@ -561,18 +720,21 @@ pub struct PortableEraRewardPoints { /// Total number of points. Equals the sum of reward points for each validator. pub total: u32, /// The reward points earned by a given validator. - pub individual: BoundedBTreeMap>, // 100 is an upper bound TODO @kianenigma review + pub individual: BoundedBTreeMap>, /* 100 is an upper bound + * TODO @kianenigma review */ } +// EraRewardPoints: RC -> Portable impl IntoPortable for pallet_staking::EraRewardPoints { type Portable = PortableEraRewardPoints; fn into_portable(self) -> Self::Portable { // TODO @ggwpez - if self.individual.len() > 100 { + if self.individual.len() > 600 { + log::error!(target: LOG_TARGET, "EraRewardPoints truncated from length {}", self.individual.len()); defensive!("EraRewardPoints truncated"); } - let individual = self.individual.into_iter().take(100).collect::>(); + let individual = self.individual.into_iter().take(600).collect::>(); PortableEraRewardPoints { total: self.total, @@ -580,3 +742,53 @@ impl IntoPortable for pallet_staking::EraRewardPoints { } } } + +// EraRewardPoints: Portable -> AH +impl< + T: pallet_staking_async::Config + + frame_system::Config, + > Into> for PortableEraRewardPoints +{ + fn into(self) -> pallet_staking_async::EraRewardPoints { + let individual = + self.individual.into_iter().map(|(k, v)| (k, v)).collect::>(); + + pallet_staking_async::EraRewardPoints { + total: self.total, + individual: BoundedBTreeMap::try_from(individual).defensive().unwrap_or_default(), + } + } +} + +#[derive( + PartialEq, + Eq, + PartialOrd, + Ord, + Clone, + Encode, + Decode, + DecodeWithMemTracking, + RuntimeDebug, + TypeInfo, +)] +pub struct PortableValidatorPrefs { + pub commission: Perbill, + pub blocked: bool, +} + +// ValidatorPrefs: RC -> Portable +impl IntoPortable for pallet_staking::ValidatorPrefs { + type Portable = PortableValidatorPrefs; + + fn into_portable(self) -> Self::Portable { + PortableValidatorPrefs { commission: self.commission, blocked: self.blocked } + } +} + +// ValidatorPrefs: Portable -> AH +impl Into for PortableValidatorPrefs { + fn into(self) -> pallet_staking_async::ValidatorPrefs { + pallet_staking_async::ValidatorPrefs { commission: self.commission, blocked: self.blocked } + } +} diff --git a/pallets/rc-migrator/src/staking/mod.rs b/pallets/rc-migrator/src/staking/mod.rs index 5d802753b3..8491199bcf 100644 --- a/pallets/rc-migrator/src/staking/mod.rs +++ b/pallets/rc-migrator/src/staking/mod.rs @@ -20,11 +20,8 @@ pub mod fast_unstake; pub mod nom_pools; pub mod nom_pools_alias; -#[cfg(feature = "ahm-staking-migration")] pub mod message; -#[cfg(feature = "ahm-staking-migration")] pub mod staking; -#[cfg(feature = "ahm-staking-migration")] pub use staking::*; // Copy&paster of Convert trait so that we can implement it here on external types diff --git a/pallets/rc-migrator/src/staking/staking.rs b/pallets/rc-migrator/src/staking/staking.rs index dee4b5608e..4abc470a39 100644 --- a/pallets/rc-migrator/src/staking/staking.rs +++ b/pallets/rc-migrator/src/staking/staking.rs @@ -17,17 +17,15 @@ //! Pallet staking migration. pub use crate::staking::message::PortableStakingMessage; -use crate::{staking::IntoAh, *}; -use codec::{EncodeLike, HasCompact}; +use crate::{staking::IntoAh, types::DefensiveTruncateInto, *}; +use codec::{EncodeLike, FullCodec, FullEncode, HasCompact}; use core::fmt::Debug; pub use frame_election_provider_support::PageIndex; -use crate::types::DefensiveTruncateInto; use pallet_staking::{ slashing::{SlashingSpans, SpanIndex, SpanRecord}, ActiveEraInfo, EraRewardPoints, Forcing, Nominations, RewardDestination, StakingLedger, ValidatorPrefs, }; -use codec::{FullCodec, FullEncode}; use sp_runtime::{Perbill, Percent}; use sp_staking::{EraIndex, ExposurePage, Page, PagedExposureMetadata, SessionIndex}; @@ -165,8 +163,10 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((stash, payment)) => { pallet_staking::Payee::::remove(&stash); - messages - .push(PortableStakingMessage::Payee { stash: stash.clone(), payment: payment.into_portable() }); + messages.push(PortableStakingMessage::Payee { + stash: stash.clone(), + payment: payment.into_portable(), + }); StakingStage::Payee(Some(stash)) }, None => StakingStage::Validators(None), @@ -186,7 +186,7 @@ impl PalletMigration for StakingMigrator { pallet_staking::Validators::::remove(&stash); messages.push(PortableStakingMessage::Validators { stash: stash.clone(), - validators, + validators: validators.into_portable(), }); StakingStage::Validators(Some(stash)) }, @@ -323,7 +323,7 @@ impl PalletMigration for StakingMigrator { messages.push(PortableStakingMessage::ErasValidatorPrefs { era, validator: validator.clone(), - prefs, + prefs: prefs.into_portable(), }); StakingStage::ErasValidatorPrefs(Some((era, validator))) }, @@ -336,7 +336,8 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, reward)) => { pallet_staking::ErasValidatorReward::::remove(&era); - messages.push(PortableStakingMessage::ErasValidatorReward { era, reward }); + messages + .push(PortableStakingMessage::ErasValidatorReward { era, reward }); StakingStage::ErasValidatorReward(Some(era)) }, None => StakingStage::ErasRewardPoints(None), @@ -348,7 +349,10 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, points)) => { pallet_staking::ErasRewardPoints::::remove(&era); - messages.push(PortableStakingMessage::ErasRewardPoints { era, points: points.into_portable() }); + messages.push(PortableStakingMessage::ErasRewardPoints { + era, + points: points.into_portable(), + }); StakingStage::ErasRewardPoints(Some(era)) }, None => StakingStage::ErasTotalStake(None), @@ -360,7 +364,8 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, total_stake)) => { pallet_staking::ErasTotalStake::::remove(&era); - messages.push(PortableStakingMessage::ErasTotalStake { era, total_stake }); + messages + .push(PortableStakingMessage::ErasTotalStake { era, total_stake }); StakingStage::ErasTotalStake(Some(era)) }, None => StakingStage::UnappliedSlashes(None), @@ -380,7 +385,10 @@ impl PalletMigration for StakingMigrator { // Translate according to https://github.com/paritytech/polkadot-sdk/blob/43ea306f6307dff908551cb91099ef6268502ee0/substrate/frame/staking/src/migrations.rs#L94-L108 for slash in slashes.into_iter().take(1000) { // First 1000 slashes should be enough, just to avoid unbound loop - messages.push(PortableStakingMessage::UnappliedSlashes { era, slash: slash.into_portable() }); + messages.push(PortableStakingMessage::UnappliedSlashes { + era, + slash: slash.into_portable(), + }); } StakingStage::UnappliedSlashes(Some(era)) }, @@ -430,11 +438,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, validator, slash)) => { pallet_staking::NominatorSlashInEra::::remove(&era, &validator); - messages.push(PortableStakingMessage::NominatorSlashInEra { - era, - validator: validator.clone(), - slash, - }); + // Not migrated. TODO @kianenigma review StakingStage::NominatorSlashInEra(Some((era, validator))) }, None => StakingStage::SlashingSpans(None), @@ -446,7 +450,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((account, spans)) => { pallet_staking::SlashingSpans::::remove(&account); - // We do not migrate them. TODO @kianenigma review + // Not migrated. TODO @kianenigma review StakingStage::SlashingSpans(Some(account)) }, None => StakingStage::SpanSlash(None), @@ -458,7 +462,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some(((account, span), slash)) => { pallet_staking::SpanSlash::::remove((&account, &span)); - // We do not migrate them. TODO @kianenigma review + // Not migrated. TODO @kianenigma review StakingStage::SpanSlash(Some((account, span))) }, None => StakingStage::Finished, diff --git a/pallets/rc-migrator/src/types.rs b/pallets/rc-migrator/src/types.rs index d1ceff2389..975e480b88 100644 --- a/pallets/rc-migrator/src/types.rs +++ b/pallets/rc-migrator/src/types.rs @@ -67,11 +67,18 @@ impl> DefensiveTruncateInto for T { } /// Translate and truncate the elements of a bounded vector defensively. -pub fn defensive_vector_translate, Bs: Get>(vec: BoundedVec) -> BoundedVec { - vec.into_iter().map(|e| e.into_portable()).collect::>().defensive_truncate_into() -} - -pub fn defensive_vector_truncate, Bs: Get>(vec: BoundedVec) -> BoundedVec { +pub fn defensive_vector_translate, Bs: Get>( + vec: BoundedVec, +) -> BoundedVec { + vec.into_iter() + .map(|e| e.into_portable()) + .collect::>() + .defensive_truncate_into() +} + +pub fn defensive_vector_truncate, Bs: Get>( + vec: BoundedVec, +) -> BoundedVec { vec.into_iter().collect::>().defensive_truncate_into() } @@ -161,7 +168,6 @@ pub enum AhMigratorCall { messages: Vec>, }, #[codec(index = 30)] - #[cfg(feature = "ahm-staking-migration")] // Staking migration not yet enabled ReceiveStakingMessages { messages: Vec }, #[codec(index = 101)] StartMigration, diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 0e8e21eb3b..92c794c9e6 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -133,9 +133,6 @@ substrate-wasm-builder = { workspace = true, optional = true } default = ["std"] no_std = [] paseo = [] # For Paseo AHM -ahm-staking-migration = [ - "pallet-rc-migrator/ahm-staking-migration" -] std = [ "pallet-rc-migrator/std", diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index a35b47ae7a..db51f95088 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -141,10 +141,6 @@ substrate-wasm-builder = { optional = true, workspace = true } [features] default = ["std"] paseo = [] # For Paseo AHM -ahm-staking-migration = [ - "pallet-ah-migrator/ahm-staking-migration", - "pallet-rc-migrator/ahm-staking-migration" -] runtime-benchmarks = [ "assets-common/runtime-benchmarks", From 17259bcb5b2207885d12c5120100130c958ddada Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 22 Jul 2025 12:46:38 +0200 Subject: [PATCH 05/14] beauty Signed-off-by: Oliver Tale-Yazdi --- pallets/ah-migrator/src/staking/staking.rs | 11 +-- pallets/rc-migrator/src/staking/message.rs | 79 ++++------------------ 2 files changed, 17 insertions(+), 73 deletions(-) diff --git a/pallets/ah-migrator/src/staking/staking.rs b/pallets/ah-migrator/src/staking/staking.rs index 7303399e0c..9a29c56f7d 100644 --- a/pallets/ah-migrator/src/staking/staking.rs +++ b/pallets/ah-migrator/src/staking/staking.rs @@ -21,10 +21,6 @@ use pallet_rc_migrator::{staking::PortableStakingMessage, types::DefensiveTrunca use sp_runtime::Perbill; impl Pallet { - pub fn staking_migration_start_hook() {} - - pub fn staking_migration_finish_hook() {} - pub fn do_receive_staking_messages( messages: Vec, ) -> Result<(), Error> { @@ -61,7 +57,7 @@ impl Pallet { }, Invulnerables(invulnerables) => { log::debug!(target: LOG_TARGET, "Integrating StakingInvulnerables"); - let bounded = BoundedVec::truncate_from(invulnerables); + let bounded: BoundedVec<_, _> = invulnerables.defensive_truncate_into(); pallet_staking_async::Invulnerables::::put(bounded); }, Bonded { stash, controller } => { @@ -106,10 +102,9 @@ impl Pallet { ); }, ClaimedRewards { era, validator, rewards } => { - // NOTE: This is being renamed from `ClaimedRewards` to `ErasClaimedRewards` log::debug!(target: LOG_TARGET, "Integrating ErasClaimedRewards {:?}/{:?}", validator, era); let bounded = - BoundedVec::<_, pallet_staking_async::ClaimedRewardsBound>::truncate_from( + BoundedVec::<_, pallet_staking_async::ClaimedRewardsBound>::defensive_truncate_from( rewards, ); let weak_bounded = WeakBoundedVec::force_from(bounded.into_inner(), None); @@ -141,7 +136,7 @@ impl Pallet { }, BondedEras(bonded_eras) => { log::debug!(target: LOG_TARGET, "Integrating BondedEras"); - let bounded = BoundedVec::truncate_from(bonded_eras); // TODO @ggwpez + let bounded: BoundedVec<_, _> = bonded_eras.defensive_truncate_into(); pallet_staking_async::BondedEras::::put(bounded); }, ValidatorSlashInEra { era, validator, slash } => { diff --git a/pallets/rc-migrator/src/staking/message.rs b/pallets/rc-migrator/src/staking/message.rs index 49024f7267..512b070b58 100644 --- a/pallets/rc-migrator/src/staking/message.rs +++ b/pallets/rc-migrator/src/staking/message.rs @@ -117,6 +117,7 @@ pub enum PortableStakingMessage { }, } +/// Generic staking storage values. #[derive(Encode, Decode, DecodeWithMemTracking, TypeInfo, RuntimeDebug, Clone, PartialEq, Eq)] pub struct StakingValues { pub validator_count: Option, @@ -170,6 +171,7 @@ impl StakingMigrator { } impl StakingMigrator { + /// Put the values into the storage. pub fn put_values(values: StakingValues>) { use pallet_staking_async::*; @@ -212,12 +214,7 @@ pub type PortableStakingValues = StakingValues; MaxEncodedLen, )] pub struct PortableActiveEraInfo { - /// Index of era. pub index: EraIndex, - /// Moment of start expressed as millisecond from `$UNIX_EPOCH`. - /// - /// Start can be none if start hasn't been set for the era yet, - /// Start is set on the first on_finalize of the era to guarantee usage of `Time`. pub start: Option, } @@ -247,15 +244,9 @@ impl Into for PortableActiveEraInfo { MaxEncodedLen, )] pub enum PortableForcing { - /// Not forcing anything - just let whatever happen. NotForcing, - /// Force a new era, then reset to `NotForcing` as soon as it is done. - /// Note that this will force to trigger an election until a new era is triggered, if the - /// election failed, the next session end will trigger a new election again, until success. ForceNew, - /// Avoid a new era indefinitely. ForceNone, - /// Force a new era at the end of all sessions indefinitely. ForceAlways, } @@ -297,20 +288,9 @@ impl Into for PortableForcing { MaxEncodedLen, )] pub struct PortableStakingLedger { - /// The stash account whose balance is actually locked and at stake. pub stash: AccountId32, - - /// The total amount of the stash's balance that we are currently accounting for. - /// It's just `active` plus all the `unlocking` balances. pub total: u128, - - /// The total amount of the stash's balance that will be at stake in any forthcoming - /// rounds. pub active: u128, - - /// Any balance that is becoming free, which may eventually be transferred out of the stash - /// (assuming it doesn't get slashed first). It is assumed that this will be treated as a first - /// in, first out queue where the new (higher value) eras get pushed on the back. pub unlocking: BoundedVec>, /* 100 is an upper bound TODO * @kianenigma review */ } @@ -368,9 +348,7 @@ impl< MaxEncodedLen, )] pub struct PortableUnlockChunk { - /// Amount of funds to be unlocked. pub value: u128, - /// Era number at which point it'll be unlocked. pub era: EraIndex, } @@ -402,17 +380,12 @@ impl Into> for PortableUnlockChunk { MaxEncodedLen, )] pub struct PortableUnappliedSlash { - /// The stash ID of the offending validator. pub validator: AccountId32, - /// The validator's own slash. pub own: u128, - /// All other slashed stakers and amounts. pub others: BoundedVec<(AccountId32, u128), ConstU32<100>>, /* 100 is an upper bound TODO * @kianenigma review */ - /// Reporters of the offence; bounty payout recipients. pub reporters: BoundedVec>, /* 100 is an upper bound TODO * @kianenigma review */ - /// The amount of payout. pub payout: u128, } @@ -438,12 +411,15 @@ impl< > Into> for PortableUnappliedSlash { fn into(self) -> pallet_staking_async::UnappliedSlash { + if self.others.len() > T::MaxExposurePageSize::get() as usize { + defensive!("UnappliedSlash longer than the weak bound"); + } + pallet_staking_async::UnappliedSlash { validator: self.validator, own: self.own, - // TODO @ggwpez cleanup - others: WeakBoundedVec::<_, _>::force_from( - self.others.into_iter().map(Into::into).collect::>(), + others: WeakBoundedVec::<_, T::MaxExposurePageSize>::force_from( + self.others.into_inner(), None, ), reporter: self.reporters.into_iter().next(), // TODO @kianenigma review @@ -464,15 +440,10 @@ impl< MaxEncodedLen, )] pub enum PortableRewardDestination { - /// Pay into the stash account, increasing the amount at stake accordingly. Staked, - /// Pay into the stash account, not increasing the amount at stake. Stash, - /// Deprecated Controller, - /// Pay into a specified account. Account(AccountId32), - /// Receive no reward. None, } @@ -519,17 +490,9 @@ impl Into> for PortableRewa DecodeWithMemTracking, )] pub struct PortableNominations { - /// The targets of nomination. pub targets: BoundedVec>, /* 100 is an upper bound TODO * @kianenigma review */ - /// The era the nominations were submitted. - /// - /// Except for initial nominations which are considered submitted at era 0. pub submitted_in: EraIndex, - /// Whether the nominations have been suppressed. This can happen due to slashing of the - /// validators, or other events that might invalidate the nomination. - /// - /// NOTE: this for future proofing and is thus far not used. pub suppressed: bool, } @@ -581,13 +544,9 @@ where DecodeWithMemTracking, )] pub struct PortablePagedExposureMetadata { - /// The total balance backing this validator. pub total: u128, - /// The validator's own stash that is exposed. pub own: u128, - /// Number of nominators backing this validator. pub nominator_count: u32, - /// Number of pages of nominators. pub page_count: Page, } @@ -631,9 +590,7 @@ impl Into> for PortablePagedExposureMeta DecodeWithMemTracking, )] pub struct PortableExposurePage { - /// The total balance of this chunk/page. pub page_total: u128, - /// The portions of nominators stashes that are exposed. pub others: BoundedVec>, /* 600 is an upper bound * TODO @kianenigma * review */ @@ -691,9 +648,7 @@ impl< TypeInfo, )] pub struct PortableIndividualExposure { - /// The stash account of the nominator in question. pub who: AccountId32, - /// Amount of funds exposed. pub value: u128, } @@ -717,10 +672,8 @@ impl Into> for PortableIndivid PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen, DecodeWithMemTracking, )] pub struct PortableEraRewardPoints { - /// Total number of points. Equals the sum of reward points for each validator. pub total: u32, - /// The reward points earned by a given validator. - pub individual: BoundedBTreeMap>, /* 100 is an upper bound + pub individual: BoundedVec<(AccountId32, u32), ConstU32<600>>, /* 100 is an upper bound * TODO @kianenigma review */ } @@ -729,16 +682,11 @@ impl IntoPortable for pallet_staking::EraRewardPoints { type Portable = PortableEraRewardPoints; fn into_portable(self) -> Self::Portable { - // TODO @ggwpez - if self.individual.len() > 600 { - log::error!(target: LOG_TARGET, "EraRewardPoints truncated from length {}", self.individual.len()); - defensive!("EraRewardPoints truncated"); - } - let individual = self.individual.into_iter().take(600).collect::>(); + let individual: BoundedVec<_, ConstU32<600>> = self.individual.into_iter().collect::>().defensive_truncate_into(); PortableEraRewardPoints { total: self.total, - individual: BoundedBTreeMap::try_from(individual).defensive().unwrap_or_default(), + individual, } } } @@ -751,11 +699,12 @@ impl< { fn into(self) -> pallet_staking_async::EraRewardPoints { let individual = - self.individual.into_iter().map(|(k, v)| (k, v)).collect::>(); + self.individual.into_iter().take(T::MaxValidatorSet::get() as usize).collect::>(); + let bounded = BoundedBTreeMap::<_, _, T::MaxValidatorSet>::try_from(individual).defensive().unwrap_or_default(); pallet_staking_async::EraRewardPoints { total: self.total, - individual: BoundedBTreeMap::try_from(individual).defensive().unwrap_or_default(), + individual: bounded, } } } From 41733a401752a06c88be6ca1ad00081d863f5fc5 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 22 Jul 2025 13:35:31 +0200 Subject: [PATCH 06/14] fix Signed-off-by: Oliver Tale-Yazdi --- pallets/rc-migrator/src/staking/message.rs | 42 +++++++++++-------- pallets/rc-migrator/src/staking/mod.rs | 7 ---- pallets/rc-migrator/src/staking/staking.rs | 2 +- pallets/rc-migrator/src/types.rs | 16 ------- relay/polkadot/Cargo.toml | 1 - .../asset-hubs/asset-hub-polkadot/Cargo.toml | 1 - 6 files changed, 25 insertions(+), 44 deletions(-) diff --git a/pallets/rc-migrator/src/staking/message.rs b/pallets/rc-migrator/src/staking/message.rs index 512b070b58..c6f672034c 100644 --- a/pallets/rc-migrator/src/staking/message.rs +++ b/pallets/rc-migrator/src/staking/message.rs @@ -19,8 +19,8 @@ extern crate alloc; use crate::{ - staking::{AccountIdOf, BalanceOf, IntoAh, StakingMigrator}, - types::{defensive_vector_translate, defensive_vector_truncate, DefensiveTruncateInto}, + staking::{AccountIdOf, BalanceOf, StakingMigrator}, + types::DefensiveTruncateInto, *, }; use alloc::collections::BTreeMap; @@ -307,7 +307,12 @@ impl IntoPortable for pallet_staking::StakingLedger { stash: self.stash, total: self.total, active: self.active, - unlocking: defensive_vector_translate(self.unlocking), + unlocking: self + .unlocking + .into_iter() + .map(IntoPortable::into_portable) + .collect::>() + .defensive_truncate_into(), // TODO @kianenigma controller is ignored, right? // self.controller, } @@ -451,6 +456,7 @@ pub enum PortableRewardDestination { impl IntoPortable for pallet_staking::RewardDestination { type Portable = PortableRewardDestination; + #[allow(deprecated)] fn into_portable(self) -> Self::Portable { use PortableRewardDestination::*; @@ -502,7 +508,7 @@ impl IntoPortable for pallet_staking::Nominations { fn into_portable(self) -> Self::Portable { PortableNominations { - targets: defensive_vector_truncate(self.targets), + targets: self.targets.into_inner().defensive_truncate_into(), submitted_in: self.submitted_in, suppressed: self.suppressed, } @@ -674,7 +680,7 @@ impl Into> for PortableIndivid pub struct PortableEraRewardPoints { pub total: u32, pub individual: BoundedVec<(AccountId32, u32), ConstU32<600>>, /* 100 is an upper bound - * TODO @kianenigma review */ + * TODO @kianenigma review */ } // EraRewardPoints: RC -> Portable @@ -682,12 +688,10 @@ impl IntoPortable for pallet_staking::EraRewardPoints { type Portable = PortableEraRewardPoints; fn into_portable(self) -> Self::Portable { - let individual: BoundedVec<_, ConstU32<600>> = self.individual.into_iter().collect::>().defensive_truncate_into(); + let individual: BoundedVec<_, ConstU32<600>> = + self.individual.into_iter().collect::>().defensive_truncate_into(); - PortableEraRewardPoints { - total: self.total, - individual, - } + PortableEraRewardPoints { total: self.total, individual } } } @@ -698,14 +702,16 @@ impl< > Into> for PortableEraRewardPoints { fn into(self) -> pallet_staking_async::EraRewardPoints { - let individual = - self.individual.into_iter().take(T::MaxValidatorSet::get() as usize).collect::>(); - let bounded = BoundedBTreeMap::<_, _, T::MaxValidatorSet>::try_from(individual).defensive().unwrap_or_default(); - - pallet_staking_async::EraRewardPoints { - total: self.total, - individual: bounded, - } + let individual = self + .individual + .into_iter() + .take(T::MaxValidatorSet::get() as usize) + .collect::>(); + let bounded = BoundedBTreeMap::<_, _, T::MaxValidatorSet>::try_from(individual) + .defensive() + .unwrap_or_default(); + + pallet_staking_async::EraRewardPoints { total: self.total, individual: bounded } } } diff --git a/pallets/rc-migrator/src/staking/mod.rs b/pallets/rc-migrator/src/staking/mod.rs index 8491199bcf..cfe32e3f18 100644 --- a/pallets/rc-migrator/src/staking/mod.rs +++ b/pallets/rc-migrator/src/staking/mod.rs @@ -23,10 +23,3 @@ pub mod nom_pools_alias; pub mod message; pub mod staking; pub use staking::*; - -// Copy&paster of Convert trait so that we can implement it here on external types -/// Infallible conversion trait. Generic over both source and destination types. -pub trait IntoAh { - /// Make conversion. - fn intoAh(a: A) -> B; -} diff --git a/pallets/rc-migrator/src/staking/staking.rs b/pallets/rc-migrator/src/staking/staking.rs index 4abc470a39..d4f57f3a45 100644 --- a/pallets/rc-migrator/src/staking/staking.rs +++ b/pallets/rc-migrator/src/staking/staking.rs @@ -17,7 +17,7 @@ //! Pallet staking migration. pub use crate::staking::message::PortableStakingMessage; -use crate::{staking::IntoAh, types::DefensiveTruncateInto, *}; +use crate::{types::DefensiveTruncateInto, *}; use codec::{EncodeLike, FullCodec, FullEncode, HasCompact}; use core::fmt::Debug; pub use frame_election_provider_support::PageIndex; diff --git a/pallets/rc-migrator/src/types.rs b/pallets/rc-migrator/src/types.rs index 975e480b88..38a56c02be 100644 --- a/pallets/rc-migrator/src/types.rs +++ b/pallets/rc-migrator/src/types.rs @@ -66,22 +66,6 @@ impl> DefensiveTruncateInto for T { } } -/// Translate and truncate the elements of a bounded vector defensively. -pub fn defensive_vector_translate, Bs: Get>( - vec: BoundedVec, -) -> BoundedVec { - vec.into_iter() - .map(|e| e.into_portable()) - .collect::>() - .defensive_truncate_into() -} - -pub fn defensive_vector_truncate, Bs: Get>( - vec: BoundedVec, -) -> BoundedVec { - vec.into_iter().collect::>().defensive_truncate_into() -} - /// Generate a default instance for benchmarking purposes. pub trait BenchmarkingDefault { /// Default for benchmarking purposes only. diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 92c794c9e6..a5875ec7e8 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -133,7 +133,6 @@ substrate-wasm-builder = { workspace = true, optional = true } default = ["std"] no_std = [] paseo = [] # For Paseo AHM - std = [ "pallet-rc-migrator/std", diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index db51f95088..5d76017b7a 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -141,7 +141,6 @@ substrate-wasm-builder = { optional = true, workspace = true } [features] default = ["std"] paseo = [] # For Paseo AHM - runtime-benchmarks = [ "assets-common/runtime-benchmarks", "bp-asset-hub-kusama/runtime-benchmarks", From d10e8f0311baa6384fe5162932be695207c936c0 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 22 Jul 2025 17:08:31 +0200 Subject: [PATCH 07/14] tests Signed-off-by: Oliver Tale-Yazdi --- integration-tests/ahm/src/tests.rs | 4 +- pallets/ah-migrator/src/staking/checks.rs | 129 ++++++++++++++++++++++ pallets/ah-migrator/src/staking/mod.rs | 3 +- pallets/rc-migrator/src/staking/checks.rs | 100 +++++++++++++++++ pallets/rc-migrator/src/staking/mod.rs | 8 +- 5 files changed, 240 insertions(+), 4 deletions(-) create mode 100644 pallets/ah-migrator/src/staking/checks.rs create mode 100644 pallets/rc-migrator/src/staking/checks.rs diff --git a/integration-tests/ahm/src/tests.rs b/integration-tests/ahm/src/tests.rs index 9908fa3670..974dc555d2 100644 --- a/integration-tests/ahm/src/tests.rs +++ b/integration-tests/ahm/src/tests.rs @@ -57,7 +57,7 @@ use pallet_ah_migrator::{ MigrationStage as AhMigrationStage, }; use pallet_rc_migrator::{ - types::RcMigrationCheck, MigrationStage as RcMigrationStage, + staking::StakingMigratedCorrectly, types::RcMigrationCheck, MigrationStage as RcMigrationStage, RcMigrationStage as RcMigrationStageStorage, }; use polkadot_primitives::UpwardMessage; @@ -107,6 +107,7 @@ pub type RcPolkadotChecks = ( pallet_rc_migrator::claims::ClaimsMigrator, pallet_rc_migrator::crowdloan::CrowdloanMigrator, ProxyWhaleWatching, + StakingMigratedCorrectly, ); type AhChecks = ( @@ -144,6 +145,7 @@ pub type AhPolkadotChecks = ( pallet_rc_migrator::claims::ClaimsMigrator, pallet_rc_migrator::crowdloan::CrowdloanMigrator, ProxyWhaleWatching, + StakingMigratedCorrectly, ); #[ignore] // we use the equivalent [migration_works_time] test instead diff --git a/pallets/ah-migrator/src/staking/checks.rs b/pallets/ah-migrator/src/staking/checks.rs new file mode 100644 index 0000000000..b1bd4f28ef --- /dev/null +++ b/pallets/ah-migrator/src/staking/checks.rs @@ -0,0 +1,129 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Checks that the staking migration succeeded. + +use pallet_rc_migrator::staking::{message::PortableNominations, PortableStakingMessage, RcData}; +use sp_runtime::AccountId32; + +impl crate::types::AhMigrationCheck + for pallet_rc_migrator::staking::StakingMigratedCorrectly +{ + type RcPrePayload = RcData; + type AhPrePayload = (); + + fn pre_check(_rc: Self::RcPrePayload) -> Self::AhPrePayload {} + + fn post_check(rc: Self::RcPrePayload, _ah_pre_payload: Self::AhPrePayload) { + // Storage Values + assert_eq!(rc.validator_count, pallet_staking_async::ValidatorCount::::get()); + // Min validator count is not migrated @kianenigma review + assert_eq!(rc.min_nominator_bond, pallet_staking_async::MinNominatorBond::::get()); + assert_eq!(rc.min_validator_bond, pallet_staking_async::MinValidatorBond::::get()); + assert_eq!(rc.min_active_stake, pallet_staking_async::MinimumActiveStake::::get()); + assert_eq!(rc.min_commission, pallet_staking_async::MinCommission::::get()); + assert_eq!(rc.max_validators_count, pallet_staking_async::MaxValidatorsCount::::get()); + assert_eq!(rc.max_nominators_count, pallet_staking_async::MaxNominatorsCount::::get()); + //assert_eq!(rc.current_era, pallet_staking_async::CurrentEra::::get()); + assert_eq!( + rc.active_era.map(translate_active_era), + pallet_staking_async::ActiveEra::::get() + ); + assert_eq!(translate_forcing(rc.force_era), pallet_staking_async::ForceEra::::get()); + assert_eq!(rc.max_staked_rewards, pallet_staking_async::MaxStakedRewards::::get()); + assert_eq!(rc.slash_reward_fraction, pallet_staking_async::SlashRewardFraction::::get()); + assert_eq!(rc.canceled_slash_payout, pallet_staking_async::CanceledSlashPayout::::get()); + // Current planned session is not migrated @kianenigma review + assert_eq!(rc.chill_threshold, pallet_staking_async::ChillThreshold::::get()); + + // Storage Maps + assert_eq!(rc.invulnerables, pallet_staking_async::Invulnerables::::get().into_inner()); + assert_eq!(rc.bonded, pallet_staking_async::Bonded::::iter().collect::>()); + assert_eq!( + rc.ledger.into_iter().map(|(k, v)| (k, v.into())).collect::>(), + pallet_staking_async::Ledger::::iter().collect::>() + ); + assert_eq!( + rc.payee + .into_iter() + .map(|(k, v)| (k, translate_reward_destination(v))) + .collect::>(), + pallet_staking_async::Payee::::iter().collect::>() + ); + assert_eq!( + rc.validators + .into_iter() + .map(|(k, v)| (k, translate_validator_prefs(v))) + .collect::>(), + pallet_staking_async::Validators::::iter().collect::>() + ); + assert_eq!( + rc.nominators + .into_iter() + .map(|(k, v)| (k, translate_nominations(v))) + .collect::>(), + pallet_staking_async::Nominators::::iter().collect::>() + ); + assert_eq!( + rc.virtual_stakers, + pallet_staking_async::VirtualStakers::::iter_keys().collect::>() + ); + } +} + +fn translate_reward_destination( + destination: pallet_staking::RewardDestination, +) -> pallet_staking_async::RewardDestination { + use pallet_staking_async::RewardDestination::*; + + match destination { + pallet_staking::RewardDestination::Staked => Staked, + pallet_staking::RewardDestination::Stash => Stash, + pallet_staking::RewardDestination::Controller => Controller, + pallet_staking::RewardDestination::Account(account) => Account(account), + pallet_staking::RewardDestination::None => None, + } +} + +fn translate_active_era(era: pallet_staking::ActiveEraInfo) -> pallet_staking_async::ActiveEraInfo { + pallet_staking_async::ActiveEraInfo { index: era.index, start: era.start } +} + +fn translate_forcing(forcing: pallet_staking::Forcing) -> pallet_staking_async::Forcing { + use pallet_staking_async::Forcing; + match forcing { + pallet_staking::Forcing::NotForcing => Forcing::NotForcing, + pallet_staking::Forcing::ForceNew => Forcing::ForceNew, + pallet_staking::Forcing::ForceNone => Forcing::ForceNone, + pallet_staking::Forcing::ForceAlways => Forcing::ForceAlways, + } +} + +fn translate_validator_prefs( + prefs: pallet_staking::ValidatorPrefs, +) -> pallet_staking_async::ValidatorPrefs { + pallet_staking_async::ValidatorPrefs { commission: prefs.commission, blocked: prefs.blocked } +} + +fn translate_nominations( + nominations: PortableNominations, +) -> pallet_staking_async::Nominations { + pallet_staking_async::Nominations { + targets: nominations.targets.into_inner().try_into().expect("Must not truncate"), + submitted_in: nominations.submitted_in, + suppressed: nominations.suppressed, + } +} diff --git a/pallets/ah-migrator/src/staking/mod.rs b/pallets/ah-migrator/src/staking/mod.rs index ac3dd65deb..b8764506e4 100644 --- a/pallets/ah-migrator/src/staking/mod.rs +++ b/pallets/ah-migrator/src/staking/mod.rs @@ -18,8 +18,9 @@ //! Staking migration logic. pub mod bags_list; +#[cfg(feature = "std")] +pub mod checks; pub mod delegated_staking; pub mod fast_unstake; pub mod nom_pools; - pub mod staking; diff --git a/pallets/rc-migrator/src/staking/checks.rs b/pallets/rc-migrator/src/staking/checks.rs new file mode 100644 index 0000000000..b198e4c86a --- /dev/null +++ b/pallets/rc-migrator/src/staking/checks.rs @@ -0,0 +1,100 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Checks that the staking migration succeeded. + +use crate::{ + staking::{ + message::{PortableForcing, PortableNominations, PortableStakingLedger, StakingValues}, + PortableStakingMessage, + }, + types::IntoPortable, + BalanceOf, +}; +use pallet_staking::Pallet as Staking; +use sp_runtime::{AccountId32, Perbill, Percent}; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RcData { + // Storage Values + pub validator_count: u32, + pub min_validator_count: u32, + pub min_nominator_bond: u128, + pub min_validator_bond: u128, + pub min_active_stake: u128, + pub min_commission: Perbill, + pub max_validators_count: Option, + pub max_nominators_count: Option, + pub current_era: Option, + pub active_era: Option, + pub force_era: pallet_staking::Forcing, + pub max_staked_rewards: Option, + pub slash_reward_fraction: Perbill, + pub canceled_slash_payout: u128, + pub current_planned_session: u32, + pub chill_threshold: Option, + // Storage Maps + pub invulnerables: Vec, + pub bonded: Vec<(AccountId32, AccountId32)>, + pub ledger: Vec<(AccountId32, PortableStakingLedger)>, + pub payee: Vec<(AccountId32, pallet_staking::RewardDestination)>, + pub validators: Vec<(AccountId32, pallet_staking::ValidatorPrefs)>, + pub nominators: Vec<(AccountId32, PortableNominations)>, + pub virtual_stakers: Vec, +} + +pub struct StakingMigratedCorrectly(pub core::marker::PhantomData); + +impl crate::types::RcMigrationCheck for StakingMigratedCorrectly { + type RcPrePayload = RcData; + + fn pre_check() -> Self::RcPrePayload { + RcData { + // Storage Values + validator_count: pallet_staking::ValidatorCount::::get(), + min_validator_count: pallet_staking::MinimumValidatorCount::::get(), + min_nominator_bond: pallet_staking::MinNominatorBond::::get(), + min_validator_bond: pallet_staking::MinValidatorBond::::get(), + min_active_stake: pallet_staking::MinimumActiveStake::::get(), + min_commission: pallet_staking::MinCommission::::get(), + max_validators_count: pallet_staking::MaxValidatorsCount::::get(), + max_nominators_count: pallet_staking::MaxNominatorsCount::::get(), + current_era: pallet_staking::CurrentEra::::get(), + active_era: pallet_staking::ActiveEra::::get(), + force_era: pallet_staking::ForceEra::::get(), + max_staked_rewards: pallet_staking::MaxStakedRewards::::get(), + slash_reward_fraction: pallet_staking::SlashRewardFraction::::get(), + canceled_slash_payout: pallet_staking::CanceledSlashPayout::::get(), + current_planned_session: pallet_staking::CurrentPlannedSession::::get(), + chill_threshold: pallet_staking::ChillThreshold::::get(), + + // Storage Maps + invulnerables: pallet_staking::Invulnerables::::get(), + bonded: pallet_staking::Bonded::::iter().collect(), + ledger: pallet_staking::Ledger::::iter() + .map(|(k, v)| (k, v.into_portable())) + .collect(), + payee: pallet_staking::Payee::::iter().collect(), + validators: pallet_staking::Validators::::iter().collect(), + nominators: pallet_staking::Nominators::::iter() + .map(|(k, v)| (k, v.into_portable())) + .collect(), + virtual_stakers: pallet_staking::VirtualStakers::::iter_keys().collect(), + } + } + + fn post_check(rc_pre_payload: Self::RcPrePayload) {} +} diff --git a/pallets/rc-migrator/src/staking/mod.rs b/pallets/rc-migrator/src/staking/mod.rs index cfe32e3f18..c863ce0bb5 100644 --- a/pallets/rc-migrator/src/staking/mod.rs +++ b/pallets/rc-migrator/src/staking/mod.rs @@ -15,11 +15,15 @@ // along with Polkadot. If not, see . pub mod bags_list; +#[cfg(feature = "std")] +pub mod checks; pub mod delegated_staking; pub mod fast_unstake; +pub mod message; pub mod nom_pools; pub mod nom_pools_alias; - -pub mod message; pub mod staking; + +#[cfg(feature = "std")] +pub use checks::*; pub use staking::*; From e95387eeea5f7fd158cc29e561ce19a30951570a Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 22 Jul 2025 18:32:17 +0200 Subject: [PATCH 08/14] fix Signed-off-by: Oliver Tale-Yazdi --- Cargo.lock | 480 ++++++++++----------- pallets/ah-migrator/src/staking/checks.rs | 85 +++- pallets/ah-migrator/src/staking/staking.rs | 2 +- pallets/rc-migrator/src/staking/checks.rs | 36 +- pallets/rc-migrator/src/staking/message.rs | 10 +- 5 files changed, 367 insertions(+), 246 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d77f21331..9bf41f3b92 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1107,7 +1107,7 @@ dependencies = [ [[package]] name = "asset-test-utils" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -1137,7 +1137,7 @@ dependencies = [ [[package]] name = "assets-common" version = "0.21.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1430,7 +1430,7 @@ checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" [[package]] name = "binary-merkle-tree" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "hash-db", "log", @@ -1684,7 +1684,7 @@ dependencies = [ [[package]] name = "bp-bridge-hub-cumulus" version = "0.21.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -1737,7 +1737,7 @@ dependencies = [ [[package]] name = "bp-header-chain" version = "0.20.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-runtime", "finality-grandpa", @@ -1754,7 +1754,7 @@ dependencies = [ [[package]] name = "bp-messages" version = "0.20.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-header-chain", "bp-runtime", @@ -1770,7 +1770,7 @@ dependencies = [ [[package]] name = "bp-parachains" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-header-chain", "bp-polkadot-core", @@ -1787,7 +1787,7 @@ dependencies = [ [[package]] name = "bp-polkadot-core" version = "0.20.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-messages", "bp-runtime", @@ -1804,7 +1804,7 @@ dependencies = [ [[package]] name = "bp-relayers" version = "0.20.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-header-chain", "bp-messages", @@ -1822,7 +1822,7 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.20.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "frame-system", @@ -1845,7 +1845,7 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-header-chain", "bp-parachains", @@ -1865,7 +1865,7 @@ dependencies = [ [[package]] name = "bp-xcm-bridge-hub" version = "0.6.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-messages", "bp-runtime", @@ -1882,7 +1882,7 @@ dependencies = [ [[package]] name = "bp-xcm-bridge-hub-router" version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "scale-info", @@ -1894,7 +1894,7 @@ dependencies = [ [[package]] name = "bridge-hub-common" version = "0.13.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2213,7 +2213,7 @@ dependencies = [ [[package]] name = "bridge-hub-test-utils" version = "0.22.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "asset-test-utils", "bp-header-chain", @@ -2255,7 +2255,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.21.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-header-chain", "bp-messages", @@ -3343,7 +3343,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -3360,7 +3360,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -3395,7 +3395,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -3406,7 +3406,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-session-benchmarking" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -3419,7 +3419,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.19.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -3434,7 +3434,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bounded-collections", "bp-xcm-bridge-hub-router", @@ -3459,7 +3459,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-aura" version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "sp-api", "sp-consensus-aura", @@ -3468,7 +3468,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.18.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -3484,7 +3484,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.18.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -3498,7 +3498,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-proof-size-hostfunction" version = "0.12.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "sp-externalities 0.30.0 (git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo)", "sp-runtime-interface 29.0.1 (git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo)", @@ -3508,7 +3508,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -3525,7 +3525,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -4074,7 +4074,7 @@ dependencies = [ [[package]] name = "emulated-integration-tests-common" version = "20.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "asset-test-utils", "bp-messages", @@ -4468,7 +4468,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "13.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", ] @@ -4491,7 +4491,7 @@ checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619" [[package]] name = "frame-benchmarking" version = "40.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "frame-support-procedural", @@ -4529,7 +4529,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -4540,7 +4540,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -4557,7 +4557,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "40.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "aquamarine", "frame-support", @@ -4599,7 +4599,7 @@ dependencies = [ [[package]] name = "frame-metadata-hash-extension" version = "0.8.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "array-bytes", "const-hex", @@ -4615,7 +4615,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.50.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "futures", "indicatif", @@ -4637,7 +4637,7 @@ dependencies = [ [[package]] name = "frame-support" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "aquamarine", "array-bytes", @@ -4678,7 +4678,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "33.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "Inflector", "cfg-expr", @@ -4698,7 +4698,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "13.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.3.0", @@ -4710,7 +4710,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "proc-macro2", "quote", @@ -4720,7 +4720,7 @@ dependencies = [ [[package]] name = "frame-system" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "cfg-if", "docify", @@ -4739,7 +4739,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "28.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -4753,7 +4753,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "docify", "parity-scale-codec", @@ -4763,7 +4763,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.46.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "parity-scale-codec", @@ -8003,7 +8003,7 @@ dependencies = [ [[package]] name = "pallet-alliance" version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "array-bytes", "frame-benchmarking", @@ -8023,7 +8023,7 @@ dependencies = [ [[package]] name = "pallet-asset-conversion" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8041,7 +8041,7 @@ dependencies = [ [[package]] name = "pallet-asset-conversion-tx-payment" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8056,7 +8056,7 @@ dependencies = [ [[package]] name = "pallet-asset-rate" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8070,7 +8070,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8087,7 +8087,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8103,7 +8103,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "frame-system", @@ -8119,7 +8119,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "frame-system", @@ -8134,7 +8134,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "frame-system", @@ -8147,7 +8147,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8170,7 +8170,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "aquamarine", "docify", @@ -8191,7 +8191,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "41.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "docify", "frame-benchmarking", @@ -8207,7 +8207,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "41.1.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "frame-system", @@ -8226,7 +8226,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "array-bytes", "binary-merkle-tree", @@ -8251,7 +8251,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8268,7 +8268,7 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-header-chain", "bp-runtime", @@ -8287,7 +8287,7 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.20.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-header-chain", "bp-messages", @@ -8306,7 +8306,7 @@ dependencies = [ [[package]] name = "pallet-bridge-parachains" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-header-chain", "bp-parachains", @@ -8326,7 +8326,7 @@ dependencies = [ [[package]] name = "pallet-bridge-relayers" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-header-chain", "bp-messages", @@ -8349,7 +8349,7 @@ dependencies = [ [[package]] name = "pallet-broker" version = "0.19.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bitvec", "frame-benchmarking", @@ -8367,7 +8367,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8385,7 +8385,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8404,7 +8404,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "docify", "frame-benchmarking", @@ -8421,7 +8421,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "assert_matches", "frame-benchmarking", @@ -8437,7 +8437,7 @@ dependencies = [ [[package]] name = "pallet-core-fellowship" version = "24.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8455,7 +8455,7 @@ dependencies = [ [[package]] name = "pallet-delegated-staking" version = "7.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "frame-system", @@ -8470,7 +8470,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-block" version = "0.9.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8491,7 +8491,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8512,7 +8512,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "27.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8525,7 +8525,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "docify", "frame-benchmarking", @@ -8543,7 +8543,7 @@ dependencies = [ [[package]] name = "pallet-glutton" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "blake2 0.10.6", "frame-benchmarking", @@ -8561,7 +8561,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8583,7 +8583,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "enumflags2", "frame-benchmarking", @@ -8599,7 +8599,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8618,7 +8618,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8633,7 +8633,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "43.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "environmental", "frame-benchmarking", @@ -8652,7 +8652,7 @@ dependencies = [ [[package]] name = "pallet-migrations" version = "10.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "docify", "frame-benchmarking", @@ -8671,7 +8671,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "log", "parity-scale-codec", @@ -8683,7 +8683,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "log", "parity-scale-codec", @@ -8694,7 +8694,7 @@ dependencies = [ [[package]] name = "pallet-nft-fractionalization" version = "23.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8710,7 +8710,7 @@ dependencies = [ [[package]] name = "pallet-nfts" version = "34.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "enumflags2", "frame-benchmarking", @@ -8727,7 +8727,7 @@ dependencies = [ [[package]] name = "pallet-nfts-runtime-api" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "sp-api", @@ -8736,7 +8736,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", @@ -8746,7 +8746,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "38.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "frame-system", @@ -8764,7 +8764,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "38.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8784,7 +8784,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -8794,7 +8794,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "frame-system", @@ -8809,7 +8809,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8832,7 +8832,7 @@ dependencies = [ [[package]] name = "pallet-parameters" version = "0.11.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "docify", "frame-benchmarking", @@ -8849,7 +8849,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8865,7 +8865,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", @@ -8875,7 +8875,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8944,7 +8944,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8958,7 +8958,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "assert_matches", "frame-benchmarking", @@ -8997,7 +8997,7 @@ dependencies = [ [[package]] name = "pallet-revive" version = "0.6.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "alloy-core", "derive_more 0.99.20", @@ -9045,7 +9045,7 @@ dependencies = [ [[package]] name = "pallet-revive-fixtures" version = "0.3.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "anyhow", "cargo_metadata", @@ -9059,7 +9059,7 @@ dependencies = [ [[package]] name = "pallet-revive-proc-macro" version = "0.3.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "proc-macro2", "quote", @@ -9069,7 +9069,7 @@ dependencies = [ [[package]] name = "pallet-revive-uapi" version = "0.4.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bitflags 1.3.2", "pallet-revive-proc-macro", @@ -9081,7 +9081,7 @@ dependencies = [ [[package]] name = "pallet-salary" version = "25.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "log", "pallet-ranked-collective", @@ -9093,7 +9093,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "41.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "docify", "frame-benchmarking", @@ -9110,7 +9110,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "40.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "frame-system", @@ -9132,7 +9132,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -9148,7 +9148,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -9165,7 +9165,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "40.1.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9187,7 +9187,7 @@ dependencies = [ [[package]] name = "pallet-staking-async" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9210,7 +9210,7 @@ dependencies = [ [[package]] name = "pallet-staking-async-ah-client" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -9231,7 +9231,7 @@ dependencies = [ [[package]] name = "pallet-staking-async-rc-client" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "frame-system", @@ -9248,7 +9248,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -9259,7 +9259,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "22.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "log", "sp-arithmetic", @@ -9268,7 +9268,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "sp-api", @@ -9278,7 +9278,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "44.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -9294,7 +9294,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "docify", "frame-benchmarking", @@ -9309,7 +9309,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "docify", "frame-benchmarking", @@ -9328,7 +9328,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -9344,7 +9344,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -9356,7 +9356,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "docify", "frame-benchmarking", @@ -9375,7 +9375,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -9389,7 +9389,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "40.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -9404,7 +9404,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -9418,7 +9418,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", @@ -9428,7 +9428,7 @@ dependencies = [ [[package]] name = "pallet-xcm" version = "19.1.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -9451,7 +9451,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -9468,7 +9468,7 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub" version = "0.16.3" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-messages", "bp-runtime", @@ -9490,7 +9490,7 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub-router" version = "0.18.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-xcm-bridge-hub-router", "frame-benchmarking", @@ -9509,7 +9509,7 @@ dependencies = [ [[package]] name = "parachains-common" version = "21.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", @@ -9538,7 +9538,7 @@ dependencies = [ [[package]] name = "parachains-runtimes-test-utils" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -9737,7 +9737,7 @@ dependencies = [ [[package]] name = "penpal-runtime" version = "0.29.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", @@ -10153,7 +10153,7 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "17.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "scale-info", @@ -10235,7 +10235,7 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" version = "16.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bounded-collections", "derive_more 0.99.20", @@ -10251,7 +10251,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "18.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bitvec", "hex-literal", @@ -10388,7 +10388,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "19.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bitvec", "frame-benchmarking", @@ -10456,7 +10456,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bs58", "frame-benchmarking", @@ -10468,7 +10468,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "19.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -10525,7 +10525,7 @@ dependencies = [ [[package]] name = "polkadot-sdk-frame" version = "0.9.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "docify", "frame-benchmarking", @@ -11582,7 +11582,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "polkadot-primitives", @@ -11939,7 +11939,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "31.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "log", "sp-core 36.1.0", @@ -11950,7 +11950,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.44.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "sp-api", @@ -11965,7 +11965,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "42.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "array-bytes", "docify", @@ -11991,7 +11991,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "12.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -12002,7 +12002,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "fnv", "futures", @@ -12028,7 +12028,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "async-trait", "futures", @@ -12051,7 +12051,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.34.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "ahash", "array-bytes", @@ -12095,7 +12095,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -12118,7 +12118,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.38.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "polkavm 0.18.0", "sc-allocator", @@ -12131,7 +12131,7 @@ dependencies = [ [[package]] name = "sc-executor-polkavm" version = "0.35.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "log", "polkavm 0.18.0", @@ -12142,7 +12142,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.38.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "anyhow", "log", @@ -12158,7 +12158,7 @@ dependencies = [ [[package]] name = "sc-mixnet" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "array-bytes", "arrayvec 0.7.6", @@ -12186,7 +12186,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.49.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -12236,7 +12236,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -12246,7 +12246,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.49.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "ahash", "futures", @@ -12265,7 +12265,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -12300,7 +12300,7 @@ dependencies = [ [[package]] name = "sc-network-types" version = "0.15.4" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bs58", "bytes", @@ -12319,7 +12319,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -12339,7 +12339,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "28.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "chrono", "futures", @@ -12358,7 +12358,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "async-trait", "futures", @@ -12375,7 +12375,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "18.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "async-channel 1.9.0", "futures", @@ -13027,7 +13027,7 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "enumn", "parity-scale-codec", @@ -13178,7 +13178,7 @@ dependencies = [ [[package]] name = "snowbridge-beacon-primitives" version = "0.13.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "byte-slice-cast", "frame-support", @@ -13200,7 +13200,7 @@ dependencies = [ [[package]] name = "snowbridge-core" version = "0.13.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bp-relayers", "ethabi-decode", @@ -13225,7 +13225,7 @@ dependencies = [ [[package]] name = "snowbridge-ethereum" version = "0.12.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "ethabi-decode", "ethbloom", @@ -13245,7 +13245,7 @@ dependencies = [ [[package]] name = "snowbridge-inbound-queue-primitives" version = "0.2.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "alloy-core", "frame-support", @@ -13269,7 +13269,7 @@ dependencies = [ [[package]] name = "snowbridge-merkle-tree" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "scale-info", @@ -13295,7 +13295,7 @@ dependencies = [ [[package]] name = "snowbridge-outbound-queue-primitives" version = "0.2.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "alloy-core", "ethabi-decode", @@ -13321,7 +13321,7 @@ dependencies = [ [[package]] name = "snowbridge-outbound-queue-runtime-api" version = "0.13.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "parity-scale-codec", @@ -13335,7 +13335,7 @@ dependencies = [ [[package]] name = "snowbridge-pallet-ethereum-client" version = "0.13.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -13361,7 +13361,7 @@ dependencies = [ [[package]] name = "snowbridge-pallet-ethereum-client-fixtures" version = "0.21.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "hex-literal", "snowbridge-beacon-primitives", @@ -13374,7 +13374,7 @@ dependencies = [ [[package]] name = "snowbridge-pallet-inbound-queue" version = "0.13.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "alloy-core", "frame-benchmarking", @@ -13401,7 +13401,7 @@ dependencies = [ [[package]] name = "snowbridge-pallet-inbound-queue-fixtures" version = "0.21.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "hex-literal", "snowbridge-beacon-primitives", @@ -13414,7 +13414,7 @@ dependencies = [ [[package]] name = "snowbridge-pallet-outbound-queue" version = "0.13.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bridge-hub-common", "ethabi-decode", @@ -13437,7 +13437,7 @@ dependencies = [ [[package]] name = "snowbridge-pallet-system" version = "0.13.3" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-benchmarking", "frame-support", @@ -13458,7 +13458,7 @@ dependencies = [ [[package]] name = "snowbridge-runtime-common" version = "0.13.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "frame-system", @@ -13477,7 +13477,7 @@ dependencies = [ [[package]] name = "snowbridge-runtime-test-common" version = "0.15.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -13508,7 +13508,7 @@ dependencies = [ [[package]] name = "snowbridge-system-runtime-api" version = "0.13.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "snowbridge-core", @@ -13520,7 +13520,7 @@ dependencies = [ [[package]] name = "snowbridge-verification-primitives" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "parity-scale-codec", @@ -13558,7 +13558,7 @@ dependencies = [ [[package]] name = "sp-api" version = "36.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "docify", "hash-db", @@ -13580,7 +13580,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "22.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "Inflector", "blake2 0.10.6", @@ -13594,7 +13594,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "40.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "scale-info", @@ -13606,7 +13606,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "26.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "docify", "integer-sqrt", @@ -13620,7 +13620,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "scale-info", @@ -13632,7 +13632,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "sp-api", "sp-inherents", @@ -13642,7 +13642,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "futures", "parity-scale-codec", @@ -13661,7 +13661,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "async-trait", "futures", @@ -13675,7 +13675,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "async-trait", "parity-scale-codec", @@ -13691,7 +13691,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.42.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "async-trait", "parity-scale-codec", @@ -13709,7 +13709,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "24.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "scale-info", @@ -13729,7 +13729,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "23.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "finality-grandpa", "log", @@ -13746,7 +13746,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.42.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "scale-info", @@ -13804,7 +13804,7 @@ dependencies = [ [[package]] name = "sp-core" version = "36.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "ark-vrf", "array-bytes", @@ -13865,7 +13865,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "blake2b_simd", "byteorder", @@ -13878,7 +13878,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "quote", "sp-crypto-hashing 0.1.0 (git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo)", @@ -13888,7 +13888,7 @@ dependencies = [ [[package]] name = "sp-database" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "kvdb", "parking_lot 0.12.3", @@ -13908,7 +13908,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "proc-macro2", "quote", @@ -13929,7 +13929,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.30.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "environmental", "parity-scale-codec", @@ -13939,7 +13939,7 @@ dependencies = [ [[package]] name = "sp-genesis-builder" version = "0.17.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "scale-info", @@ -13951,7 +13951,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -13964,7 +13964,7 @@ dependencies = [ [[package]] name = "sp-io" version = "40.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bytes", "docify", @@ -13990,7 +13990,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "41.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "sp-core 36.1.0", "sp-runtime", @@ -14000,7 +14000,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.42.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -14011,7 +14011,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "thiserror 1.0.69", "zstd 0.12.4", @@ -14020,7 +14020,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-metadata 20.0.0", "parity-scale-codec", @@ -14030,7 +14030,7 @@ dependencies = [ [[package]] name = "sp-mixnet" version = "0.14.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "scale-info", @@ -14041,7 +14041,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "36.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "log", "parity-scale-codec", @@ -14058,7 +14058,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "scale-info", @@ -14071,7 +14071,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "sp-api", "sp-core 36.1.0", @@ -14081,7 +14081,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "backtrace", "regex", @@ -14090,7 +14090,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "34.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "rustc-hash 1.1.0", "serde", @@ -14100,7 +14100,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "31.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "binary-merkle-tree", "docify", @@ -14148,7 +14148,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "29.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -14181,7 +14181,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "18.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "Inflector", "expander", @@ -14194,7 +14194,7 @@ dependencies = [ [[package]] name = "sp-session" version = "38.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "scale-info", @@ -14208,7 +14208,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "26.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -14221,7 +14221,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.45.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "hash-db", "log", @@ -14247,7 +14247,7 @@ checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" [[package]] name = "sp-storage" @@ -14265,7 +14265,7 @@ dependencies = [ [[package]] name = "sp-storage" version = "22.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "impl-serde", "parity-scale-codec", @@ -14277,7 +14277,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "async-trait", "parity-scale-codec", @@ -14301,7 +14301,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "17.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "tracing", @@ -14312,7 +14312,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "36.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "sp-api", "sp-runtime", @@ -14321,7 +14321,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "39.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "ahash", "hash-db", @@ -14343,7 +14343,7 @@ dependencies = [ [[package]] name = "sp-version" version = "39.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "impl-serde", "parity-scale-codec", @@ -14360,7 +14360,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "parity-scale-codec", "proc-macro-warning", @@ -14384,7 +14384,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "21.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -14396,7 +14396,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "31.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -14592,7 +14592,7 @@ dependencies = [ [[package]] name = "staging-parachain-info" version = "0.20.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -14605,7 +14605,7 @@ dependencies = [ [[package]] name = "staging-xcm" version = "16.2.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "array-bytes", "bounded-collections", @@ -14626,7 +14626,7 @@ dependencies = [ [[package]] name = "staging-xcm-builder" version = "20.1.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "environmental", "frame-support", @@ -14650,7 +14650,7 @@ dependencies = [ [[package]] name = "staging-xcm-executor" version = "19.1.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "environmental", "frame-benchmarking", @@ -14749,7 +14749,7 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.6.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -14774,7 +14774,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.17.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "http-body-util", "hyper 1.6.0", @@ -14788,7 +14788,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.48.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "async-trait", "jsonrpsee", @@ -14801,7 +14801,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "26.0.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "array-bytes", "build-helper", @@ -15190,7 +15190,7 @@ checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "testnet-parachains-constants" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -16450,7 +16450,7 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "westend-runtime-constants" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "polkadot-primitives", @@ -17050,7 +17050,7 @@ dependencies = [ [[package]] name = "xcm-emulator" version = "0.19.3" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "array-bytes", "cumulus-pallet-parachain-system", @@ -17084,7 +17084,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "11.0.2" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "Inflector", "proc-macro2", @@ -17095,7 +17095,7 @@ dependencies = [ [[package]] name = "xcm-runtime-apis" version = "0.7.1" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "parity-scale-codec", @@ -17109,7 +17109,7 @@ dependencies = [ [[package]] name = "xcm-simulator" version = "20.1.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#4fa01d41c6de9a52c69483e7026bac568dbc2cbf" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=oty-2503-paseo#599ff333d2e930db8ed96fc1cba6022b74d9c06f" dependencies = [ "frame-support", "frame-system", diff --git a/pallets/ah-migrator/src/staking/checks.rs b/pallets/ah-migrator/src/staking/checks.rs index b1bd4f28ef..ce5bd98aab 100644 --- a/pallets/ah-migrator/src/staking/checks.rs +++ b/pallets/ah-migrator/src/staking/checks.rs @@ -16,8 +16,14 @@ //! Checks that the staking migration succeeded. -use pallet_rc_migrator::staking::{message::PortableNominations, PortableStakingMessage, RcData}; -use sp_runtime::AccountId32; +use pallet_rc_migrator::{ + staking::{ + message::{PortableNominations, PortableUnappliedSlash}, + PortableStakingMessage, RcData, + }, + types::IntoPortable, +}; +use sp_runtime::{AccountId32, Perbill}; impl crate::types::AhMigrationCheck for pallet_rc_migrator::staking::StakingMigratedCorrectly @@ -37,7 +43,16 @@ impl crate::types::AhMigrationCheck assert_eq!(rc.min_commission, pallet_staking_async::MinCommission::::get()); assert_eq!(rc.max_validators_count, pallet_staking_async::MaxValidatorsCount::::get()); assert_eq!(rc.max_nominators_count, pallet_staking_async::MaxNominatorsCount::::get()); - //assert_eq!(rc.current_era, pallet_staking_async::CurrentEra::::get()); + // @kianenigma please review + if let Some(rc_era) = rc.current_era { + let diff = (rc_era as i64 - + pallet_staking_async::CurrentEra::::get().expect("Must have current era") + as i64) + .abs(); + assert!(diff <= 2, "Current era difference is at most 1"); + } else { + assert_eq!(pallet_staking_async::CurrentEra::::get(), None); + } assert_eq!( rc.active_era.map(translate_active_era), pallet_staking_async::ActiveEra::::get() @@ -81,6 +96,55 @@ impl crate::types::AhMigrationCheck rc.virtual_stakers, pallet_staking_async::VirtualStakers::::iter_keys().collect::>() ); + assert_eq!( + rc.eras_stakers_overview + .into_iter() + .map(|(k1, k2, v)| (k1, k2, v.into())) + .collect::>(), + pallet_staking_async::ErasStakersOverview::::iter().collect::>() + ); + assert_eq!( + rc.eras_stakers_paged + .into_iter() + .map(|(k, v)| (k, v.into())) + .collect::>(), + pallet_staking_async::ErasStakersPaged::::iter().collect::>() + ); + assert_eq!( + rc.claimed_rewards, + pallet_staking_async::ClaimedRewards::::iter() + .map(|(k1, k2, v)| (k1, k2, v.into_inner())) + .collect::>() + ); + assert_eq!( + rc.eras_validator_prefs + .into_iter() + .map(|(k1, k2, v)| (k1, k2, v.into())) + .collect::>(), + pallet_staking_async::ErasValidatorPrefs::::iter().collect::>() + ); + assert_eq!( + rc.eras_validator_reward, + pallet_staking_async::ErasValidatorReward::::iter().collect::>() + ); + assert_eq!( + rc.eras_reward_points + .into_iter() + .map(|(k, v)| (k, v.into())) + .collect::>(), + pallet_staking_async::ErasRewardPoints::::iter().collect::>() + ); + assert_eq!( + rc.eras_total_stake, + pallet_staking_async::ErasTotalStake::::iter().collect::>() + ); + check_unapplied_slashes::(rc.unapplied_slashes); + // TODO assert_eq!(rc.bonded_eras, + // pallet_staking_async::BondedEras::::get().into_inner()); + assert_eq!( + rc.validator_slash_in_era, + pallet_staking_async::ValidatorSlashInEra::::iter().collect::>() + ); } } @@ -127,3 +191,18 @@ fn translate_nominations( suppressed: nominations.suppressed, } } + +fn check_unapplied_slashes(rc: Vec<(u32, Vec)>) { + let mut expected_slashes = + Vec::<(u32, (AccountId32, Perbill, u32), PortableUnappliedSlash)>::new(); + + for (era, slashes) in rc { + for slash in slashes { + // We insert all slashes with this special key + let key = (slash.validator.clone(), Perbill::from_percent(99), 9999); + expected_slashes.push((era, key, slash)); + } + } + + // TODO assert +} diff --git a/pallets/ah-migrator/src/staking/staking.rs b/pallets/ah-migrator/src/staking/staking.rs index 9a29c56f7d..c5afad9073 100644 --- a/pallets/ah-migrator/src/staking/staking.rs +++ b/pallets/ah-migrator/src/staking/staking.rs @@ -136,7 +136,7 @@ impl Pallet { }, BondedEras(bonded_eras) => { log::debug!(target: LOG_TARGET, "Integrating BondedEras"); - let bounded: BoundedVec<_, _> = bonded_eras.defensive_truncate_into(); + let bounded: BoundedVec<_, _> = bonded_eras.clone().defensive_truncate_into(); pallet_staking_async::BondedEras::::put(bounded); }, ValidatorSlashInEra { era, validator, slash } => { diff --git a/pallets/rc-migrator/src/staking/checks.rs b/pallets/rc-migrator/src/staking/checks.rs index b198e4c86a..d0dbd0008d 100644 --- a/pallets/rc-migrator/src/staking/checks.rs +++ b/pallets/rc-migrator/src/staking/checks.rs @@ -18,7 +18,11 @@ use crate::{ staking::{ - message::{PortableForcing, PortableNominations, PortableStakingLedger, StakingValues}, + message::{ + PortableEraRewardPoints, PortableExposurePage, PortableForcing, PortableNominations, + PortablePagedExposureMetadata, PortableStakingLedger, PortableUnappliedSlash, + PortableValidatorPrefs, StakingValues, + }, PortableStakingMessage, }, types::IntoPortable, @@ -54,6 +58,16 @@ pub struct RcData { pub validators: Vec<(AccountId32, pallet_staking::ValidatorPrefs)>, pub nominators: Vec<(AccountId32, PortableNominations)>, pub virtual_stakers: Vec, + pub eras_stakers_overview: Vec<(u32, AccountId32, PortablePagedExposureMetadata)>, + pub eras_stakers_paged: Vec<((u32, AccountId32, u32), PortableExposurePage)>, + pub claimed_rewards: Vec<(u32, AccountId32, Vec)>, + pub eras_validator_prefs: Vec<(u32, AccountId32, PortableValidatorPrefs)>, + pub eras_validator_reward: Vec<(u32, u128)>, + pub eras_reward_points: Vec<(u32, PortableEraRewardPoints)>, + pub eras_total_stake: Vec<(u32, u128)>, + pub unapplied_slashes: Vec<(u32, Vec)>, + pub bonded_eras: Vec<(u32, u32)>, + pub validator_slash_in_era: Vec<(u32, AccountId32, (Perbill, u128))>, } pub struct StakingMigratedCorrectly(pub core::marker::PhantomData); @@ -93,6 +107,26 @@ impl crate::types::RcMigrationCheck for StakingMigratedCorrect .map(|(k, v)| (k, v.into_portable())) .collect(), virtual_stakers: pallet_staking::VirtualStakers::::iter_keys().collect(), + eras_stakers_overview: pallet_staking::ErasStakersOverview::::iter() + .map(|(k1, k2, v)| (k1, k2, v.into_portable())) + .collect(), + eras_stakers_paged: pallet_staking::ErasStakersPaged::::iter() + .map(|(k, v)| (k, v.into_portable())) + .collect(), + claimed_rewards: pallet_staking::ClaimedRewards::::iter().collect(), + eras_validator_prefs: pallet_staking::ErasValidatorPrefs::::iter() + .map(|(k1, k2, v)| (k1, k2, v.into_portable())) + .collect(), + eras_validator_reward: pallet_staking::ErasValidatorReward::::iter().collect(), + eras_reward_points: pallet_staking::ErasRewardPoints::::iter() + .map(|(k, v)| (k, v.into_portable())) + .collect(), + eras_total_stake: pallet_staking::ErasTotalStake::::iter().collect(), + unapplied_slashes: pallet_staking::UnappliedSlashes::::iter() + .map(|(k, v)| (k, v.into_iter().map(IntoPortable::into_portable).collect())) + .collect(), + bonded_eras: pallet_staking::BondedEras::::get(), + validator_slash_in_era: pallet_staking::ValidatorSlashInEra::::iter().collect(), } } diff --git a/pallets/rc-migrator/src/staking/message.rs b/pallets/rc-migrator/src/staking/message.rs index c6f672034c..919a0bdcaa 100644 --- a/pallets/rc-migrator/src/staking/message.rs +++ b/pallets/rc-migrator/src/staking/message.rs @@ -675,7 +675,15 @@ impl Into> for PortableIndivid } #[derive( - PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen, DecodeWithMemTracking, + PartialEq, + Eq, + Clone, + Encode, + Decode, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, + DecodeWithMemTracking, )] pub struct PortableEraRewardPoints { pub total: u32, From dc349fd42087ad4628f1efabefd1c79366654c1e Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 23 Jul 2025 13:05:29 +0200 Subject: [PATCH 09/14] add RC post tests Signed-off-by: Oliver Tale-Yazdi --- pallets/rc-migrator/src/staking/checks.rs | 42 ++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/pallets/rc-migrator/src/staking/checks.rs b/pallets/rc-migrator/src/staking/checks.rs index d0dbd0008d..f03eb23b18 100644 --- a/pallets/rc-migrator/src/staking/checks.rs +++ b/pallets/rc-migrator/src/staking/checks.rs @@ -130,5 +130,45 @@ impl crate::types::RcMigrationCheck for StakingMigratedCorrect } } - fn post_check(rc_pre_payload: Self::RcPrePayload) {} + fn post_check(rc_pre_payload: Self::RcPrePayload) { + use pallet_staking::*; + // All storage values are gone + assert!(!ValidatorCount::::exists()); + assert!(!MinimumValidatorCount::::exists()); + assert!(!MinNominatorBond::::exists()); + assert!(!MinValidatorBond::::exists()); + assert!(!MinimumActiveStake::::exists()); + assert!(!MinCommission::::exists()); + assert!(!MaxValidatorsCount::::exists()); + assert!(!MaxNominatorsCount::::exists()); + assert!(!CurrentEra::::exists()); + assert!(!ActiveEra::::exists()); + assert!(!ForceEra::::exists()); + assert!(!MaxStakedRewards::::exists()); + assert!(!SlashRewardFraction::::exists()); + assert!(!CanceledSlashPayout::::exists()); + assert!(!CurrentPlannedSession::::exists()); + assert!(!ChillThreshold::::exists()); + + assert!(!Invulnerables::::exists()); + assert!(Bonded::::iter_keys().next().is_none()); + assert!(Ledger::::iter_keys().next().is_none()); + assert!(Payee::::iter_keys().next().is_none()); + assert!(Validators::::iter_keys().next().is_none()); + assert!(Nominators::::iter_keys().next().is_none()); + assert!(VirtualStakers::::iter_keys().next().is_none()); + assert!(ErasStakersOverview::::iter_keys().next().is_none()); + assert!(ErasStakersPaged::::iter_keys().next().is_none()); + assert!(ClaimedRewards::::iter_keys().next().is_none()); + assert!(ErasValidatorPrefs::::iter_keys().next().is_none()); + assert!(ErasValidatorReward::::iter_keys().next().is_none()); + assert!(ErasRewardPoints::::iter_keys().next().is_none()); + assert!(ErasTotalStake::::iter_keys().next().is_none()); + assert!(UnappliedSlashes::::iter_keys().next().is_none()); + assert!(!BondedEras::::exists()); + assert!(ValidatorSlashInEra::::iter_keys().next().is_none()); + assert!(NominatorSlashInEra::::iter_keys().next().is_none()); + assert!(SlashingSpans::::iter_keys().next().is_none()); + assert!(SpanSlash::::iter_keys().next().is_none()); + } } From e4226c028b545616c1e836fd1595b0157156a022 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 23 Jul 2025 13:05:59 +0200 Subject: [PATCH 10/14] review fixes Signed-off-by: Oliver Tale-Yazdi --- pallets/ah-migrator/src/staking/checks.rs | 4 +-- pallets/rc-migrator/src/staking/message.rs | 30 ++++++++-------------- pallets/rc-migrator/src/staking/staking.rs | 6 ++--- 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/pallets/ah-migrator/src/staking/checks.rs b/pallets/ah-migrator/src/staking/checks.rs index ce5bd98aab..30eb925b39 100644 --- a/pallets/ah-migrator/src/staking/checks.rs +++ b/pallets/ah-migrator/src/staking/checks.rs @@ -36,7 +36,7 @@ impl crate::types::AhMigrationCheck fn post_check(rc: Self::RcPrePayload, _ah_pre_payload: Self::AhPrePayload) { // Storage Values assert_eq!(rc.validator_count, pallet_staking_async::ValidatorCount::::get()); - // Min validator count is not migrated @kianenigma review + // Min validator count is not migrated and instead configured via `MinimumValidatorSetSize` assert_eq!(rc.min_nominator_bond, pallet_staking_async::MinNominatorBond::::get()); assert_eq!(rc.min_validator_bond, pallet_staking_async::MinValidatorBond::::get()); assert_eq!(rc.min_active_stake, pallet_staking_async::MinimumActiveStake::::get()); @@ -61,7 +61,7 @@ impl crate::types::AhMigrationCheck assert_eq!(rc.max_staked_rewards, pallet_staking_async::MaxStakedRewards::::get()); assert_eq!(rc.slash_reward_fraction, pallet_staking_async::SlashRewardFraction::::get()); assert_eq!(rc.canceled_slash_payout, pallet_staking_async::CanceledSlashPayout::::get()); - // Current planned session is not migrated @kianenigma review + // Current planned session is not migrated assert_eq!(rc.chill_threshold, pallet_staking_async::ChillThreshold::::get()); // Storage Maps diff --git a/pallets/rc-migrator/src/staking/message.rs b/pallets/rc-migrator/src/staking/message.rs index 919a0bdcaa..38e67f5fd3 100644 --- a/pallets/rc-migrator/src/staking/message.rs +++ b/pallets/rc-migrator/src/staking/message.rs @@ -291,8 +291,8 @@ pub struct PortableStakingLedger { pub stash: AccountId32, pub total: u128, pub active: u128, - pub unlocking: BoundedVec>, /* 100 is an upper bound TODO - * @kianenigma review */ + // Expected to be around 32, but we can use 100 as upper bound. + pub unlocking: BoundedVec>, } // StakingLedger: RC -> Portable @@ -300,8 +300,7 @@ impl IntoPortable for pallet_staking::StakingLedger { type Portable = PortableStakingLedger; fn into_portable(self) -> Self::Portable { - // TODO @kianenigma what to do with `legacy_claimed_rewards`? - //defensive_assert!(self.legacy_claimed_rewards.is_empty()); + // We drop the `legacy_claimed_rewards` field, as they are not used anymore. PortableStakingLedger { stash: self.stash, @@ -313,8 +312,7 @@ impl IntoPortable for pallet_staking::StakingLedger { .map(IntoPortable::into_portable) .collect::>() .defensive_truncate_into(), - // TODO @kianenigma controller is ignored, right? - // self.controller, + // self.controller is ignored since its not part of the storage. } } } @@ -336,7 +334,7 @@ impl< .map(Into::into) .collect::>() .defensive_truncate_into(), - controller: None, // TODO @kianenigma review + controller: None, // Not needed } } } @@ -387,10 +385,8 @@ impl Into> for PortableUnlockChunk { pub struct PortableUnappliedSlash { pub validator: AccountId32, pub own: u128, - pub others: BoundedVec<(AccountId32, u128), ConstU32<100>>, /* 100 is an upper bound TODO - * @kianenigma review */ - pub reporters: BoundedVec>, /* 100 is an upper bound TODO - * @kianenigma review */ + pub others: BoundedVec<(AccountId32, u128), ConstU32<600>>, // Range 0-512 + pub reporters: BoundedVec>, // Range 0-1 pub payout: u128, } @@ -427,7 +423,7 @@ impl< self.others.into_inner(), None, ), - reporter: self.reporters.into_iter().next(), // TODO @kianenigma review + reporter: self.reporters.first().cloned(), payout: self.payout, } } @@ -496,8 +492,7 @@ impl Into> for PortableRewa DecodeWithMemTracking, )] pub struct PortableNominations { - pub targets: BoundedVec>, /* 100 is an upper bound TODO - * @kianenigma review */ + pub targets: BoundedVec>, // Range up to 16 pub submitted_in: EraIndex, pub suppressed: bool, } @@ -597,9 +592,7 @@ impl Into> for PortablePagedExposureMeta )] pub struct PortableExposurePage { pub page_total: u128, - pub others: BoundedVec>, /* 600 is an upper bound - * TODO @kianenigma - * review */ + pub others: BoundedVec>, // Range 0-512 } // ExposurePage: RC -> Portable @@ -687,8 +680,7 @@ impl Into> for PortableIndivid )] pub struct PortableEraRewardPoints { pub total: u32, - pub individual: BoundedVec<(AccountId32, u32), ConstU32<600>>, /* 100 is an upper bound - * TODO @kianenigma review */ + pub individual: BoundedVec<(AccountId32, u32), ConstU32<600>>, // Up to MaxValidatorSize } // EraRewardPoints: RC -> Portable diff --git a/pallets/rc-migrator/src/staking/staking.rs b/pallets/rc-migrator/src/staking/staking.rs index d4f57f3a45..c8c0c3ec0c 100644 --- a/pallets/rc-migrator/src/staking/staking.rs +++ b/pallets/rc-migrator/src/staking/staking.rs @@ -438,7 +438,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((era, validator, slash)) => { pallet_staking::NominatorSlashInEra::::remove(&era, &validator); - // Not migrated. TODO @kianenigma review + // Not migrated. StakingStage::NominatorSlashInEra(Some((era, validator))) }, None => StakingStage::SlashingSpans(None), @@ -450,7 +450,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some((account, spans)) => { pallet_staking::SlashingSpans::::remove(&account); - // Not migrated. TODO @kianenigma review + // Not migrated. StakingStage::SlashingSpans(Some(account)) }, None => StakingStage::SpanSlash(None), @@ -462,7 +462,7 @@ impl PalletMigration for StakingMigrator { match iter.next() { Some(((account, span), slash)) => { pallet_staking::SpanSlash::::remove((&account, &span)); - // Not migrated. TODO @kianenigma review + // Not migrated. StakingStage::SpanSlash(Some((account, span))) }, None => StakingStage::Finished, From 927722582d9410293287d85ed629cbc6282d0a9d Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 23 Jul 2025 13:06:12 +0200 Subject: [PATCH 11/14] add simple weight for staking message Signed-off-by: Oliver Tale-Yazdi --- pallets/ah-migrator/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pallets/ah-migrator/src/lib.rs b/pallets/ah-migrator/src/lib.rs index 74a0e34b13..1fbda8b03b 100644 --- a/pallets/ah-migrator/src/lib.rs +++ b/pallets/ah-migrator/src/lib.rs @@ -859,7 +859,9 @@ pub mod pallet { } #[pallet::call_index(30)] - #[pallet::weight({1})] // TODO: @ggwpez weight + #[pallet::weight( + T::DbWeight::get().reads_writes(3, 3).saturating_add(Weight::from_parts(10_000_000, 200)).saturating_mul(messages.len() as u64) + )] // TODO @ggwpez weight pub fn receive_staking_messages( origin: OriginFor, messages: Vec, From 5c4cad00a6ce36aed288a2be595da323dab2ee8e Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 23 Jul 2025 13:19:22 +0200 Subject: [PATCH 12/14] fix test Signed-off-by: Oliver Tale-Yazdi --- pallets/ah-migrator/src/staking/checks.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/pallets/ah-migrator/src/staking/checks.rs b/pallets/ah-migrator/src/staking/checks.rs index 30eb925b39..9f6251a8ce 100644 --- a/pallets/ah-migrator/src/staking/checks.rs +++ b/pallets/ah-migrator/src/staking/checks.rs @@ -43,16 +43,10 @@ impl crate::types::AhMigrationCheck assert_eq!(rc.min_commission, pallet_staking_async::MinCommission::::get()); assert_eq!(rc.max_validators_count, pallet_staking_async::MaxValidatorsCount::::get()); assert_eq!(rc.max_nominators_count, pallet_staking_async::MaxNominatorsCount::::get()); - // @kianenigma please review - if let Some(rc_era) = rc.current_era { - let diff = (rc_era as i64 - - pallet_staking_async::CurrentEra::::get().expect("Must have current era") - as i64) - .abs(); - assert!(diff <= 2, "Current era difference is at most 1"); - } else { - assert_eq!(pallet_staking_async::CurrentEra::::get(), None); - } + assert_eq!( + pallet_staking_async::CurrentEra::::get().expect("Must be set"), + pallet_staking_async::ActiveEra::::get().expect("Must be set").index + ); assert_eq!( rc.active_era.map(translate_active_era), pallet_staking_async::ActiveEra::::get() From a0240d93218f8d4abbdcc953ab91ca61959e7b5b Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 23 Jul 2025 15:47:17 +0200 Subject: [PATCH 13/14] fmt also markdown Signed-off-by: Oliver Tale-Yazdi --- CHANGELOG.md | 2 +- README.md | 2 +- docs/removing-migrations.md | 3 +- docs/running-commands.md | 8 +- docs/weight-generation.md | 14 ++-- integration-tests/bridges/README.md | 6 +- pallets/ah-migrator/Cargo.toml | 6 +- pallets/rc-migrator/Cargo.toml | 12 +-- pallets/rc-migrator/README.md | 1 + pallets/rc-migrator/src/accounts.md | 79 ++++++++++---------- pallets/rc-migrator/src/multisig.md | 2 +- pallets/rc-migrator/src/preimage/preimage.md | 1 + pallets/rc-migrator/src/scheduler.md | 3 +- pallets/rc-migrator/src/staking/nom_pools.md | 1 + pallets/rc-migrator/src/treasury.md | 1 + pallets/rc-migrator/src/vesting.md | 1 - pallets/rc-migrator/src/xcm.md | 3 +- 17 files changed, 78 insertions(+), 67 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebcd5d7bbb..6c011eadcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -184,7 +184,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed -- Fix `experimental_inflation_info` in Polkadot and remove unused code (https://github.com/polkadot-fellows/runtimes/pull/497) +- Fix `experimental_inflation_info` in Polkadot and remove unused code () ## [1.3.3] 01.10.2024 diff --git a/README.md b/README.md index 594310ea09..b03c1c6ad2 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ To submit a fix to release `x.y.z` and make a point release: - Check for other planned releases which originally targeted the same semver version and post on the issue letting them know that they should bump - Once the release is out, amend the GitHub release and delete all unchanged runtime blobs. Highlight if this release only affects some runtimes (contact a maintainer) - Backport your changes to the `CHANGELOG.md` to the main branch + ## Release guidelines Here is an overview of the recommended steps. @@ -99,7 +100,6 @@ Here is an overview of the recommended steps. |9 |Close the issue for the release once the referendum is **approved and executed**. | |10 |Open an issue for **the next release** in the runtimes repo, if applicable.| - ## Communication channels The Fellowship is using Matrix for communication. Right now there exists two channels: diff --git a/docs/removing-migrations.md b/docs/removing-migrations.md index 43a3812c6a..3a86998cf3 100644 --- a/docs/removing-migrations.md +++ b/docs/removing-migrations.md @@ -7,7 +7,8 @@ The following is a quick guide/process for removing applied migrations while mak ## Prerequisites For some chain runtime `spec_version: a_bcd_efg,` (e.g. `spec_version: 1_000_001`): -- has been officially released on https://github.com/polkadot-fellows/runtimes/releases/ as part of `Runtimes X.Y.Z` release/tag. + +- has been officially released on as part of `Runtimes X.Y.Z` release/tag. - the **on-chain** runtime version has been upgraded to spec version `a_bcd_efg` (using wasm blob released above). ## Steps diff --git a/docs/running-commands.md b/docs/running-commands.md index a7d55e371c..f2d061aa47 100644 --- a/docs/running-commands.md +++ b/docs/running-commands.md @@ -8,7 +8,6 @@ You can run commands in PRs by triggering it via comment. It will use the contex `/cmd --help` to see the usage of a specific command - ### Commands - `/cmd fmt` to format the code in the PR. It commits back with the formatted code (fmt) and configs (taplo). @@ -17,16 +16,17 @@ You can run commands in PRs by triggering it via comment. It will use the contex ### Flags -1.`--quiet` to suppress the output of the command in the comments. -By default, the Start and End/Failure of the command will be commented with the link to a pipeline. +1.`--quiet` to suppress the output of the command in the comments. +By default, the Start and End/Failure of the command will be commented with the link to a pipeline. If you want to avoid, use this flag. Go to [Action Tab](https://github.com/polkadot-fellows/runtimes/actions/workflows/cmd.yml) to see the pipeline status. -2.`--continue-on-fail` to continue running the command even if something inside a command (like specific pallet weight generation) are failed. +2.`--continue-on-fail` to continue running the command even if something inside a command (like specific pallet weight generation) are failed. Basically avoids interruption in the middle with `exit 1` The pipeline logs will include what is failed (like which runtimes/pallets), then you can re-run them separately or not. 3.`--clean` to clean up all yours and bot's comments in PR relevant to `/cmd` commands. If you run too many commands, or they keep failing, and you're rerunning them again, it's handy to add this flag to keep a PR clean. ### Adding new Commands + Feel free to add new commands to the workflow, however **_note_** that triggered workflows will use the actions from `main` (default) branch, meaning they will take effect only after the PR with new changes/command is merged. If you want to test the new command, it's better to test in your fork and local-to-fork PRs, where you control the default branch. diff --git a/docs/weight-generation.md b/docs/weight-generation.md index fea2d41f5f..d2471b3165 100644 --- a/docs/weight-generation.md +++ b/docs/weight-generation.md @@ -1,8 +1,8 @@ # Weight Generation -To generate weights for a runtime. +To generate weights for a runtime. Weights generation is using self-hosted runner which is provided by [Amforc](https://amforc.com/), the rest commands are using standard Github runners on `ubuntu-latest` or `ubuntu-20.04`. -Self-hosted runner for benchmarks is configured to meet requirements of reference hardware for running validators https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#reference-hardware +Self-hosted runner for benchmarks is configured to meet requirements of reference hardware for running validators In a PR run the actions through comment: @@ -15,6 +15,7 @@ In a PR run the actions through comment: ``` To generate weights for all pallets in a particular runtime(s), run the following command: + ```sh /cmd bench --runtime kusama polkadot ``` @@ -22,20 +23,21 @@ To generate weights for all pallets in a particular runtime(s), run the followin > **📝 Note**: The action is not being run right-away, it will be queued and run in the next available runner. So might be quick, but might also take up to 10 mins (That's in control of Github). Once the action is run, you'll see reaction 👀 on original comment, and if you didn't pass `--quiet` - it will also send a link to a pipeline when started, and link to whole workflow when finished. -> **💡Hint #1** : if you run all runtimes or all pallets, it might be that some pallet in the middle is failed to generate weights, thus it stops (fails) the whole pipeline. -> If you want, you can make it to continue running, even if some pallets are failed, add `--continue-on-fail` flag to the command. The report will include which runtimes/pallets have failed, then you can re-run them separately after all is done. +> **💡Hint #1** : if you run all runtimes or all pallets, it might be that some pallet in the middle is failed to generate weights, thus it stops (fails) the whole pipeline. +> If you want, you can make it to continue running, even if some pallets are failed, add `--continue-on-fail` flag to the command. The report will include which runtimes/pallets have failed, then you can re-run them separately after all is done. This way it runs all possible runtimes for the specified pallets, if it finds them in the runtime -```sh + +```sh /cmd bench --pallet pallet_balances pallet_xcm_benchmarks::generic pallet_xcm_benchmarks::fungible ``` If you want to run all specific pallet(s) for specific runtime(s), you can do it like this: + ```sh /cmd bench --runtime bridge-hub-polkadot --pallet pallet_xcm_benchmarks::generic pallet_xcm_benchmarks::fungible ``` - > **💡Hint #2** : Sometimes when you run too many commands, or they keep failing and you're rerunning them again, it's handy to add `--clean` flag to the command. This will clean up all yours and bot's comments in PR relevant to /cmd commands. ```sh diff --git a/integration-tests/bridges/README.md b/integration-tests/bridges/README.md index f0701b00a0..d8b04d4463 100644 --- a/integration-tests/bridges/README.md +++ b/integration-tests/bridges/README.md @@ -7,23 +7,27 @@ To start a test, you need to: - download latest [zombienet release](https://github.com/paritytech/zombienet/releases) to `~/local_bridge_testing/bin/zombienet`. - build Polkadot binaries by running commands in the [`polkadot-sdk`](https://github.com/paritytech/polkadot-sdk) repository clone: + ``` cargo build -p polkadot --release cargo build --bin polkadot-prepare-worker --release cargo build --bin polkadot-execute-worker --release ``` + Copy the binaries to: + ``` ~/local_bridge_testing/bin/polkadot ~/local_bridge_testing/bin/polkadot-prepare-worker ~/local_bridge_testing/bin/polkadot-execute-worker ``` + - build Polkadot Parachain binary by running `cargo build -p polkadot-parachain-bin --release` command in the [`polkadot-sdk`](https://github.com/paritytech/polkadot-sdk) repository clone. Copy the binary to `~/local_bridge_testing/bin/polkadot-parachain`. - ensure that you have [`node`](https://nodejs.org/en) installed. Additionally, we'll need globally installed `polkadot/api-cli` / `polkadot/api` packages (use `yarn global add @polkadot/api-cli` to install it). - build Substrate relay by running `cargo build -p substrate-relay --release` command in the -[`parity-bridges-common`](https://github.com/paritytech/parity-bridges-common) repository clone. Copy the binary to `~/local_bridge_testing/bin/substrate-relay`. +[`parity-bridges-common`](https://github.com/paritytech/parity-bridges-common) repository clone. Copy the binary to `~/local_bridge_testing/bin/substrate-relay`. - build chain spec generator: - (you can use the current branch, or you can build generators from different branches, such as from specific tags or releases) - add the `sudo` pallet to the Polkadot and Kusama runtimes and give sudo rights to Alice, e.g. by running `git apply ./integration-tests/bridges/sudo-relay.patch` from the fellows root dir. diff --git a/pallets/ah-migrator/Cargo.toml b/pallets/ah-migrator/Cargo.toml index 8cbf1c155d..6c20c4650f 100644 --- a/pallets/ah-migrator/Cargo.toml +++ b/pallets/ah-migrator/Cargo.toml @@ -93,6 +93,7 @@ std = [ "pallet-rc-migrator/std", "pallet-referenda/std", "pallet-scheduler/std", + "pallet-staking-async/std", "pallet-staking/std", "pallet-state-trie-migration/std", "pallet-timestamp/std", @@ -118,7 +119,6 @@ std = [ "xcm-executor/std", "xcm-executor/std", "xcm/std", - "pallet-staking-async/std" ] runtime-benchmarks = [ "assets-common/runtime-benchmarks", @@ -145,6 +145,7 @@ runtime-benchmarks = [ "pallet-rc-migrator/runtime-benchmarks", "pallet-referenda/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", + "pallet-staking-async/runtime-benchmarks", "pallet-staking/runtime-benchmarks", "pallet-state-trie-migration/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", @@ -161,7 +162,6 @@ runtime-benchmarks = [ "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", "xcm/runtime-benchmarks", - "pallet-staking-async/runtime-benchmarks" # "asset-hub-polkadot-runtime/runtime-benchmarks" ] try-runtime = [ @@ -185,6 +185,7 @@ try-runtime = [ "pallet-rc-migrator/try-runtime", "pallet-referenda/try-runtime", "pallet-scheduler/try-runtime", + "pallet-staking-async/try-runtime", "pallet-staking/try-runtime", "pallet-state-trie-migration/try-runtime", "pallet-timestamp/try-runtime", @@ -193,5 +194,4 @@ try-runtime = [ "polkadot-runtime-common/try-runtime", "runtime-parachains/try-runtime", "sp-runtime/try-runtime", - "pallet-staking-async/try-runtime" ] diff --git a/pallets/rc-migrator/Cargo.toml b/pallets/rc-migrator/Cargo.toml index 35f7069d0d..d24f3fadea 100644 --- a/pallets/rc-migrator/Cargo.toml +++ b/pallets/rc-migrator/Cargo.toml @@ -80,6 +80,8 @@ std = [ "pallet-referenda/std", "pallet-scheduler/std", "pallet-session/std", + "pallet-staking-async-ah-client/std", + "pallet-staking-async/std", "pallet-staking/std", "pallet-state-trie-migration/std", "pallet-treasury/std", @@ -102,8 +104,6 @@ std = [ "xcm-executor/std", "xcm-executor/std", "xcm/std", - "pallet-staking-async/std", - "pallet-staking-async-ah-client/std" ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", @@ -125,6 +125,8 @@ runtime-benchmarks = [ "pallet-proxy/runtime-benchmarks", "pallet-referenda/runtime-benchmarks", "pallet-scheduler/runtime-benchmarks", + "pallet-staking-async-ah-client/runtime-benchmarks", + "pallet-staking-async/runtime-benchmarks", "pallet-staking/runtime-benchmarks", "pallet-state-trie-migration/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", @@ -139,8 +141,6 @@ runtime-benchmarks = [ "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", "xcm/runtime-benchmarks", - "pallet-staking-async/runtime-benchmarks", - "pallet-staking-async-ah-client/runtime-benchmarks" ] try-runtime = [ "frame-election-provider-support/try-runtime", @@ -162,6 +162,8 @@ try-runtime = [ "pallet-referenda/try-runtime", "pallet-scheduler/try-runtime", "pallet-session/try-runtime", + "pallet-staking-async-ah-client/try-runtime", + "pallet-staking-async/try-runtime", "pallet-staking/try-runtime", "pallet-state-trie-migration/try-runtime", "pallet-treasury/try-runtime", @@ -170,6 +172,4 @@ try-runtime = [ "polkadot-runtime-common/try-runtime", "runtime-parachains/try-runtime", "sp-runtime/try-runtime", - "pallet-staking-async/try-runtime", - "pallet-staking-async-ah-client/try-runtime" ] diff --git a/pallets/rc-migrator/README.md b/pallets/rc-migrator/README.md index f4e4d34f29..fcd1e717d2 100644 --- a/pallets/rc-migrator/README.md +++ b/pallets/rc-migrator/README.md @@ -25,6 +25,7 @@ fix this by either block number or on an era and submit this to the Relay Chain. ### Migration The migration will begin to run from the fixed block number and emit the following events to notify of this: + - `pallet_rc_migrator::AssetHubMigrationStarted` on the Relay Chain - `pallet_ah_migrator::AssetHubMigrationStarted` on the Asset Hub diff --git a/pallets/rc-migrator/src/accounts.md b/pallets/rc-migrator/src/accounts.md index 2715e5f10d..9b150af442 100644 --- a/pallets/rc-migrator/src/accounts.md +++ b/pallets/rc-migrator/src/accounts.md @@ -21,6 +21,7 @@ the Relay or a parachain (like Asset Hub). There are different kinds of sovereign accounts. In this context, we only focus on these parachain sovereign accounts: + - On the Relay: derived from `"para" ++ para_id ++ 00..` - On the Asset Hub and all other sibling parachains: derived from `"sibl" ++ para_id ++ 00..` @@ -82,26 +83,26 @@ Pallets Increasing Provider References (Polkadot / Kusama / Westend): - delegate_staking (P/K/W): One extra provider reference should be migrated to AH for every account with the hold reason `pallet_delegated_staking::HoldReason::StakingDelegation`. This ensures the entire balance, including the ED, can be staked via holds. -Source: https://github.com/paritytech/polkadot-sdk/blob/ab1e12ab6f6c3946c3c61b97328702e719cd1223/substrate/frame/delegated-staking/src/types.rs#L81 +Source: - parachains_on_demand (P/K/W): The on-demand pallet pot account should not be migrated to AH and will remain untouched. -Source: https://github.com/paritytech/polkadot-sdk/blob/ace62f120fbc9ec617d6bab0a5180f0be4441537/polkadot/runtime/parachains/src/on_demand/mod.rs#L407 +Source: - crowdloan (P/K/W): The provider reference for a crowdloan fund account allows it to exist without an ED until funding is received. Since new crowdloans can no longer be created, and only successful ones are being migrated, we don’t expect any new fund accounts below ED. This reference can be ignored. -Source: https://github.com/paritytech/polkadot-sdk/blob/9abe25d974f6045d1e97537e0f1e860459053722/polkadot/runtime/common/src/crowdloan/mod.rs#L417 +Source: - balances (P/K/W): No special handling is needed, as this is covered by the fungible implementation during injection on AH. -Source: https://github.com/paritytech/polkadot-sdk/blob/9abe25d974f6045d1e97537e0f1e860459053722/substrate/frame/balances/src/lib.rs#L1035 +Source: - session (P/K/W): Validator accounts may receive a provider reference at genesis if they did not previously exist. This is not relevant for migration. Even if a validator is fully reaped during migration, they can restore their account by teleporting funds to RC post-migration. -Source: https://github.com/paritytech/polkadot-sdk/blob/8d4138f77106a6af49920ad84f3283f696f3f905/substrate/frame/session/src/lib.rs#L462-L465 +Source: - broker (//_): Not relevant for RC and AH runtimes. @@ -109,23 +110,22 @@ Pallets Increasing Consumer References (Polkadot / Kusama / Westend): - balances (P/K/W): No custom handling is required, as this is covered by the fungible implementation during account injection on AH. -Source: https://github.com/paritytech/polkadot-sdk/blob/9abe25d974f6045d1e97537e0f1e860459053722/substrate/frame/balances/src/lib.rs#L1035 +Source: - recovery (/K/W): A consumer reference is added to the proxy account when it claims an already initiated recovery process. This reference is later removed when the recovery process ends. For simplicity, we can ignore this consumer reference, as it might affect only a small number of accounts, and a decrease without a prior increase will not cause any issues. See test: `polkadot_integration_tests_ahm::tests::test_account_references` -Source: https://github.com/paritytech/polkadot-sdk/blob/ace62f120fbc9ec617d6bab0a5180f0be4441537/substrate/frame/recovery/src/lib.rs#L610 +Source: - session (P/K/W): TODO: @Ank4n session set keys moving to AH -Source: https://github.com/paritytech/polkadot-sdk/blob/ace62f120fbc9ec617d6bab0a5180f0be4441537/substrate/frame/session/src/lib.rs#L812 +Source: - staking (P/K/W): No references are migrated in the new staking pallet version; legacy references are not relevant. - assets, contracts, nfts, uniques, revive (//): Not relevant for RC and AH runtimes. - ### XCM "Checking Account" and DOT/KSM Total Issuance Tracking The Relay Chain is currently the "native location" of DOT/KSM, and it is responsible for keeping @@ -156,19 +156,18 @@ the source of truth for DOT/KSM *total issuance*. | DOT Teleports (in or out) | **Relay** | **AH** | |----------|-----|--------| -| _Before_ | Yes | Yes | -| _During_ | No | No | -| _After_ | Yes | Yes | - +| *Before* | Yes | Yes | +| *During* | No | No | +| *After* | Yes | Yes | The runtime configurations of Relay and AH need to change in terms of how they use the checking account before, during and after the migration. | DOT Teleports tracking in Checking Account | **Relay** | **AH** | |----------|-----------|--------| -| _Before_ | Yes, MintLocal | No Checking | -| _During_ | No Checking | No Checking | -| _After_ | No Checking | Yes, MintLocal | +| *Before* | Yes, MintLocal | No Checking | +| *During* | No Checking | No Checking | +| *After* | No Checking | Yes, MintLocal | #### Tracking Total Issuance Post-Migration @@ -186,30 +185,30 @@ To achieve this, we implement the following arithmetic algorithm: After all accounts (including checking account) are migrated from RC to AH: ``` - ah_checking_intermediate = ah_check_before + rc_check_before - (0) rc_check_before = ah_checking_intermediate - ah_check_before - - Invariants: - (1) rc_check_before = sum_total_before(ah, bh, collectives, coretime, people) - (2) rc_check_before = sum_total_before(bh, collectives, coretime, people) + ah_total_before - - Because teleports are disabled for RC and AH during migration, we can say: - (3) sum_total_before(bh, collectives, coretime, people) = sum_total_after(bh, collectives, coretime, people) - - Ergo use (3) in (2): - (4) rc_check_before = sum_total_after(bh, collectives, coretime, people) + ah_total_before - - We want: - ah_check_after = sum_total_after(rc, bh, collectives, coretime, people) - ah_check_after = sum_total_after(bh, collectives, coretime, people) + rc_balance_kept - Use (3): - ah_check_after = sum_total_before(bh, collectives, coretime, people) + rc_balance_kept - ah_check_after = sum_total_before(ah, bh, collectives, coretime, people) - ah_total_before + rc_balance_kept - Use (1): - ah_check_after = rc_check_before - ah_total_before + rc_balance_kept - - Finally use (0): - ah_check_after = ah_checking_intermediate - ah_check_before - ah_total_before + rc_balance_kept + ah_checking_intermediate = ah_check_before + rc_check_before + (0) rc_check_before = ah_checking_intermediate - ah_check_before + + Invariants: + (1) rc_check_before = sum_total_before(ah, bh, collectives, coretime, people) + (2) rc_check_before = sum_total_before(bh, collectives, coretime, people) + ah_total_before + + Because teleports are disabled for RC and AH during migration, we can say: + (3) sum_total_before(bh, collectives, coretime, people) = sum_total_after(bh, collectives, coretime, people) + + Ergo use (3) in (2): + (4) rc_check_before = sum_total_after(bh, collectives, coretime, people) + ah_total_before + + We want: + ah_check_after = sum_total_after(rc, bh, collectives, coretime, people) + ah_check_after = sum_total_after(bh, collectives, coretime, people) + rc_balance_kept + Use (3): + ah_check_after = sum_total_before(bh, collectives, coretime, people) + rc_balance_kept + ah_check_after = sum_total_before(ah, bh, collectives, coretime, people) - ah_total_before + rc_balance_kept + Use (1): + ah_check_after = rc_check_before - ah_total_before + rc_balance_kept + + Finally use (0): + ah_check_after = ah_checking_intermediate - ah_check_before - ah_total_before + rc_balance_kept ``` At which point, `ah_total_issuance_after` should equal `rc_total_issuance_before`. diff --git a/pallets/rc-migrator/src/multisig.md b/pallets/rc-migrator/src/multisig.md index 6d3b2d29f1..9428ff0c47 100644 --- a/pallets/rc-migrator/src/multisig.md +++ b/pallets/rc-migrator/src/multisig.md @@ -18,7 +18,7 @@ approvals on a specific call hash by the Multisig members. One thing to consider is that Multisigs are constructed from account IDs. In order to allow the same Multisigs to be re-created, it is paramount to keep all account IDs that were accessible on the -relay still accessible, hence: https://github.com/polkadot-fellows/runtimes/issues/526. Otherwise it +relay still accessible, hence: . Otherwise it could happen that a Multisig cannot be re-created and loses funds to its associated accounts. Note: I considered an XCM where the call is sent back to the relay to execute instead of executing diff --git a/pallets/rc-migrator/src/preimage/preimage.md b/pallets/rc-migrator/src/preimage/preimage.md index b5cd90a3d9..449fe60e08 100644 --- a/pallets/rc-migrator/src/preimage/preimage.md +++ b/pallets/rc-migrator/src/preimage/preimage.md @@ -23,6 +23,7 @@ Deprecated. Will not be migrated but funds will be unreserved. ## User Impact For anyone who has registered a preimage: + - If the preimage was in the new RequestStatusFor: Some unlocked funds 😎. We cannot calculate a list of affected accounts in advance since users can still influence this. - If the preimage was in the old StatusFor: will be removed and funds unlocked. [Exhaustive list](https://github.com/ggwpez/substrate-scripts/blob/master/ahm-preimage-statusfor-accounts.py) of all 166 Polkadot accounts that are affected by this and will have **UP TO** these funds unlocked (not a legally binding statement): diff --git a/pallets/rc-migrator/src/scheduler.md b/pallets/rc-migrator/src/scheduler.md index 7dfd3519e4..9634074ea8 100644 --- a/pallets/rc-migrator/src/scheduler.md +++ b/pallets/rc-migrator/src/scheduler.md @@ -1,9 +1,10 @@ # Scheduler Pallet Based on the scheduler pallet's usage in the Polkadot/Kusama runtime, it primarily contains two types of tasks: + 1. Tasks from passed referendums 2. Service tasks from the referendum pallet, specifically `nudge_referendum` and `refund_submission_deposit` We plan to map all calls that are used in the Governance by inspecting the production snapshots. -During the migration process, we will disable the processing of scheduled tasks on both the Relay Chain and Asset Hub. This is achieved by setting the `MaximumWeight` parameter to zero for the scheduler using the `rc_pallet_migrator::types::LeftOrRight` helper type. Once the migration is complete, any tasks that are due for execution on Asset Hub will be processed, even if they are delayed. This behavior is appropriate for both types of tasks we handle. \ No newline at end of file +During the migration process, we will disable the processing of scheduled tasks on both the Relay Chain and Asset Hub. This is achieved by setting the `MaximumWeight` parameter to zero for the scheduler using the `rc_pallet_migrator::types::LeftOrRight` helper type. Once the migration is complete, any tasks that are due for execution on Asset Hub will be processed, even if they are delayed. This behavior is appropriate for both types of tasks we handle. diff --git a/pallets/rc-migrator/src/staking/nom_pools.md b/pallets/rc-migrator/src/staking/nom_pools.md index 68978011b1..705057079c 100644 --- a/pallets/rc-migrator/src/staking/nom_pools.md +++ b/pallets/rc-migrator/src/staking/nom_pools.md @@ -15,6 +15,7 @@ to Relay Chain Block number provider. ## User Impact Impact here is negligible and only for pool operators - not members: + - Pool commission change rate (measured in blocks) could be decreased by one block. - Pool operators may be able to change the commission rate one block later than anticipated. This is due to the nature or translating blocks of two different blockchains which does not yield diff --git a/pallets/rc-migrator/src/treasury.md b/pallets/rc-migrator/src/treasury.md index 954de55fab..1c436039e0 100644 --- a/pallets/rc-migrator/src/treasury.md +++ b/pallets/rc-migrator/src/treasury.md @@ -23,6 +23,7 @@ and this account will be used for all future spends. The `Beneficiary` parameter of the spend call has changed from `xcm::Location` to two dimensional type: + ``` rust struct LocatableBeneficiary { // Deposit location. diff --git a/pallets/rc-migrator/src/vesting.md b/pallets/rc-migrator/src/vesting.md index eb6cf87916..a56a3b8636 100644 --- a/pallets/rc-migrator/src/vesting.md +++ b/pallets/rc-migrator/src/vesting.md @@ -25,7 +25,6 @@ The vesting pallet is not using the proper FRAME version tracking; rather, it tr the `StorageVersion` value. It does this incorrectly though, with Asset Hub reporting version 0 instead of 1. We ignore and correct this by writing 1 to the storage. - ## User Impact This affects users that have vesting schedules on the Relay chain or on Asset Hub. There exists a diff --git a/pallets/rc-migrator/src/xcm.md b/pallets/rc-migrator/src/xcm.md index 716ac7e9de..5a5e468524 100644 --- a/pallets/rc-migrator/src/xcm.md +++ b/pallets/rc-migrator/src/xcm.md @@ -1,6 +1,7 @@ # XCM configuration changes for AHM -## TODOs: +## TODOs + -[ ] TODO: @acatangiu. Post migration we need to switch all system chains XCM transport fees beneficiary from `RelayTreasuryLocation` to the new `AssetHubTreasuryLocation`. Does not necessarily need to be done _synchronously during AHM_, so let's do it after the migration ends successfully. Besides the From 3e6b45d85fe3218400cb9f78665373d9a3d2ac3e Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 23 Jul 2025 17:53:18 +0200 Subject: [PATCH 14/14] fix test Signed-off-by: Oliver Tale-Yazdi --- pallets/ah-migrator/src/staking/checks.rs | 3 +-- pallets/ah-migrator/src/staking/staking.rs | 14 +++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pallets/ah-migrator/src/staking/checks.rs b/pallets/ah-migrator/src/staking/checks.rs index 9f6251a8ce..b616120e51 100644 --- a/pallets/ah-migrator/src/staking/checks.rs +++ b/pallets/ah-migrator/src/staking/checks.rs @@ -133,8 +133,7 @@ impl crate::types::AhMigrationCheck pallet_staking_async::ErasTotalStake::::iter().collect::>() ); check_unapplied_slashes::(rc.unapplied_slashes); - // TODO assert_eq!(rc.bonded_eras, - // pallet_staking_async::BondedEras::::get().into_inner()); + assert_eq!(rc.bonded_eras, pallet_staking_async::BondedEras::::get().into_inner()); assert_eq!( rc.validator_slash_in_era, pallet_staking_async::ValidatorSlashInEra::::iter().collect::>() diff --git a/pallets/ah-migrator/src/staking/staking.rs b/pallets/ah-migrator/src/staking/staking.rs index c5afad9073..87cb6551b4 100644 --- a/pallets/ah-migrator/src/staking/staking.rs +++ b/pallets/ah-migrator/src/staking/staking.rs @@ -134,11 +134,15 @@ impl Pallet { let slash: pallet_staking_async::UnappliedSlash<_> = slash.into(); pallet_staking_async::UnappliedSlashes::::insert(era, slash_key, slash); }, - BondedEras(bonded_eras) => { - log::debug!(target: LOG_TARGET, "Integrating BondedEras"); - let bounded: BoundedVec<_, _> = bonded_eras.clone().defensive_truncate_into(); - pallet_staking_async::BondedEras::::put(bounded); - }, + BondedEras(bonded_eras) => + if pallet_staking_async::BondedEras::::exists() { + log::error!("BondedEras already exists, skipping insert"); + defensive_assert!(bonded_eras.is_empty()); + } else { + log::debug!(target: LOG_TARGET, "Integrating BondedEras"); + let bounded: BoundedVec<_, _> = bonded_eras.clone().defensive_truncate_into(); + pallet_staking_async::BondedEras::::put(bounded); + }, ValidatorSlashInEra { era, validator, slash } => { log::debug!(target: LOG_TARGET, "Integrating ValidatorSlashInEra {:?}/{:?}", validator, era); pallet_staking_async::ValidatorSlashInEra::::insert(era, validator, slash);