Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Update all uses of pallet-aura to disallow multiple blocks per slot
Browse files Browse the repository at this point in the history
  • Loading branch information
rphmeier committed Jun 8, 2023
1 parent 6f3a7db commit 43c3690
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pallets/collator-selection/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,15 @@ impl pallet_timestamp::Config for Test {
type WeightInfo = ();
}

parameter_types! {
pub const AllowMultipleBlocksPerSlot: bool = false;
}

impl pallet_aura::Config for Test {
type AuthorityId = sp_consensus_aura::sr25519::AuthorityId;
type MaxAuthorities = ConstU32<100_000>;
type DisabledValidators = ();
type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot;
}

sp_runtime::impl_opaque_keys! {
Expand Down
5 changes: 5 additions & 0 deletions parachain-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,15 @@ impl pallet_session::Config for Runtime {
type WeightInfo = ();
}

parameter_types! {
pub const AllowMultipleBlocksPerSlot: bool = false;
}

impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot;
}

parameter_types! {
Expand Down
5 changes: 5 additions & 0 deletions parachains/runtimes/assets/asset-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,15 @@ impl pallet_session::Config for Runtime {
type WeightInfo = weights::pallet_session::WeightInfo<Runtime>;
}

parameter_types! {
pub const AllowMultipleBlocksPerSlot: bool = false;
}

impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot;
}

parameter_types! {
Expand Down
5 changes: 5 additions & 0 deletions parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,15 @@ impl pallet_session::Config for Runtime {
type WeightInfo = weights::pallet_session::WeightInfo<Runtime>;
}

parameter_types! {
pub const AllowMultipleBlocksPerSlot: bool = false;
}

impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot;
}

parameter_types! {
Expand Down
5 changes: 5 additions & 0 deletions parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,15 @@ impl pallet_session::Config for Runtime {
type WeightInfo = weights::pallet_session::WeightInfo<Runtime>;
}

parameter_types! {
pub const AllowMultipleBlocksPerSlot: bool = false;
}

impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot;
}

parameter_types! {
Expand Down
5 changes: 5 additions & 0 deletions parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,15 @@ impl pallet_session::Config for Runtime {
type WeightInfo = weights::pallet_session::WeightInfo<Runtime>;
}

parameter_types! {
pub const AllowMultipleBlocksPerSlot: bool = false;
}

impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot;
}

parameter_types! {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,15 @@ impl pallet_session::Config for Runtime {
type WeightInfo = weights::pallet_session::WeightInfo<Runtime>;
}

parameter_types! {
pub const AllowMultipleBlocksPerSlot: bool = false;
}

impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot;
}

parameter_types! {
Expand Down
5 changes: 5 additions & 0 deletions parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,15 @@ impl pallet_session::Config for Runtime {
type WeightInfo = weights::pallet_session::WeightInfo<Runtime>;
}

parameter_types! {
pub const AllowMultipleBlocksPerSlot: bool = false;
}

impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot;
}

parameter_types! {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,15 @@ impl pallet_session::Config for Runtime {
type WeightInfo = weights::pallet_session::WeightInfo<Runtime>;
}

parameter_types! {
pub const AllowMultipleBlocksPerSlot: bool = false;
}

impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot;
}

parameter_types! {
Expand Down
5 changes: 5 additions & 0 deletions parachains/runtimes/contracts/contracts-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,15 @@ impl pallet_session::Config for Runtime {
type WeightInfo = pallet_session::weights::SubstrateWeight<Runtime>;
}

parameter_types! {
pub const AllowMultipleBlocksPerSlot: bool = false;
}

impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot;
}

parameter_types! {
Expand Down
5 changes: 5 additions & 0 deletions parachains/runtimes/testing/penpal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,15 @@ impl pallet_session::Config for Runtime {
type WeightInfo = ();
}

parameter_types! {
pub const AllowMultipleBlocksPerSlot: bool = false;
}

impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot;
}

parameter_types! {
Expand Down
5 changes: 5 additions & 0 deletions parachains/runtimes/testing/rococo-parachain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,15 @@ impl pallet_assets::Config for Runtime {
type BenchmarkHelper = ();
}

parameter_types! {
pub const AllowMultipleBlocksPerSlot: bool = false;
}

impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot;
}

construct_runtime! {
Expand Down

0 comments on commit 43c3690

Please sign in to comment.