[Staking] Cleanups and some improvements#8701
Merged
Conversation
Contributor
Author
|
/cmd prdoc --audience runtime_dev |
sigurpol
approved these changes
Jun 4, 2025
Contributor
sigurpol
left a comment
There was a problem hiding this comment.
definitely not the most authoritative reviewer in town 😅 but it looks good to me
8 tasks
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
Contributor
Author
|
/cmd fmt |
kianenigma
reviewed
Jun 9, 2025
kianenigma
reviewed
Jun 9, 2025
| /// This function computes the smallest allowed bond among `MinValidatorBond` and | ||
| /// `MinNominatorBond`, but ensures it is not below the existential deposit required to keep an | ||
| /// account alive. | ||
| pub(crate) fn min_bond() -> BalanceOf<T> { |
Contributor
There was a problem hiding this comment.
Suggested change
| pub(crate) fn min_bond() -> BalanceOf<T> { | |
| pub(crate) fn min_chilled_bond() -> BalanceOf<T> { |
and then two more for
fn min_validator_bond
fn min_nominator_bond
?
Contributor
Author
There was a problem hiding this comment.
@kianenigma Can you sanity check these new functions before I merge
81ee0ae#diff-4fde8f6e9b1050fbd0fb764fe2bea06879a3ee0443e476b95ca418d188f22079R89
Contributor
Author
There was a problem hiding this comment.
Merged but still pls check!
kianenigma
reviewed
Jun 9, 2025
kianenigma
reviewed
Jun 9, 2025
pgherveou
pushed a commit
that referenced
this pull request
Jun 11, 2025
## Changes - Introduced a new `min_bond` value, which is the minimum of `MinValidatorBond` and `MinNominatorBond`, with a fallback to `ExistentialDeposit`. Since ED on AH is much lower than on RC, this ensures we enforce some min bonds for staking to cover storage costs for staking ledger and related data. - Added an upper bound on era duration, protecting against anomalous conditions that could otherwise lead to excessive inflation. - Some refactors to gracefully handle unexpected validator activation in RC. ## TODO - [ ] Set `MaxEraDuration` in WAH. - [ ] Port [full unbond](#3811) (will do in a separate PR) --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ordian
added a commit
that referenced
this pull request
Jun 12, 2025
* master: (62 commits) release/build-macos-binaries: add missing FEATURES argument (#8816) Add XCM Precompile to `pallet-xcm` (#8693) [Release|CI/CD] Exclude test runtimes from the runtimes build (#8820) Add freebsd sysinfo for telemetry (#7985) release-reusable-rc-build: add optional `features` input that can be considered for nodes building (#8755) [Staking] Cleanups and some improvements (#8701) Fix typos in 3 files in Implementers Guide (#8799) Update `RemoteExporter` docs to reflect removal of `forward_id_for` (#8795) Snowbridge: enforce fee when registering Polkadot native asset (#8725) Bump the ci_dependencies group across 1 directory with 7 updates (#8788) Docker hub 'master' image short sha (#8790) [Release|CI/CD] Combine branch-off and RC automation flows (#8754) Move Transaction depth limit checks (#8750) Add genesis presets for remaining runtimes in polkadot-parachain-bin (#8426) Do not make pallet-identity benchmarks signature-dependent (#8179) Introduction of Approval Slashes [Disabling Strategy Stage 4] (#6827) [AHM] Prepare For Westend Cleanup (#8715) Actually use RP offset in YAP parachain (#8745) [AHM] Relax the requirement for RC-Client to receive +1 session reports (#8702) Don't read storage items in logging (#8749) ...
alvicsam
pushed a commit
that referenced
this pull request
Oct 17, 2025
## Changes - Introduced a new `min_bond` value, which is the minimum of `MinValidatorBond` and `MinNominatorBond`, with a fallback to `ExistentialDeposit`. Since ED on AH is much lower than on RC, this ensures we enforce some min bonds for staking to cover storage costs for staking ledger and related data. - Added an upper bound on era duration, protecting against anomalous conditions that could otherwise lead to excessive inflation. - Some refactors to gracefully handle unexpected validator activation in RC. ## TODO - [ ] Set `MaxEraDuration` in WAH. - [ ] Port [full unbond](#3811) (will do in a separate PR) --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
min_bondvalue, which is the minimum ofMinValidatorBondandMinNominatorBond, with a fallback toExistentialDeposit. Since ED on AH is much lower than on RC, this ensures we enforce some min bonds for staking to cover storage costs for staking ledger and related data.TODO
MaxEraDurationin WAH.