Repository navigation
Audit v14: checked provider numbers, sealed deferred records, chain identity check - #9
Merged
Merged
Conversation
… what the lock covers A fee withdrawal paid through _push with no nonReentrant, so a token's callback could enter lock and release from it, against the contract's own comment. withdrawFees is now onlyAdmin nonReentrant; three forge tests drive a re-entering token (into lock, release and a nested withdrawFees). Source and tests only: the deployed endpoints' bytecode is unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…log range never moves a cursor BR-846: the EVM source's payload offset and length, the safe head, the range end and the sequence count are checked sums; so are the Solana message length, the Rand guardian_set_index, and the relayer submitter's gas estimate, base fee and tip. A value that does not fit is an error. Behind that, each source round and each relay runs under isolate::isolated, so a panic is an error for that source and round, not the daemon's exit. BR-1008: a provider that does not serve eth_getLogs for a range is an error (RangeNotServed) and the cursor stays; sequence() from the same provider is reported to the operator and decides nothing. BR-761: under a quorum a refusing provider is not counted for the range; the cursor moves only when a quorum served it with the same contents, and short of that the chain halts with an error naming the range. The authors' test that asserted the skip now asserts the refusal; the relayer daemon test waits for the log line it reads (it raced on a busy disk). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GFs5h2CVCmdBKerZzH2Xrx
…s own seal before a retry signs it retry_deferred signed the digest stored beside a deferred record's body. It now decodes the body again, derives the digest, requires the record to sit under the (chain, sequence) its body names, and requires a seal: a MAC under a key derived from the guardian key, written by limits::defer when the daemon itself deferred the message it read from its sources. A record that fails any of these is refused with an error every round and holds nothing back; what passes still goes through the peer check, the signing policy and the caps. rand-guardian --vouch-deferred <chain>:<sequence> seals one record from an earlier build after an operator's review. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GFs5h2CVCmdBKerZzH2Xrx
…ash and checks both on every poll; an undecodable PQ key is an error BR-1005: rand.genesis_hash joins rand.chain_id in [rand]. rand-guardian does not start without both (RandConfig::chain_binding); check_startup reads the genesis hash too; and every RandSource poll asks its node for rand_chainId and rand_getGenesisHash before it reads a burn and again before it hands burns on, so a node switched to another chain under a running daemon yields an error and nothing to sign. The eight mainnet guardian configs and the relayer's carry chain 21's recorded genesis hash. No signed body or wire format changes: the body still names no Rand chain. BR-1006: bridge_state refuses a pq_guardians entry that is not a hex string, naming its index, as it refuses an undecodable ECDSA guardian; the authors' fake and assertion that held the silent drop are updated. README: what an operator must set or check before this build is rolled. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GFs5h2CVCmdBKerZzH2Xrx
…he rotation quorum rule has a test of its own BR-1002: rand-bridge-gov cosign digested the body of whatever envelope it was given and signed it with the PQ seeds. It now decodes and prints the whole attestation (governance::describe), verifies it against the current guardian set before a seed is read (governance::verify_for_cosign: verify_rotation for a rotation; for a deposit to Rand a canonical attestation carrying the current set's quorum, and only with --allow-transfer), refuses anything else, and needs a confirmation: the digest's first 8 hex typed at a terminal, or --yes without one. cosign now takes --current-index and --current-guardians like verify. BR-1007 (withdrawn as a finding; the test gap stands): four signatures of a set of six are refused by verify_rotation, on an attestation assembled by hand so that only the verifier's quorum rule can refuse it. With the check_indices call removed this test fails and none of the authors' tests in the governance suites does (the new cosign test, which shares the rule, fails too). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GFs5h2CVCmdBKerZzH2Xrx
…wo documents that disagree on Tron permissions say so rand-bridge-audit --governance passed Tron rule 13 for any pauser address with code: one byte of code and a one-signature account permission was a PASS. The pauser is now held to the admin multisig's rule, as docs/governance.md describes it: an account whose owner and active permissions need at least min_threshold signatures; a contract fails, and the account's permissions are read whether or not the address has code. The authors' test that asserted a contract passes now asserts the weak cases fail. docs/governance.md says the Tron multi-signature permissions are still to do; docs/mainnet-deployment.md records them as done on 2026-09-26. Both places now carry an UNRECONCILED note; neither was changed otherwise, since only a read of the chain can say which is right. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GFs5h2CVCmdBKerZzH2Xrx
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.
Fixes for the audit v14 addendum.
Changes
cosignprints, verifies and asks before it signs; the rotation quorum rule has its own test.withdrawFeestakes the reentrancy lock (source only, nothing redeployed).Tests
Before rolling (see
daemons/README.md)genesis_hashunder[rand]in each guardian's config — the daemon stops at startup without it.deferred/directory.Not verified
🤖 Generated with Claude Code
https://claude.ai/code/session_01GFs5h2CVCmdBKerZzH2Xrx