Repository navigation
Put findings 115 and 116 in the audit's scope; fix stale docs lines - #150
Merged
Merged
Conversation
At start, a guardian following Floor configs takes the highest confirmed slot any endpoint gives as the replay line (startSlot, main.mjs:1374): rows at or before it are replayed, rows after it acted on. startSlot asked `getSlot` of every entry in `rpc.endpoints` directly, past FailoverRpc's genesis-hash gate (finding 114). A backup still unchecked after the start's cluster check (it missed the 2 s grace, was busy, or answers everything but getGenesisHash) was read anyway. On another cluster its slot set the line for the life of the process: higher, and every followed Floor event was replayed instead of acted on; lower, and rows from while the guardian was down were acted on as new (finding 131). docs/09 row 114 says such an endpoint is never read from. Fix: each endpoint is admitted first, as crossCheck does (`rpc.admit(i)`, then getSlot only if it is on the configured cluster). One not yet checked is asked its genesis hash again; one that cannot answer, or answers from another cluster, gives no slot. Awaiting admission, not filtering on `rpc.cluster[i] === "ok"`: a backup that now answers on the right cluster still counts, so a primary behind does not put the line early. The fallback when none gives a slot is `rpc.call`, which FailoverRpc already gates; a plain Rpc is asked itself, as before. An object with endpoints but no `admit` throws rather than read them unchecked. Tests: - restart.test.mjs "the start slot is read only from endpoints found on the configured cluster (finding 131)": a real FailoverRpc on two local stub endpoints, the primary on mainnet at slot 300M, the backup at 999M refusing getGenesisHash, as the start's check leaves them (['ok', 'unknown']). Unchecked, or answering devnet later: 300M, and the backup is never asked its slot. The primary giving no slot: the start fails rather than take the backup's. Answering mainnet later: 999M. No cluster configured: 999M, as before. Red on the old code: `an unchecked backup's slot is not the line`, actual 999000000, expected 300000000 (tasks/start-slot-cluster/ red.log), the reviewer's reproduction. - The existing startSlot test's stubs get an `admit` that admits all. - tasks/start-slot-cluster/mutants.log: 8/8 KILLED, full cloud suite each (no admission; admission ignored; only "wrong" skipped; cluster[i] === "ok" without asking again; a failed genesis ask taken as admitted; fallback asking every endpoint directly; fallback dropped; Math.min), restored and cmp equal, 258/258 after. - cd cloud && node --test: 258/258. docs/09:40 client 258; python3 tools/claims.py: claims OK, client 258. Sibling search (every direct `rpc.endpoints[...]` / `e.call(` in cloud/ outside tests): solana.mjs:422 askGenesis is the gate itself; :489 crossCheck's getSlot is gated by admit; :502 reads the active endpoint, "ok" by invariant (checkCluster moves off a non-"ok" one at start, switchTo only ever takes an admitted endpoint, and "ok" never reverts); :503 is gated on cluster[i] === "ok"; :559 call() is gated by admit; main.mjs:1323 is the admission. main.mjs's extraRpcs and stop.mjs's backups only get sendTransaction copies (signer.mjs:108, 140), which row 114 states. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The commit before this one admits each endpoint before reading its slot for the Floor replay's start line. startSlot asked every endpoint directly, so a backup still unchecked after the start's cluster check, and on another cluster, set the line for the life of the process. This gives it a number. docs/09 §4 gets row 131. Row 114 said an endpoint on another cluster "is never read from"; that was untrue for the start slot until this fix, so the row now says so, dated, and names finding 131. README and docs/12 count 131 findings, 96–131 recorded after the submission, and 128–131 among the guardian's fixed. No code changes. Evidence: - The reviewer's stub reproduction (mainnet primary at 300M, devnet backup at 999M answering its hash late) gave 999000000; the commit before's test reproduces it on the old code (tasks/start-slot-cluster/red.log). - python3 tools/claims.py: claims OK, findings 131, client 258. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An independent docs review of the stack found these; each was checked against the tree first. - docs/16 §6 says every on-chain change since the engagement belongs in the independent audit's scope, but had no row for findings 115 and 116, which change Floor's on-chain rule (`elf_extent`; Floor 8ca8a608 -> 319f19a2 -> 86eb426e in b40657a and 564b934). It gets a row, and the questions gain the class 116 states below v3 and the SPL Memo mutants its loader test did not analyse. Row 88d says the fix later left some v3 code with no extent (116). - docs/09 row 108 (16 Oct) says 18 of the 25 now fail a test; §3 says 19 since 18 Oct (finding 120). The row keeps its 16 Oct text and says what changed and when. - README: the devnet job fails until findings 107, 115 and 116 are deployed, not 107 alone (115 and 116 change Floor only). The sweep count is re-measured: 6,264 Vault and 1,808 Floor substitutions, all refused (19 Oct, as docs/09 §2 records), not 7,075 (16 Oct). - docs/14 said 18 targeted unit tests; units.rs has 26. claims.py checked the property and exhaustive counts on that line but not this one; it gets a rule. - docs/15 said A1's low-water fix was not on devnet; docs/09 row 65 has it on devnet since 8 Oct (PR #35). No statement of what devnet runs now changes. No code changes. Evidence: - scripts/build-programs.sh: Floor 86eb426e, Vault 7086148b, Harbor 543be60b (tasks/docs-audit-scope/hashes.txt). - every_account_substitution_is_refused: "6264 substitutions over 37 transactions ... 745 refused at a backstop slot"; every_floor_account_substitution_is_refused: "1808 substitutions over 18 Floor transactions ... 172 refused at a backstop slot" (tasks/docs-audit-scope/sweep-{vault,floor}.log). - The new claims rule with docs/14 put back to 18: "'18 targeted unit tests' states 18 (the tree has targeted = 26)", exit 1; restored, claims OK. - python3 tools/claims.py: claims OK, targeted 26, findings 131; --self-test OK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shuv-amp
force-pushed
the
auto/A/docs-audit-scope
branch
from
October 19, 2026 18:06
c5eaa6b to
1b954fb
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.
What changed
Docs only, plus one new
tools/claims.pyrule. No program, test or guardian change. One commit (c5eaa6b), from an independent pre-merge review of the docs in #116–#148.elf_extentand so change Floor on chain (Floor sBPF 8ca8a608 -> 86eb426e). The new row says what changed, where it's reached (Floorloader.rssnapshot_identical, called frompin_snapshot,abort,close_bufferandexecute_release), and that it is not yet on devnet. There is also a new question for the auditors on the class below sBPF v3 that row 116 states.claims.pyrule now checks this line; with "18" planted back, claims.py fails.Proof
tools/claims.pyOK (findings 131, targeted 26), self-test OK; each commit green;scripts/check.shALL CHECKS PASSED.Limits
🤖 Generated with Claude Code