Repository navigation
BR-3: --handover reports each endpoint's handover step; admin multisig must be 5 of 6 - #12
Merged
Merged
Conversation
…handover each endpoint is at The handover tooling (Governance.s.sol, tron-ops.js, rand-bridge-cli) and the end-state audit (--governance) exist. Nothing said how far along an endpoint is: --governance fails every rule until the last step, and a scheduled acceptAdmin() whose delay has passed looks the same as one never started, while the single key is still admin. --handover reads admin(), pendingAdmin(), pauser(), their code, and the timelock's getTimestamp of the acceptAdmin() operation against the latest block time (Solana: the Config's admin and pending admin, the upgrade authority and the configured Squads vault), and prints one stage per endpoint with the next command of docs/governance.md §4. It exits non-zero until the admin has moved on every endpoint. It sends nothing and needs no key. The operation id is computed as the timelock's hashOperation; a test holds it to the id recorded for the live Tron endpoint. 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! |
…eports any other shape The owner's standing rule: a multisig account is 5 of 6, never 2 of 3. The audit accepted any admin multisig with a threshold of at least min_threshold (2), so 2 of 3 and 3 of 5 passed every row. rand-bridge-audit --governance gains a last row on every endpoint, "admin multisig is 5 of 6 (owner's rule)": PASS only for a Safe with threshold 5 and 6 owners, a Tron account whose owner and every active permission need 5 signatures of 6 keys, or a Squads multisig with threshold 5 and 6 members. Any other shape it can read is a FAIL that prints the shape; signers it cannot read are UNKNOWN; no multisig configured is a FAIL. The row is not configurable. The pause multisig and the 6-of-8 guardian quorum are not touched. tron-ops.js multisig-permissions defaults both thresholds to 5, and docs/governance.md names 5 of 6 with six signers wherever it named 3 of 5 for the admin multisig. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN
rand-bridge-audit keeps both --handover and --headroom. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN
rand-bridge-audit keeps --handover, --limits and --headroom. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN
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#2
What main already has
The handover tooling for every chain (
evm/script/Governance.s.sol,deploy/tron-ops.js,rand-bridge-cli), each building or checking a step without sending unless told to, andrand-bridge-audit --governance, which judges the end state.What was missing
A way to see which step an endpoint is at.
--governancefails every rule until the last step, so an accept that has served its delay and was never executed reads the same as a handover never started.rand-bridge-audit --config <file> --handover [--salt 0x…]reads each endpoint and prints one stage (NOT STARTED,TRANSFERRED, ACCEPT NOT SCHEDULED,ACCEPT SCHEDULED, WAITING,ACCEPT EXECUTABLE NOW,ADMIN MOVED,UNEXPECTED,UNKNOWN), who is admin at that stage, and the next command. Read-only, no key. Exits non-zero until every endpoint is atADMIN MOVED.Admin multisig: 5 signers of 6 (owner's standing rule)
rand-bridge-audit --governancegains a last row on every endpoint,admin multisig is 5 of 6 (owner's rule). PASS only for a Safe with threshold 5 and 6 owners, a Tron account whose owner and every active permission need 5 signatures of 6 keys, or a Squads multisig with threshold 5 and 6 members. Any other readable shape (2 of 3, 3 of 5, 6 of 6, …) is a FAIL that prints the shape; unreadable signers are UNKNOWN; none configured is a FAIL. Not configurable.deploy/tron-ops.js multisig-permissionsdefaults both thresholds to 5 (was 3).docs/governance.mdanddaemons/config.example.tomlname 5 of 6.evm/script/Governance.s.sol, whosehandover()still accepts any Safe with a threshold of at least 2 (the audit row is what reports the shape); the dated design spec underdocs/superpowers/.deploy/tron-ops.test.jswas not run: it needstron/node_modules, which is not installed here and CI does not run it. The change there is the two default numbers.Files
daemons/src/handover.rs(new),daemons/src/bin/audit.rs,daemons/src/lib.rs,daemons/src/gov_audit.rs(the 5-of-6 row, +3 tests),deploy/tron-ops.js,daemons/config.example.tomldaemons/tests/handover.rs(new, 7 tests; the operation id is held to the one recorded for the Tron endpoint)docs/governance.md§5a: the stages and the per-chain order of workTests
cargo test --releaseindaemons/: all test binaries pass, no failures. Nothing was run against a live endpoint.Upgrade
--handoveris a new flag on a read-only tool.--governancehas one more row per endpoint, so its output and its pass condition change: an admin multisig that is not 5 of 6 now fails it.Left for the owner
--handoverand--governanceagainst the live endpoints, and settling the two documents that disagree about the Tron account permissions (the note at the top ofdocs/governance.md).🤖 Generated with Claude Code