-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove invulnerables form staking-async #10359
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
Remove invulnerables form staking-async #10359
Conversation
731b526 to
46d4497
Compare
|
beside the usual pr_doc, grepping for MaxInvulnerables and set_invulnerables and invulnerables in general under staking-async still show quite few occurrences. Do we want to remove the invulnerable feature completely from the staking-async pallet? If yes, there is more cleanup needed in staking-async and in the runtimes. It would be great to explain in the PR also if the feature was used in other runtimes (including polkadot, kusama under fellowship) and describe breaking changes there that will need to be addressed once integrated. Do we also need to cleanup storage items once we remove Invulnerables? (For some of these questions, surely @kianenigma and @Ank4n can help 😄 ) |
|
My previous understanding was that while we still mistakenly read If there are entanglements that we are not aware of, for example if a million test cases break, @andreitrand please share your findings first and then we can revise if it is sensible to continue with this. |
46d4497 to
535884a
Compare
|
/cmd prdoc |
54323ec to
c7f6f94
Compare
|
Based on the original issue I aimed to remove references to Having said that, multiple references to Are there any other suitable test commands that can help me which of these are no longer relevant, given what I've removed so far? |
38c62e7 to
310ab2f
Compare
I have missed the initial discussion around this task and so probably @kianenigma and @Ank4n are better equipped to answer your question. Without knowing that context, I would naively say that we should aim to remove any reference to Invulnerables from staking-async and staking pallets and don't care about anything else (and just making sure to remove the related configuration in the different runtimes in this PR and then in the following runtime PR where we intregrate these changes). But again, let's hear first from Kian and Ankan |
@andreitrand Can you link to original issue/discussion? Afaik invulnerables are useful for chain at genesis, so I don't see much harm in keeping it. |
Yes, this is just about pallet-staking-async, other pallets can/should have invulnerables.
There is no issue for it, it was a note in the project board only. The current code doesn't actually treat invulnerables as anything, other than excluding them in slashing. If they are set in genesis, they are not declared as active validators. So they are actually not useful for genesis setup either. We could change invulnerables to be non-slashable, and be omni-present validators, but staking-async is IMO too complex to have this backdoor, even if it is for test. Instead of keeping it and fixing it, since there is no use for it and all tests/adjacent pallets work with properly setting up the initial era, I suggested that we remove it. Moreover, I think the only reason to have this in the original staking pallet was to allow W3F to run the original validators of Polkadot in the PoA phase before public launch + cover their *** of they get slashed 😄 Given that our test setups are capable of working as-is, I don't see a good reason to keep it in the code. For example, there is no reason to have a test case that ensures someone cannot be slashed, because it is a non-action in production. |
substrate/frame/staking-async/runtimes/parachain/src/weights/pallet_collator_selection.rs
Show resolved
Hide resolved
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.
LGTM modulo one wrong update to collator selection + confirming that @Ank4n agrees this can be removed.
Ank4n
left a comment
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.
Revert substrate/frame/staking-async/runtimes/parachain/src/weights/pallet_collator_selection.rs as @kianenigma mentioned. Everything else looks good.
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
sigurpol
left a comment
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.
Small comment plus what @kianenigma / @Ank4n already mentioned.
Other than that, looks great!
cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_staking_async.rs
Show resolved
Hide resolved
I've added a link to it in the PR description. |
The "staking-async" pallet has inherited the list of invulnerable validators from the "staking" pallet, but these are no longer used. We can therefore remove them, together with additional clean-up. Fixes #10135 --------- Signed-off-by: Andrei Trandafir <[email protected]>
5d47e7b to
5f54eda
Compare
|
/cmd bench --pallet pallet_staking_async --runtime asset-hub-westend |
|
Command "bench --pallet pallet_staking_async --runtime asset-hub-westend" has started 🚀 See logs here |
…t_staking_async --runtime asset-hub-westend'
|
Command "bench --pallet pallet_staking_async --runtime asset-hub-westend" has finished ✅ See logs here Subweight results:No changes found. Command output:✅ Successful benchmarks of runtimes/pallets: |
Ank4n
left a comment
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.
btw, the contribution guidelines asks us to not use force push. The commits are squashed and merged to master anyways so no need to rewrite branch history.
The "staking-async" pallet has inherited the list of invulnerable validators from the "staking" pallet, but these are no longer used. We can therefore remove them, together with additional clean-up.
Closes #10135 (comment)