Skip to content

BRG-14: rand-bridge-gov pq-rotate-status verifies a PQ set or pause key rotation - #13

Merged
dendisuhubdy merged 1 commit into
mainfrom
feat/i5-rotation-status
Nov 18, 2026
Merged

dendisuhubdy merged 1 commit into
mainfrom
feat/i5-rotation-status

Conversation

@dendisuhubdy

Copy link
Copy Markdown
Member

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 and docs/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.rs
  • daemons/tests/pq_rotation.rs (+3 tests)
  • docs/pq-rotation.md (verification, and the ceremony in order), daemons/README.md

Tests

cargo test --release in daemons/: 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

…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

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dendisuhubdy
dendisuhubdy merged commit cea836c into main Nov 18, 2026
2 checks passed
@dendisuhubdy
dendisuhubdy deleted the feat/i5-rotation-status branch November 18, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant