Repository navigation
BRG-14: rand-bridge-gov pq-rotate-status verifies a PQ set or pause key rotation - #13
Merged
Merged
Conversation
…Q set and the pause key The rotation tool signs, checks and submits (pq-rotate-pq, pq-rotate-pause, pq-rotate-submit, pq-cancel-rotation). It had no way to check the result: whether the new keys are in force or still waiting out the delay, whether an old key survived, and whether the seed a guardian host runs is one the chain counts. pq-rotate-status reads rand_getBridgeState and prints the nonce, the rules, each key in force by index and sha256 prefix, and any pending rotation with its effective time. With --expect-pq-guardians-file / --expect-pause-key it passes only when exactly those keys are in force (pending and absent both fail, told apart); with --retired-* only when no old key remains as a guardian key or the pause key; with --seed-envs only when each seed derives a key in force, and it prints the index. It signs and sends nothing and never prints a seed. docs/pq-rotation.md gains the verification and the ceremony in order. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Tracks randprotocol/monorepo#5
What main already has
The rotation tool:
pq-rotate-pq,pq-rotate-pause,pq-rotate-submit,pq-cancel-rotation, with tests, vectors anddocs/pq-rotation.md.What was missing
A check of the result.
rand-bridge-gov pq-rotate-status --rand-rpc <node>reads the chain and prints the nonce, the rules, each key in force (index and sha256 prefix) and any pending rotation with its effective time. Optional expectations decide the exit code:--expect-pq-guardians-file,--expect-pause-key: exactly these keys are in force. Pending (with the time) and absent both fail, and are told apart.--retired-pq-guardians-file,--retired-pause-key: none of these is still a guardian key or the pause key.--seed-envs: each seed on this host derives a key in force; prints its index. For a guardian to confirm, after its restart, that its co-signatures count.Read-only. It signs nothing, sends nothing and never prints a seed.
Files
daemons/src/pq_gov.rs(rotation_outcome,fingerprint),daemons/src/bin/gov.rsdaemons/tests/pq_rotation.rs(+3 tests)docs/pq-rotation.md(verification, and the ceremony in order),daemons/README.mdTests
cargo test --releaseindaemons/: all test binaries pass, no failures. Not run against a live node.Upgrade
A new read-only subcommand; nothing else changes.
Left for the owner
Running the rotation: new holders generating their seeds on their own machines, the pause key going to someone who is not a guardian operator, the signing, the submit, and the switch of each guardian host. The keys are the operator's until that is done.
🤖 Generated with Claude Code