fix: abort committee rotation on session key registration failure - #2078
Draft
Klapeyron wants to merge 1 commit into
Draft
fix: abort committee rotation on session key registration failure#2078Klapeyron wants to merge 1 commit into
Klapeyron wants to merge 1 commit into
Conversation
Ignore set_keys errors no longer: one DuplicatedKey (or any registration failure) skips the whole incoming committee so pallet_session and the session manager stay on the previous full authority set. Signed-off-by: Tomasz Bartos <tomasz.bartos@shielded.io>
Klapeyron
force-pushed
the
feat/session-duplicate-key-committee-sync
branch
from
September 1, 2026 09:21
bf1f2c4 to
4a9c683
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
register_committee_keyscurrently logsSessionInterface::set_keysfailures and still hands the full committee topallet_session. That pallet then drops members withoutNextKeys, so the live authority set diverges fromCurrentCommittee/QueuedCommittee. AURA author index and BEEFY stake matching become undefined; a partial or empty set is a liveness/finality risk (#1895).set_keysis treated as a black box. The session manager does not inspect or special-case the error (DuplicatedKeytoday,NoAccount, or a reasonpallet_sessionadds later). AnyErraborts the hand-off.Policy is all-or-nothing:
set_keysfor each unique member. First failure skips the whole incoming committee.new_sessionreturnsNone, sopallet_sessionkeeps the previous validators.QueuedCommitteestays the previous full set; the skipped epoch is stamped so rotation does not retry every block.A later epoch with a clean committee still rotates normally.
🗹 TODO before merging
📌 Submission Checklist
git commit -s) for the DCO🧪 Testing Evidence
cargo test -p pallet-session-validator-management --libColliding session keys are only a fixture to make
set_keysreturnErr. Tests cover: any registration failure skips the whole incoming set; all members rejected keeps the previous set; recovery on the next valid committee; genesis panics if the initial committee cannot register in full.🔱 Fork Strategy
Runtime upgrade required so live chains pick up the new
SessionManagerbehaviour.Links
Closes #1895