Skip to content

Commit

Permalink
companion for substrate #13237 (#6626)
Browse files Browse the repository at this point in the history
* companion for paritytech/substrate#13237

* test-runtime: add MaxSetIdSessionEntries

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
  • Loading branch information
andresilva authored Jan 30, 2023
1 parent 9b33499 commit f131c08
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,10 @@ impl pallet_im_online::Config for Runtime {
type MaxPeerDataEncodingSize = MaxPeerDataEncodingSize;
}

parameter_types! {
pub MaxSetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get();
}

impl pallet_grandpa::Config for Runtime {
type RuntimeEvent = RuntimeEvent;

Expand All @@ -743,6 +747,7 @@ impl pallet_grandpa::Config for Runtime {

type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxSetIdSessionEntries = MaxSetIdSessionEntries;
}

/// Submits transaction with the node's public and signature type. Adheres to the signed extension
Expand Down Expand Up @@ -1484,6 +1489,10 @@ pub type Migrations = (
// "Use 2D weights in XCM v3" <https://github.com/paritytech/polkadot/pull/6134>
pallet_xcm::migration::v1::MigrateToV1<Runtime>,
parachains_ump::migration::v1::MigrateToV1<Runtime>,
// Remove stale entries in the set id -> session index storage map (after
// this release they will be properly pruned after the bonding duration has
// elapsed)
pallet_grandpa::migrations::CleanupSetIdSessionMap<Runtime>,
);

/// Unchecked extrinsic type as expected by this runtime.
Expand Down
9 changes: 9 additions & 0 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,10 @@ impl pallet_im_online::Config for Runtime {
type MaxPeerDataEncodingSize = MaxPeerDataEncodingSize;
}

parameter_types! {
pub MaxSetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get();
}

impl pallet_grandpa::Config for Runtime {
type RuntimeEvent = RuntimeEvent;

Expand All @@ -955,6 +959,7 @@ impl pallet_grandpa::Config for Runtime {

type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
type MaxSetIdSessionEntries = MaxSetIdSessionEntries;
}

/// Submits a transaction with the node's public and signature type. Adheres to the signed extension
Expand Down Expand Up @@ -1600,6 +1605,10 @@ pub type Migrations = (
// "Use 2D weights in XCM v3" <https://github.com/paritytech/polkadot/pull/6134>
pallet_xcm::migration::v1::MigrateToV1<Runtime>,
parachains_ump::migration::v1::MigrateToV1<Runtime>,
// Remove stale entries in the set id -> session index storage map (after
// this release they will be properly pruned after the bonding duration has
// elapsed)
pallet_grandpa::migrations::CleanupSetIdSessionMap<Runtime>,
);

/// Unchecked extrinsic type as expected by this runtime.
Expand Down

0 comments on commit f131c08

Please sign in to comment.