-
Notifications
You must be signed in to change notification settings - Fork 47
feat: Permissioned collators #882
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
Conversation
|
I decided to add the benchmarking in this PR. |
ntn-x2
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.
Minor things. Also, it seems the PR description is outdated, since I can't see where the staking pallet is being used? Session length has a fixed duration now, so the only thing that the staking pallet does, is to provide collators until there is a well formed collator set (meaning non empty and with all session keys set) that is returned by the new session manager.
|
|
||
| if collators.is_empty() || !has_collator_keys { | ||
| // we never want to pass an empty set of collators. This would brick the chain. | ||
| log::error!("💥 keeping old session because of empty collator set!"); |
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 think a different error message depending on which condition is false would massively reduce headaches in the future.
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.
Fair point. I created a new PR: #887
fixes #3822
This PR introduces permissioned collators to the Peregrine and Spirtinet runtimes. The council or governance is now allowed to add and remove members through the newly deployed pallet-membership. This pallet is then used by a new session manager implementation. The old session manager implementation remains untouched—it's only moved out of the runtime.
After the migration, the parachain-staking pallet becomes essentially obsolete, as collators no longer receive rewards for block production.
A follow-up PR will reduce rewards in the parachain-staking pallet accordingly.
The round information (which determines session length) still resides in the parachain-staking pallet. Before it can be removed, a new source for round length must be implemented—either directly in the runtime or via a custom pallet that includes collator information.
How to test