add possibility to inject non-authorities session-keys in genesis#5078
add possibility to inject non-authorities session-keys in genesis#5078bkchr merged 23 commits intoparitytech:masterfrom
Conversation
substrate/frame/session/src/lib.rs
Outdated
| /// List of (AccountId, ValidatorId, Keys) that will be registered at genesis, but not as active validators. | ||
| pub non_authority_keys: Vec<(T::AccountId, T::ValidatorId, T::Keys)>, |
There was a problem hiding this comment.
IMO is worth being explicit that these keys (together with keys) will end up in the NextKeys set. I.e. keys that are registered as candidates for session after next session (session # 2).
And technically these are still authorities (well, authority candidates). So maybe a more appropriate name? Don't know registered_candidates? But naming is hard so I may be biased :-D
There was a problem hiding this comment.
I disagree, non_authority_keys are not necessarily authorities, whether they will be authorities it will be decided by SessionManager (even in the session # 2). Just for having keys registered they will not be authorities, unless they SessionManager decides to select them.
As for the naming, I am fine with anything as I am not too biased around it.
There was a problem hiding this comment.
Well.
- I agree that these are not necessarily actual authorities, indeed I put in bold that are candidates.
- This is not my opinion, if I've not overlooked something, this is just a fact. The
inner_set_keysis called, which callsput_keys, which stores yournon_authority_keysinNextKeysset, which are the candidates registered
So I still think is worth being explicit about what is the usage of this non_authority_keys list. Otherwise as a user the doc is not super clear.
There was a problem hiding this comment.
ah got it. Yeah I can add more clarity on that for sure!
There was a problem hiding this comment.
Alright so I added a comment saying that these keys are valid at least until session 2 (maybe valid is not the best word here?), but basically my intention is to say that if there is a session-key change, the first session that would pick these new keys is session number 3
|
@girazoki CI is not happy. |
will check |
Head branch was pushed to by a user without write access
|
@girazoki also clippy was failing: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6772111 |
|
@girazoki CI is still not happy :D |
I am really trying xD. Let's see this time |
Head branch was pushed to by a user without write access
|
Also |
That should be easy I think 😄 |
Or maybe not 🙈, why is semver telling me the crates are not listed in the pr-doc when they are? |
Ahh yeah there was a bug with |
…ritytech#5078) Add the possibility of injecting session-keys in genesis for non-validators. Currently all keys injected in genesis were considered as part of the initial validators set, this PR allows to inject a new vector with non-authority keys --------- Co-authored-by: Bastian Köcher <git@kchr.de>
…ritytech#5078) Add the possibility of injecting session-keys in genesis for non-validators. Currently all keys injected in genesis were considered as part of the initial validators set, this PR allows to inject a new vector with non-authority keys --------- Co-authored-by: Bastian Köcher <git@kchr.de>
* Initialize * Companion for paritytech/polkadot-sdk#4977 * Companion for paritytech/polkadot-sdk#5078 * Companion for paritytech/polkadot-sdk#5214 * Companion for paritytech/polkadot-sdk#5431 * Companion for paritytech/polkadot-sdk#4792 * Companion for paritytech/polkadot-sdk#5613 * Companion for paritytech/polkadot-sdk#7688 * Fixes * Companion for paritytech/polkadot-sdk#5364 * Fixes * Disable storage limit & fix format issue * Benchmark only * Patch evm * Update patch info * Fixes --------- Co-authored-by: bear <boundless.forest@outlook.com>
* Initialize * Companion for paritytech/polkadot-sdk#4977 * Companion for paritytech/polkadot-sdk#5078 * Companion for paritytech/polkadot-sdk#5214 * Companion for paritytech/polkadot-sdk#5431 * Companion for paritytech/polkadot-sdk#4792 * Companion for paritytech/polkadot-sdk#5613 * Companion for paritytech/polkadot-sdk#7688 * Fixes * Companion for paritytech/polkadot-sdk#5364 * Fixes * Disable storage limit & fix format issue * Benchmark only * Patch evm * Update patch info * Fixes --------- Co-authored-by: bear <boundless.forest@outlook.com>
* Initialize * Companion for paritytech/polkadot-sdk#4977 * Companion for paritytech/polkadot-sdk#5078 * Companion for paritytech/polkadot-sdk#5214 * Companion for paritytech/polkadot-sdk#5431 * Companion for paritytech/polkadot-sdk#4792 * Companion for paritytech/polkadot-sdk#5613 * Companion for paritytech/polkadot-sdk#7688 * Fixes * Companion for paritytech/polkadot-sdk#5364 * Fixes * Disable storage limit & fix format issue * Benchmark only * Patch evm * Update patch info * Fixes --------- Co-authored-by: bear <boundless.forest@outlook.com>
* Initialize * Companion for paritytech/polkadot-sdk#4977 * Companion for paritytech/polkadot-sdk#5078 * Companion for paritytech/polkadot-sdk#5214 * Companion for paritytech/polkadot-sdk#5431 * Companion for paritytech/polkadot-sdk#4792 * Companion for paritytech/polkadot-sdk#5613 * Companion for paritytech/polkadot-sdk#7688 * Fixes * Companion for paritytech/polkadot-sdk#5364 * Fixes * Disable storage limit & fix format issue * Benchmark only * Patch evm * Update patch info * Fixes --------- Co-authored-by: bear <boundless.forest@outlook.com>
Add the possibility of injecting session-keys in genesis for non-validators. Currently all keys injected in genesis were considered as part of the initial validators set, this PR allows to inject a new vector with non-authority keys