Skip to content

spec(port): port the ratchet tree update integrity guard (Refs #8883) - #9977

Merged
gHashTag merged 2 commits into
gHashTag:masterfrom
dmitrii-f-t27:port/cr-chat-03-y
Oct 17, 2026
Merged

gHashTag merged 2 commits into
gHashTag:masterfrom
dmitrii-f-t27:port/cr-chat-03-y

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Contributor

Rebase of #9949 onto the current master (c4bb3b6): the original branch was cut from cd8a656, before #9970 landed the duplicate-bodies dupe-ledger blessings, so its duplicate-bodies check failed on bodies this PR never wrote (bit_at, indent, flat_index and other hardware-spec names). Same two commits cherry-picked verbatim — the spec port and the ledger row at its sorted position (after ratchet_tree_resolution_guard; the earlier unsorted insert was the loop-tools-tracked failure fixed in #9949 before the rebase).

Content unchanged from #9949: the twenty-fourth CR-CHAT-03 ring target (W3, tracker #8883, epic gHashTag/trios#1812), port of ratchet_tree_update_integrity_guard.rs (Wave-84 Lane A, R-CHAT-3) — batch ceiling 256, per update node < 1024, fresh node, parent_hash == computed_hash, epoch == current, signer ∈ members; D5 verdict with every payload field (node index, signer leaf, expected/got epochs); BTreeSet probes → scans; the node-hash-as-low-byte loop fixtures via a precomputed table read by a shared builder. All 10 original RTUI tests transcribed plus helper, builder and rule-order tests (15 total).

Checks (conventions 0-14): t27b test 15 passed 0 failed, 0 blockers; t27c test-report 15/15, 0 vacuous; gen-rust output compiles under rustc; coverage Untested 0; ASCII only; seal saved, all hashes MATCH; ledger row sorted.

Refs #8883
Closes #9949 (superseded)

…ag#8883)

The twenty-fourth CR-CHAT-03 ring target (W3, R-CHAT-3):
the tree-update rules, in the original's fixed order - the
batch ceiling (two hundred fifty-six), then per update the
node index inside the tree (one thousand twenty-four), the
fresh node, the claimed parent hash equal to the computed
one, the epoch equal to the current one, and the signer an
active leaf member - as the D5 verdict with every payload
field (the node index of the per-update rules, the signer
leaf, the expected and got epochs), the original's rule
order, and all ten RTUI tests transcribed plus helper,
builder and rule-order tests.

The original's BTreeSet probes become scans over the
updates already visited and over the member leaf slice.
The loop fixtures of the original - the node hash as the
low byte of its index - arrive as a precomputed table the
fixture builder reads, the computed and tabular forms
matching exactly (the narrowing cast on the original's
counter does not exist in t27).

Checks (conventions 0-14): t27b test 15 passed 0 failed; t27c
test-report 15/15, 0 vacuous; gen-rust output compiles under rustc;
coverage Untested 0; ASCII only; seal saved, all hashes MATCH;
@dmitrii-f-t27

Copy link
Copy Markdown
Contributor Author

All required checks green (validate, check-linked-issue, parse-ratchet, t27b-native-linux, t27b-native-macos) AND duplicate-bodies + loop-tools-tracked green after the rebase onto c4bb3b6; t27b-native-ratchet is the known non-required master red (cli-tri likewise). Steward READY. This supersedes #9949 (same two commits, rebased for the dupe-ledger blessings of #9970). Twenty-fourth CR-CHAT-03 target (24/47 T-PORT) — requesting owner merge when convenient, Refs #8883.

This was referenced Oct 17, 2026
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.

2 participants