-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increases staking delays #1030
Merged
Merged
Increases staking delays #1030
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b9d0cc9
Increases staking delays
976016d
Fix comments
ceced36
Update runtime rust tests to reflect MinCollatorStk changes
notlesh 2e9f9a0
fix rust tests (2x longer rounds)
nanocryk a7e087a
fix moonbeam and moonriver tests
nanocryk 3afe74b
Merge branch 'master' into crystalin-staking-period
librelois e385285
Fix genesis chain specs (#1046)
4meta5 9e56532
Merge branch 'master' into crystalin-staking-period
librelois File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -665,19 +665,19 @@ impl parachain_info::Config for Runtime {} | |||||
parameter_types! { | ||||||
/// Minimum round length is 2 minutes (10 * 12 second block times) | ||||||
pub const MinBlocksPerRound: u32 = 10; | ||||||
/// Default BlocksPerRound is every 4 hours (1200 * 12 second block times) | ||||||
pub const DefaultBlocksPerRound: u32 = 4 * HOURS; | ||||||
/// Collator candidate exit delay (number of rounds) | ||||||
pub const LeaveCandidatesDelay: u32 = 2; | ||||||
/// Collator candidate bond increases/decreases delay (number of rounds) | ||||||
pub const CandidateBondDelay: u32 = 2; | ||||||
/// Delegator exit delay (number of rounds) | ||||||
pub const LeaveDelegatorsDelay: u32 = 2; | ||||||
/// Delegation revocations delay (number of rounds) | ||||||
pub const RevokeDelegationDelay: u32 = 2; | ||||||
/// Delegation bond increases/decreases delay (number of rounds) | ||||||
pub const DelegationBondDelay: u32 = 2; | ||||||
/// Reward payments delay (number of rounds) | ||||||
/// Blocks per round | ||||||
pub const DefaultBlocksPerRound: u32 = 6 * HOURS; | ||||||
/// Rounds before the collator leaving the candidates request can be executed | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
My rewording makes it clear that this applies to all candidates, not just the selected collators. But after writing it, I wasn't sure that was actually true. |
||||||
pub const LeaveCandidatesDelay: u32 = 4 * 7; | ||||||
/// Rounds before the candidate bond increase/decrease can be executed | ||||||
pub const CandidateBondDelay: u32 = 4 * 7; | ||||||
/// Rounds before the delegator exit can be executed | ||||||
pub const LeaveDelegatorsDelay: u32 = 4 * 7; | ||||||
/// Rounds before the delegator revocation can be executed | ||||||
pub const RevokeDelegationDelay: u32 = 4 * 7; | ||||||
/// Rounds before the delegator bond increase/decrease can be executed | ||||||
pub const DelegationBondDelay: u32 = 4 * 7; | ||||||
/// Rounds before the reward is paid | ||||||
pub const RewardPaymentDelay: u32 = 2; | ||||||
/// Minimum collators selected per round, default at genesis and minimum forever after | ||||||
pub const MinSelectedCandidates: u32 = 8; | ||||||
|
@@ -690,10 +690,10 @@ parameter_types! { | |||||
/// Default percent of inflation set aside for parachain bond every round | ||||||
pub const DefaultParachainBondReservePercent: Percent = Percent::from_percent(30); | ||||||
/// Minimum stake required to become a collator | ||||||
pub const MinCollatorStk: u128 = 1 * currency::KILOGLMR * currency::SUPPLY_FACTOR; | ||||||
pub const MinCollatorStk: u128 = 1000 * currency::GLMR * currency::SUPPLY_FACTOR; | ||||||
// TODO: Restore to 100_000 for Phase 2 (remove the division by 10) | ||||||
/// Minimum stake required to be reserved to be a candidate | ||||||
pub const MinCandidateStk: u128 = currency::KILOGLMR * currency::SUPPLY_FACTOR / 10; | ||||||
pub const MinCandidateStk: u128 = 1000 * currency::GLMR * currency::SUPPLY_FACTOR / 10; | ||||||
4meta5 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
/// Minimum stake required to be reserved to be a delegator | ||||||
pub const MinDelegatorStk: u128 = 5 * currency::GLMR * currency::SUPPLY_FACTOR; | ||||||
} | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to express these in terms of the configuration values like
5 * LeaveDelegatorsDelay
or whatever value this is. But that can be for a followup.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my
deferred staking
PR (#1035 ) I added aroll_to_round_begin
which takes a round number rather than a block number. That's only loosely related to this...