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

Set new staking limits #3299

Merged
merged 3 commits into from
Jun 18, 2021
Merged

Set new staking limits #3299

merged 3 commits into from
Jun 18, 2021

Conversation

kianenigma
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Jun 18, 2021
@kianenigma kianenigma added B7-runtimenoteworthy D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. E0-runtime_migration PR introduces code that might require downstream chains to run a runtime upgrade. labels Jun 18, 2021
runtime/kusama/src/lib.rs Outdated Show resolved Hide resolved
@kianenigma
Copy link
Contributor Author

Will set some values for westend as well, as it will allow us to test stuff.

<pallet_staking::MinNominatorBond<Runtime>>::put(1 * UNITS);
<pallet_staking::MaxNominatorsCount<Runtime>>::put(1000);
<pallet_staking::MinValidatorBond<Runtime>>::put(10 * UNITS);
<pallet_staking::MaxValidatorsCount<Runtime>>::put(10);
Copy link
Member

Choose a reason for hiding this comment

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

We want to make westend more complex than polkadot in order to detect issues in the future.

We should have no limits here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I preferred some limits here, and I set them intentionally low, such that we can try chilling others there.

@kianenigma kianenigma added this to the v0.9.5 milestone Jun 18, 2021
@shawntabrizi
Copy link
Member

bot merge

@ghost
Copy link

ghost commented Jun 18, 2021

Error: When trying to meet the "Project Owners" approval requirements: this pull request does not belong to a project defined in Process.json.

Approval by "Project Owners" is only attempted if other means defined in the criteria for merge are not satisfied first.

The following errors might have affected the outcome of this attempt:

  • 'Batch: Codebase Restructure' does not match any projects in polkadot's Process.json

Co-authored-by: Gavin Wood <gavin@parity.io>
@shawntabrizi shawntabrizi merged commit 63d1d49 into master Jun 18, 2021
@shawntabrizi shawntabrizi deleted the kiz-set-staking-params branch June 18, 2021 12:16
shawntabrizi pushed a commit that referenced this pull request Jun 18, 2021
* Set staking limits

* Set westend limits as well

* Update runtime/kusama/src/lib.rs

Co-authored-by: Gavin Wood <gavin@parity.io>

Co-authored-by: Gavin Wood <gavin@parity.io>
kianenigma added a commit that referenced this pull request Jun 18, 2021
* Set staking limits

* Set westend limits as well

* Update runtime/kusama/src/lib.rs

Co-authored-by: Gavin Wood <gavin@parity.io>

Co-authored-by: Gavin Wood <gavin@parity.io>
ordian added a commit that referenced this pull request Jun 18, 2021
* master:
  Set new staking limits (#3299)
  Bump derive_more from 0.99.11 to 0.99.14 (#3248)
  add revert consensus log (#3275)
  Add bridge team as codeowners of `bridges` Subtree (#3291)
  Extract and test count_no_shows method for approval voting (#3264)
let min_nominator_bond = UNITS / 10;
// The absolute maximum number of nominators. This number is set rather conservatively, and
// is expected to increase soon after this runtime upgrade via another governance proposal.
// The current Polkadot state has more than 30_000 nominators, therefore no other nominator

Choose a reason for hiding this comment

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

There are currently around 22418 active nominators on Polkadot, I wonder from where 30 000 number comes from?

Copy link
Member

Choose a reason for hiding this comment

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

Its not about active nominators, its about number of nominators in the underlying Nominators storage map.

Choose a reason for hiding this comment

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

Its not about active nominators, its about number of nominators in the underlying Nominators storage map.

I see, thank you! So new nominators would not be able to start staking, or those who have higher stake would be stored, and this will be recalculated for each era?

Choose a reason for hiding this comment

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

I would assume that only 20 000 with the highest stake will be counted

Copy link
Member

Choose a reason for hiding this comment

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

This limit would make it so that only 20_000 accounts could exist in that nominators map. Once we hit that limit, other nominators would not be able to register.

@cwerling cwerling added D1-audited 👍 PR contains changes to critical logic that has been properly reviewed and externally audited. and removed D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Jun 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. D1-audited 👍 PR contains changes to critical logic that has been properly reviewed and externally audited. E0-runtime_migration PR introduces code that might require downstream chains to run a runtime upgrade.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants