Unverified Commit 06b68cae authored by Georges's avatar Georges Committed by GitHub
Browse files

Companion for Generate storage info for pallet authority_discovery #9428 (#3517)

* Fixing Polkadot after substrate changes

moving Vec to BoundedVec

* Removing changes to pallet aura
bumping bitflags version

* update Substrate

Co-authored-by: parity-processbot <>
parent 54d1cb91
Pipeline #154673 passed with stages
in 43 minutes and 48 seconds
This diff is collapsed.
......@@ -676,6 +676,7 @@ parameter_types! {
pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
pub const BountyValueMinimum: Balance = 200 * CENTS;
pub const MaxApprovals: u32 = 100;
pub const MaxAuthorities: u32 = 100_000;
}
type ApproveOrigin = EnsureOneOf<
......@@ -730,7 +731,9 @@ impl pallet_offences::Config for Runtime {
type OnOffenceHandler = Staking;
}
impl pallet_authority_discovery::Config for Runtime {}
impl pallet_authority_discovery::Config for Runtime {
type MaxAuthorities = MaxAuthorities;
}
parameter_types! {
pub NposSolutionPriority: TransactionPriority =
......
......@@ -11,7 +11,7 @@ log = { version = "0.4.14", default-features = false }
rustc-hex = { version = "2.1.0", default-features = false }
serde = { version = "1.0.123", features = [ "derive" ], optional = true }
derive_more = "0.99.14"
bitflags = "1"
bitflags = "1.3.2"
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
......
......@@ -246,8 +246,8 @@ pub fn relevant_authority_ids<T: initializer::Config + pallet_authority_discover
// Due to `max_validators`, the `SessionInfo` stores only the validators who are actively
// selected to participate in parachain consensus. We'd like all authorities for the current
// and next sessions to be used in authority-discovery. The two sets likely have large overlap.
let mut authority_ids = <pallet_authority_discovery::Pallet<T>>::current_authorities();
authority_ids.extend(<pallet_authority_discovery::Pallet<T>>::next_authorities());
let mut authority_ids = <pallet_authority_discovery::Pallet<T>>::current_authorities().to_vec();
authority_ids.extend(<pallet_authority_discovery::Pallet<T>>::next_authorities().to_vec());
// Due to disputes, we'd like to remain connected to authorities of the previous few sessions.
// For this, we don't need anyone other than the validators actively participating in consensus.
......
......@@ -74,7 +74,7 @@ pub trait AuthorityDiscoveryConfig {
impl<T: pallet_authority_discovery::Config> AuthorityDiscoveryConfig for T {
fn authorities() -> Vec<AuthorityDiscoveryId> {
<pallet_authority_discovery::Pallet<T>>::current_authorities()
<pallet_authority_discovery::Pallet<T>>::current_authorities().to_vec()
}
}
......
......@@ -676,6 +676,7 @@ parameter_types! {
pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
pub const BountyValueMinimum: Balance = 10 * DOLLARS;
pub const MaxApprovals: u32 = 100;
pub const MaxAuthorities: u32 = 100_000;
}
type ApproveOrigin = EnsureOneOf<
......@@ -730,7 +731,9 @@ impl pallet_offences::Config for Runtime {
type OnOffenceHandler = Staking;
}
impl pallet_authority_discovery::Config for Runtime {}
impl pallet_authority_discovery::Config for Runtime {
type MaxAuthorities = MaxAuthorities;
}
parameter_types! {
pub NposSolutionPriority: TransactionPriority =
......
......@@ -422,6 +422,7 @@ where
parameter_types! {
pub const MaxRetries: u32 = 3;
pub const MaxAuthorities: u32 = 100_000;
}
impl pallet_offences::Config for Runtime {
......@@ -430,7 +431,9 @@ impl pallet_offences::Config for Runtime {
type OnOffenceHandler = ();
}
impl pallet_authority_discovery::Config for Runtime {}
impl pallet_authority_discovery::Config for Runtime {
type MaxAuthorities = MaxAuthorities;
}
parameter_types! {
pub const MinimumPeriod: u64 = SLOT_DURATION / 2;
......
......@@ -310,6 +310,7 @@ parameter_types! {
pub storage SlashDeferDuration: pallet_staking::EraIndex = 27;
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
pub storage MaxNominatorRewardedPerValidator: u32 = 64;
pub const MaxAuthorities: u32 = 100_000;
}
impl frame_election_provider_support::onchain::Config for Runtime {
......@@ -413,7 +414,9 @@ impl pallet_offences::Config for Runtime {
type OnOffenceHandler = Staking;
}
impl pallet_authority_discovery::Config for Runtime {}
impl pallet_authority_discovery::Config for Runtime {
type MaxAuthorities = MaxAuthorities;
}
parameter_types! {
pub storage LeasePeriod: BlockNumber = 100_000;
......
......@@ -445,6 +445,7 @@ parameter_types! {
// One cent: $10,000 / MB
pub const PreimageByteDeposit: Balance = 10 * MILLICENTS;
pub const InstantAllowed: bool = true;
pub const MaxAuthorities: u32 = 100_000;
}
impl pallet_offences::Config for Runtime {
......@@ -453,7 +454,9 @@ impl pallet_offences::Config for Runtime {
type OnOffenceHandler = Staking;
}
impl pallet_authority_discovery::Config for Runtime {}
impl pallet_authority_discovery::Config for Runtime {
type MaxAuthorities = MaxAuthorities;
}
parameter_types! {
pub const NposSolutionPriority: TransactionPriority = TransactionPriority::max_value() / 2;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment