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

Companion Substaret/5683 #1039

Merged
merged 4 commits into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ parameter_types! {
pub const MaxNominatorRewardedPerValidator: u32 = 64;
// quarter of the last session will be for election.
pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 4;
pub const MaxIterations: u32 = 5;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only 5 here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And a better name StakingMaxIterations or whatever would also be useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Kusama and Polkadot I set to 5 to be more cautious not to stall solution submission for too long. If all is well we can increase it in a further upgrade.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay

}

impl staking::Trait for Runtime {
Expand All @@ -330,6 +331,7 @@ impl staking::Trait for Runtime {
type ElectionLookahead = ElectionLookahead;
type Call = Call;
type UnsignedPriority = StakingUnsignedPriority;
type MaxIterations = MaxIterations;
}

parameter_types! {
Expand Down
2 changes: 2 additions & 0 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ parameter_types! {
pub const MaxNominatorRewardedPerValidator: u32 = 64;
// quarter of the last session will be for election.
pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 4;
pub const MaxIterations: u32 = 5;
}

impl staking::Trait for Runtime {
Expand All @@ -335,6 +336,7 @@ impl staking::Trait for Runtime {
type ElectionLookahead = ElectionLookahead;
type Call = Call;
type UnsignedPriority = StakingUnsignedPriority;
type MaxIterations = MaxIterations;
}

parameter_types! {
Expand Down
2 changes: 2 additions & 0 deletions runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ parameter_types! {
pub const MaxNominatorRewardedPerValidator: u32 = 64;
pub const ElectionLookahead: BlockNumber = 0;
pub const StakingUnsignedPriority: TransactionPriority = TransactionPriority::max_value() / 2;
pub const MaxIterations: u32 = 10;
}

impl staking::Trait for Runtime {
Expand All @@ -310,6 +311,7 @@ impl staking::Trait for Runtime {
type ElectionLookahead = ElectionLookahead;
type Call = Call;
type UnsignedPriority = StakingUnsignedPriority;
type MaxIterations = MaxIterations;
}

impl grandpa::Trait for Runtime {
Expand Down
2 changes: 2 additions & 0 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ parameter_types! {
pub const MaxNominatorRewardedPerValidator: u32 = 64;
// quarter of the last session will be for election.
pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 4;
pub const MaxIterations: u32 = 10;
}

impl staking::Trait for Runtime {
Expand All @@ -321,6 +322,7 @@ impl staking::Trait for Runtime {
type NextNewSession = Session;
type ElectionLookahead = ElectionLookahead;
type Call = Call;
type MaxIteration = MaxIteration;
type UnsignedPriority = StakingUnsignedPriority;
}

Expand Down