mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
Update all uses of pallet-aura to disallow multiple blocks per slot (#2707)
* Update all uses of pallet-aura to disallow multiple blocks per slot
* use ConstBool
* update lockfile for {"substrate", "polkadot"}
---------
Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+193
-193
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,7 @@ use super::*;
|
|||||||
use crate as collator_selection;
|
use crate as collator_selection;
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
ord_parameter_types, parameter_types,
|
ord_parameter_types, parameter_types,
|
||||||
traits::{ConstU32, ConstU64, FindAuthor, GenesisBuild, ValidatorRegistration},
|
traits::{ConstBool, ConstU32, ConstU64, FindAuthor, GenesisBuild, ValidatorRegistration},
|
||||||
PalletId,
|
PalletId,
|
||||||
};
|
};
|
||||||
use frame_system as system;
|
use frame_system as system;
|
||||||
@@ -128,6 +128,7 @@ impl pallet_aura::Config for Test {
|
|||||||
type AuthorityId = sp_consensus_aura::sr25519::AuthorityId;
|
type AuthorityId = sp_consensus_aura::sr25519::AuthorityId;
|
||||||
type MaxAuthorities = ConstU32<100_000>;
|
type MaxAuthorities = ConstU32<100_000>;
|
||||||
type DisabledValidators = ();
|
type DisabledValidators = ();
|
||||||
|
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||||
}
|
}
|
||||||
|
|
||||||
sp_runtime::impl_opaque_keys! {
|
sp_runtime::impl_opaque_keys! {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ use frame_support::{
|
|||||||
construct_runtime,
|
construct_runtime,
|
||||||
dispatch::DispatchClass,
|
dispatch::DispatchClass,
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything},
|
traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything},
|
||||||
weights::{
|
weights::{
|
||||||
constants::WEIGHT_REF_TIME_PER_SECOND, ConstantMultiplier, Weight, WeightToFeeCoefficient,
|
constants::WEIGHT_REF_TIME_PER_SECOND, ConstantMultiplier, Weight, WeightToFeeCoefficient,
|
||||||
WeightToFeeCoefficients, WeightToFeePolynomial,
|
WeightToFeeCoefficients, WeightToFeePolynomial,
|
||||||
@@ -422,6 +422,7 @@ impl pallet_aura::Config for Runtime {
|
|||||||
type AuthorityId = AuraId;
|
type AuthorityId = AuraId;
|
||||||
type DisabledValidators = ();
|
type DisabledValidators = ();
|
||||||
type MaxAuthorities = ConstU32<100_000>;
|
type MaxAuthorities = ConstU32<100_000>;
|
||||||
|
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -52,7 +52,10 @@ use frame_support::{
|
|||||||
construct_runtime,
|
construct_runtime,
|
||||||
dispatch::DispatchClass,
|
dispatch::DispatchClass,
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{AsEnsureOriginWithArg, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter},
|
traits::{
|
||||||
|
AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse,
|
||||||
|
InstanceFilter,
|
||||||
|
},
|
||||||
weights::{ConstantMultiplier, Weight},
|
weights::{ConstantMultiplier, Weight},
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
};
|
};
|
||||||
@@ -582,6 +585,7 @@ impl pallet_aura::Config for Runtime {
|
|||||||
type AuthorityId = AuraId;
|
type AuthorityId = AuraId;
|
||||||
type DisabledValidators = ();
|
type DisabledValidators = ();
|
||||||
type MaxAuthorities = ConstU32<100_000>;
|
type MaxAuthorities = ConstU32<100_000>;
|
||||||
|
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -87,7 +87,10 @@ use frame_support::{
|
|||||||
construct_runtime,
|
construct_runtime,
|
||||||
dispatch::DispatchClass,
|
dispatch::DispatchClass,
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{AsEnsureOriginWithArg, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter},
|
traits::{
|
||||||
|
AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse,
|
||||||
|
InstanceFilter,
|
||||||
|
},
|
||||||
weights::{ConstantMultiplier, Weight},
|
weights::{ConstantMultiplier, Weight},
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
};
|
};
|
||||||
@@ -599,6 +602,7 @@ impl pallet_aura::Config for Runtime {
|
|||||||
type AuthorityId = AuraId;
|
type AuthorityId = AuraId;
|
||||||
type DisabledValidators = ();
|
type DisabledValidators = ();
|
||||||
type MaxAuthorities = ConstU32<100_000>;
|
type MaxAuthorities = ConstU32<100_000>;
|
||||||
|
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ use frame_support::{
|
|||||||
dispatch::DispatchClass,
|
dispatch::DispatchClass,
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{
|
traits::{
|
||||||
tokens::nonfungibles_v2::Inspect, AsEnsureOriginWithArg, ConstU32, ConstU64, ConstU8,
|
tokens::nonfungibles_v2::Inspect, AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64,
|
||||||
InstanceFilter,
|
ConstU8, InstanceFilter,
|
||||||
},
|
},
|
||||||
weights::{ConstantMultiplier, Weight},
|
weights::{ConstantMultiplier, Weight},
|
||||||
BoundedVec, PalletId, RuntimeDebug,
|
BoundedVec, PalletId, RuntimeDebug,
|
||||||
@@ -558,6 +558,7 @@ impl pallet_aura::Config for Runtime {
|
|||||||
type AuthorityId = AuraId;
|
type AuthorityId = AuraId;
|
||||||
type DisabledValidators = ();
|
type DisabledValidators = ();
|
||||||
type MaxAuthorities = ConstU32<100_000>;
|
type MaxAuthorities = ConstU32<100_000>;
|
||||||
|
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ use frame_support::{
|
|||||||
construct_runtime,
|
construct_runtime,
|
||||||
dispatch::DispatchClass,
|
dispatch::DispatchClass,
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything},
|
traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything},
|
||||||
weights::{ConstantMultiplier, Weight},
|
weights::{ConstantMultiplier, Weight},
|
||||||
PalletId,
|
PalletId,
|
||||||
};
|
};
|
||||||
@@ -342,6 +342,7 @@ impl pallet_aura::Config for Runtime {
|
|||||||
type AuthorityId = AuraId;
|
type AuthorityId = AuraId;
|
||||||
type DisabledValidators = ();
|
type DisabledValidators = ();
|
||||||
type MaxAuthorities = ConstU32<100_000>;
|
type MaxAuthorities = ConstU32<100_000>;
|
||||||
|
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ use frame_support::{
|
|||||||
construct_runtime,
|
construct_runtime,
|
||||||
dispatch::DispatchClass,
|
dispatch::DispatchClass,
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything},
|
traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything},
|
||||||
weights::{ConstantMultiplier, Weight},
|
weights::{ConstantMultiplier, Weight},
|
||||||
PalletId,
|
PalletId,
|
||||||
};
|
};
|
||||||
@@ -342,6 +342,7 @@ impl pallet_aura::Config for Runtime {
|
|||||||
type AuthorityId = AuraId;
|
type AuthorityId = AuraId;
|
||||||
type DisabledValidators = ();
|
type DisabledValidators = ();
|
||||||
type MaxAuthorities = ConstU32<100_000>;
|
type MaxAuthorities = ConstU32<100_000>;
|
||||||
|
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ use frame_support::{
|
|||||||
construct_runtime,
|
construct_runtime,
|
||||||
dispatch::DispatchClass,
|
dispatch::DispatchClass,
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{ConstU32, ConstU64, ConstU8, Everything},
|
traits::{ConstBool, ConstU32, ConstU64, ConstU8, Everything},
|
||||||
weights::{ConstantMultiplier, Weight},
|
weights::{ConstantMultiplier, Weight},
|
||||||
PalletId,
|
PalletId,
|
||||||
};
|
};
|
||||||
@@ -346,6 +346,7 @@ impl pallet_aura::Config for Runtime {
|
|||||||
type AuthorityId = AuraId;
|
type AuthorityId = AuraId;
|
||||||
type DisabledValidators = ();
|
type DisabledValidators = ();
|
||||||
type MaxAuthorities = ConstU32<100_000>;
|
type MaxAuthorities = ConstU32<100_000>;
|
||||||
|
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ use frame_support::{
|
|||||||
construct_runtime,
|
construct_runtime,
|
||||||
dispatch::DispatchClass,
|
dispatch::DispatchClass,
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{ConstU16, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter},
|
traits::{ConstBool, ConstU16, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter},
|
||||||
weights::{ConstantMultiplier, Weight},
|
weights::{ConstantMultiplier, Weight},
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
};
|
};
|
||||||
@@ -415,6 +415,7 @@ impl pallet_aura::Config for Runtime {
|
|||||||
type AuthorityId = AuraId;
|
type AuthorityId = AuraId;
|
||||||
type DisabledValidators = ();
|
type DisabledValidators = ();
|
||||||
type MaxAuthorities = ConstU32<100_000>;
|
type MaxAuthorities = ConstU32<100_000>;
|
||||||
|
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ use frame_support::{
|
|||||||
construct_runtime,
|
construct_runtime,
|
||||||
dispatch::DispatchClass,
|
dispatch::DispatchClass,
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Everything},
|
traits::{ConstBool, ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Everything},
|
||||||
weights::{ConstantMultiplier, Weight},
|
weights::{ConstantMultiplier, Weight},
|
||||||
PalletId,
|
PalletId,
|
||||||
};
|
};
|
||||||
@@ -310,6 +310,7 @@ impl pallet_aura::Config for Runtime {
|
|||||||
type AuthorityId = AuraId;
|
type AuthorityId = AuraId;
|
||||||
type DisabledValidators = ();
|
type DisabledValidators = ();
|
||||||
type MaxAuthorities = ConstU32<100_000>;
|
type MaxAuthorities = ConstU32<100_000>;
|
||||||
|
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ use frame_support::{
|
|||||||
dispatch::DispatchClass,
|
dispatch::DispatchClass,
|
||||||
pallet_prelude::Weight,
|
pallet_prelude::Weight,
|
||||||
parameter_types,
|
parameter_types,
|
||||||
traits::{AsEnsureOriginWithArg, ConstU32, ConstU64, ConstU8, Everything},
|
traits::{AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, Everything},
|
||||||
weights::{
|
weights::{
|
||||||
constants::WEIGHT_REF_TIME_PER_SECOND, ConstantMultiplier, FeePolynomial,
|
constants::WEIGHT_REF_TIME_PER_SECOND, ConstantMultiplier, FeePolynomial,
|
||||||
WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
|
WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
|
||||||
@@ -506,6 +506,7 @@ impl pallet_aura::Config for Runtime {
|
|||||||
type AuthorityId = AuraId;
|
type AuthorityId = AuraId;
|
||||||
type DisabledValidators = ();
|
type DisabledValidators = ();
|
||||||
type MaxAuthorities = ConstU32<100_000>;
|
type MaxAuthorities = ConstU32<100_000>;
|
||||||
|
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ pub use frame_support::{
|
|||||||
dispatch::DispatchClass,
|
dispatch::DispatchClass,
|
||||||
match_types, parameter_types,
|
match_types, parameter_types,
|
||||||
traits::{
|
traits::{
|
||||||
AsEnsureOriginWithArg, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, IsInVec,
|
AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything,
|
||||||
Nothing, Randomness,
|
IsInVec, Nothing, Randomness,
|
||||||
},
|
},
|
||||||
weights::{
|
weights::{
|
||||||
constants::{
|
constants::{
|
||||||
@@ -554,6 +554,7 @@ impl pallet_aura::Config for Runtime {
|
|||||||
type AuthorityId = AuraId;
|
type AuthorityId = AuraId;
|
||||||
type DisabledValidators = ();
|
type DisabledValidators = ();
|
||||||
type MaxAuthorities = ConstU32<100_000>;
|
type MaxAuthorities = ConstU32<100_000>;
|
||||||
|
type AllowMultipleBlocksPerSlot = ConstBool<false>;
|
||||||
}
|
}
|
||||||
|
|
||||||
construct_runtime! {
|
construct_runtime! {
|
||||||
|
|||||||
Reference in New Issue
Block a user