Repository navigation
tests: the recheck of conflicted's tests of record, the Lean's rows of both machines (for #47) - #73
Merged
Merged
Conversation
…ach under its own machine (for #47) The rows file gains the 47 #guard lines of HandedRows from "The competitor's proof goes on the record" and the 5 of Tracker.LeafRows at bsv-stack-lean a7ef91de, with one row of the crate's own (the self refusal). Each row names its group and its machine, and each input of a trace the machine the source's run P or runR passes it through. The replay runs every row under its own machine (45 under the door, 8 under the latch, LeafRows' competitor named C listed as not spelled), then replays the latch's rows a second time through the door wherever stepRecheck_eq_step's premise holds at every step: the keeper's condition for one machine with a mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rom their bytes (for #47) mined_implies_checked_proof, stale_iff_header_inactive and hint_changes_no_chain_word run each trace under the latch and under the door, with two competitors whose proofs are built from their bytes; a hint writes no record. same_evidence_same_word stays over the latch: theorem (iv) is a statement of step, and sameViewOtherRecord shows equal views part over the door. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… for its Lean theorem (for #47) 23 properties named for the theorems of the section "The recheck of conflicted" of lean/Tracker.lean at bsv-stack-lean a7ef91de, and 3 of the crate's own (a competitor's length is its own; no run lists an id whose only entry is gone; conflicted from handed keeps its list). 256 cases from the fixed ChaCha seed, no failure persistence; every trace runs under both machines, two competitors' proofs built from their bytes, and each premise is met in some case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e (for #47) No run writes it (the property conflicted_from_handed_keeps_its_list): a conflict begun from handed keeps the list for its return, and a return from such bytes would give handed with no instance, which the decoder refuses on its own bytes. Issue 57's rows of pull request 72, item 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…behaviour unchanged (for #47) name_the_unrecorded and Tracker::on_chain each scanned a list per item; the list and the record grow with every verdict a node repeats. Each now keeps the ids it has in a set; the order written and the ids selected are as before. Issue 57's rows of pull request 72, item 4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eturn check made live (for #47) The goldens carry each competitor's length beside the tracked transaction's own field (191 on the record, 65 or unmeasured in the last field), the named competitor with none, and the return with the record marked. The refusals are spelled from the same pieces; a record with no prior word is read, and a run writes one (a restored version 1 row joined). The generator of tests/compact.rs runs each step under either machine with two competitors; the property a_conflicted_word_and_its_record_name_the_same_competitors reads the row's conflict before the step, so a return by that step is checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ates step by step (for #47) The latch, the production proofs and the reorg nobody hears meet no conflicted word, so stepRecheck_eq_step says the door changes none of their states: each runs under both machines and the trails are compared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(for #47) The tracker's rows step runs rows_of_record_recheck beside rows_of_record_handed and greps its two count lines: 14 named passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rows of both machines and their replay, the properties beside their theorems, the goldens and refusals, issue 57's rows of the earlier change, and the eight planted faults with the tests that caught each. VERIFICATION says that two hosts agree on the word under the door only where they hold the same record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clippy -D warnings: a struct literal for the competitor's headers, and the replay's large state variant boxed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s (for #47) cargo +1.88 refuses the temporary borrowed in competitor_is_another's assert (E0716). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
A host of the crate can now run the recheck of
conflicted(the door behindParams::recheck_conflicted) knowing that the crate answers the Lean's executable rows of both machines, each under its own: 46 rows of the word under the latch, 45 of the door under the door, 8 under the latch, 0 divergences. The latch's rows are replayed a second time through the door whereverstepRecheck_eq_stepsays the two machines agree. The door's theorems run as 23 properties named for them, over both machines. The compact form now refuses one shape no run writes:conflictedfromhandedwith no instance.For #47.
The tests and what they pin
The rows (
tests/vectors/tracker/rows_of_record.json, sha2560e8f1305...d3e1;tests/tracker_rows.rs). At bsv-stack-leana7ef91de,lean/Tracker.lean(blobc2a6045a),grep -c '^#guard'counts 47 rows inHandedRowsfrom "The competitor's proof goes on the record" to its end and 5 inLeafRows. That is 52, matching the plan's 52, and all are transcribed, plus one row of the crate's own (self_competitor_refused). Every row names its group and its machine, and every input of its trace names the machine the source passes it through (run Pisstep,runRisrecheck).rows_of_record_recheckruns the 53 under their own machines. One row is not spelled and is listed by name:leaf.4, a competitor named C offered X's proof (the crate names a competitor by its proof's own txid).0 ahead of the Lean: every row starts atState.init "T", so none meets the named join. The stack's main on this host is stilla7ef91deand has no mirror of it.stepRecheck_eq_step's premise holds at every step of the row's traces. 52 are covered and replayed; 1 is not covered (returned.5, the latch's own reorg onconflictedT).The properties (
tests/recheck_properties.rs, new): 23 named for the theorems of "The recheck ofconflicted", fromstep_conflicted_latchedtoconflictReask_only(withconflictReask_bounded) andconflictReads_le. Three are the crate's own:a_competitors_length_is_its_own(K4's scope: a competitor's length never moves the tracked measure, 64 included);no_run_lists_an_id_whose_only_entry_is_gone;conflicted_from_handed_keeps_its_list.Each runs 256 cases from the fixed ChaCha seed with no failure persistence. Every trace runs under both machines, the two competitors' proofs are built from their bytes, and each premise is met (checked).
The generators:
tests/properties.rsruns three of its four properties over both machines with two competitors.same_evidence_same_wordstays over the latch, and VERIFICATION says that two hosts agree on the word under the door only where they hold the same record.tests/compact.rs's generator runs each step under either machine.The scenarios:
tests/scenarios.rsruns the three scenarios of record under both machines, and the states are the same step by step.The goldens (
tests/compact_golden.rs): four with a record, each competitor's length beside the tracked transaction's own field:conflicted_with_a_checked_competitor,conflicted_from_handed(191 on the record, 65 in the last field),conflicted_named_by_a_node,returned_with_the_record_marked.record_refusalspins BREAKING (the compact format): Conflicted keeps the competitor's checked proof and is rechecked on a reorg and an invalidation, as Mined is (ruling 28.3) #47's refusals as bytes.a_record_with_no_prior_word_is_written_by_a_run_and_restorespins that shape as accepted.Issue 57's rows of pull request 72:
conflictedfromhandedwith no instance (src/compact.rs). The record with no prior word is pinned as read. The gone-only id is left to the decoder, and a property says no run writes it.a_conflicted_word_and_its_record_name_the_same_competitorsreads the row's conflict before the step. It fails when the named join is removed (below).name_the_unrecorded(src/state.rs) and in the door's selection (src/tracker.rs), with behaviour unchanged.The mutation check: eight faults were planted in the door's arms, one at a time, and reverted. Every one fails some test of this change (the table in
docs/VERIFICATION.md):competitor_is_another; the row cannot tell it from the length rule's refusal);The compact form: the record rides version 2, since no published prerelease reads version 2.
The proof
The
vectorsjob's tracker step runs both tests by name and greps their three count lines: 14 named passes.Rows left
self_competitor_refusedcannot tell the self refusal from the length rule's. The file's tracked transaction has no bytes, so its stated proof offered as a competitor's is also refused asUnmeasured, with the same re-ask. The propertycompetitor_is_anotherpins the error. A tracked name with bytes in the rows file would let the row pin it too.a7ef91de. When the stack exports the tracker's rows, the file becomes a byte copy pinned by its sha256, and the per-step machine marks move with it.handed_to_only_beside_handedstays over the latch. It already readsprior(lane 3 tightened it). The door's half isconflicted_from_handed_keeps_its_listover both machines. A single property over both machines would replace the two.The landing is the captain's.
🤖 Generated with Claude Code