Uh oh!
There was an error while loading. Please reload this page.
feat: Permissioned collators - #882
Conversation
Ad96el
commented
Apr 23, 2025
I decided to add the benchmarking in this PR. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ntn-x2
left a comment
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| 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.
I think a different error message depending on which condition is false would massively reduce headaches in the future.
Uh oh!
There was an error while loading. Please reload this page.
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