Repository navigation
The record of a conflict and the recheck of conflicted behind Params::recheck_conflicted (for #47) - #72
Conversation
…to a competitor's proof of the tracked txid (for #47) The tests that decide #47's lane, at its base: a registry holding a mined word and two conflicted words (one on a competitor's checked proof, one named by a node) under every chain event the feed carries, its updates and states pinned; a conflicted state under every chain event and a recheck, left whole; and a proof offered as a competitor's for the tracked txid, which the latch at this commit writes as conflicted on itself. The next commits keep the two of them unmoved with the mode off and replace the third. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…al of a competitor that is the tracked transaction, and the mode's flag (for #47) A conflicted word now keeps what the recheck of #47 reads, mirrored from bsv-stack-lean lean/Tracker.lean (onCompetitor, onVerdict, keptRivals, keptPrior, verdictRivals, verdictPrior, leaveWord): - Competitor, re-exported at the root: its txid, its own measured length (Some for one entered by a proof, None for one a verdict named; never the tracked transaction's measure), its checked proof and its gone mark, with readers; State::rivals and State::prior. - on_competitor refuses a proof whose txid is the tracked one (TxidMismatch, ProofFailed, nothing else moved) before the length's refusal and the header check; a checked competitor goes on the record at the front with its proof and length, and the word of the moment is kept as the prior word when the conflict begins. This moves for every host: the latch wrote conflicted on the tracked txid itself. - on_verdict: a conflicted verdict puts its competitors on the record with no proof and keeps the prior word; rejected leaves both. - Reask::CompetitorGone and its label; Params::recheck_conflicted, false in Params::new, with its builder (Params is non-exhaustive: no host breaks). Nothing reads the flag yet. - The compact form fills the two fields version 2 carries (the record and the prior word) and reads re-ask tag 8, so a state with a record keeps round-tripping; the decoder's refusals follow the plan. The tests the record moves, each pinned what this change fills: the conflicted golden (a verdict's state now holds its record and the prior word unknown; its old ending is quoted), the version 1 row's restore of that state, the relation of the two versions for it, the refusals of a record and a prior word "empty in this release", and the instance beside a conflicted word (kept only when the conflict began from handed). The self-competitor case of the base commit now reads the refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…check_conflicted (for #47) With the flag on, State::step is the Lean's stepRecheck (bsv-stack-lean lean/Tracker.lean: recheckConflict, onChainConflict, rivalAtOrAbove, rivalCheckedAgainst, rootGone): a conflicted word meeting a chain event or an executed recheck reads the host's header at each standing competitor's height, one read each. Every competitor's root gone: the word returns to the word held before the conflict through leave_word (seen as announced), with Reask::CompetitorGone naming the word's competitors, the record kept and marked, the mark cleared, the instances kept only for a return to handed. A standing competitor unanswered: conflicted on the standing ones, Reask::Recheck, and the fault of the one nearest the front. A competitor a node named, and an empty record, never leave. With the flag off, the default, every output is the latch's. Tracker keeps two indexes for conflicted words (the heights of their standing checked competitors and the headers those were checked against) and, under the flag alone, adds the words they select to a reorg's, a fork's, a split's and an invalidation's targets, after the mined words and with no txid twice. The crate's split and resolved split meet a conflicted word as a fork and a tip of a marked word, as they meet a mined one (the stack's ChainEvent has no split). Tests: the door's rows over one state (the return, the bound, the root that stands, fail closed, the words returned to, two competitors, a named one, an empty record, fork then tip, invalidation, splits, hints and host acts) and over a registry (the latch's outputs unchanged with the flag named off, the selection under the door, one header read per standing competitor with a proof). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, a state with a record round-trips, and the list property tightened (for #47) The record and the prior word ride version 2, which no published release reads: the fields lane 1 of #56 wrote as zero counts now carry their bodies, so no version 3 is needed. The module's table and the doc of State::to_compact and State::from_compact now name them: each competitor's txid, length, checked proof (read back as a record, never checked against headers) and mark; the prior word as the word field writes it; re-ask tag 8. A restored record comes back exactly, its competitors not marked suspect. Tests: a state with a record round-trips (a checked competitor with its 191-byte length, a named one beside it, the marks after a recheck, a returned word with CompetitorGone); each refusal as bytes (the tracked txid as a competitor, a proof of another txid, a checked proof with no length, a length of 64, a record whose root does not hold, a named competitor with a length or marked gone, a prior word mined or conflicted, a bad flag, a count past the bytes); the round-trip property's generator feeds the door at random places and reaches a checked record, a mark and a return. handed_to_only_beside_handed is tightened to conflicted whose prior word is handed, both ways, now that the prior word exists. Every golden string of tests/compact_golden.rs is the base's but the conflicted state of record's tail, moved by the previous change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e door, and what a host must show about a competitor (for #47) Under ## [Unreleased]: the Hosts paragraph (the latch is the default and changes nothing; a competitor's proof for the tracked txid is refused for every host; the hash of a competitor's bytes is the crate's check and the spend of our input stays the host's; what a host that turns the door on feeds), the Added entry for Competitor, the record, the prior word, Params::recheck_conflicted, the door and Reask::CompetitorGone, and the Changed entry for the refusal and the compact form's two fields, with the tests that moved and why. README's hosts' lines and docs/SPEC.md's paragraph on the competitor door say the same in their own words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Held for a fix round, on the captain's ruling after two cold reads at With The cure, ruled: when a competitor joins a New commits on this branch: the tests that decide, then the cure. Nothing lands before its checks are green and the changed arm is read again. The reads' other rows go to the lane that follows and to the crate's issue 57. |
…s record as one set (for #47) A version 1 `conflicted` row, as the published 0.9.0-beta.10 writes it, restores with the word's list and an empty record. Under `Params::recheck_conflicted` a checked competitor Z that joins went on the record alone, so a reorg that removed Z's root returned the word to `unknown` with `CompetitorGone` while the row's own competitors stood. The tests that decide it: the reader's row (red here: the word becomes `unknown`), the same row with the door off (the latch, green), a row that nothing joins (never leaves, and its write-back bytes pinned as a literal: green), and a property over the round trip's generator that a `conflicted` word's list and its record's standing ids are one set unless the record is empty (red here on a join to a restored row). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecorded competitors (for #47) The cure of the reader's row. When a checked competitor or a node's verdict joins a `conflicted` word, each id of the word's list with no entry on the record goes on it as named (no proof, never rechecked by a root), after the entries the record holds. After any join the word's list and the record's standing ids are one set. A restored version 1 row, whose record is empty, is the one state that lists such an id: its competitors now stand as named ones, so a reorg that removes the joined competitor's root leaves the word `conflicted` on them, never `unknown` with `CompetitorGone`. A version 1 row nothing joins is untouched: its record stays empty and it writes back the same bytes. Ahead of the Lean: `Tracker.onCompetitor` and `Tracker.onVerdict` keep the record of a state stored before the record existed as it was. The property now also holds that a restored row's own competitors never return; its one return over the generator is a later conflict, begun after the subject's own proof ended the row's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r (for #47) CHANGELOG's entry for the door says what a restored version 1 `conflicted` row's competitors are once a competitor or a verdict joins it: named on the record, so the row never leaves by a chain event or a recheck. VERIFICATION records the four tests of the round with their answers before and after the cure, and where the crate builds ahead of `lean/Tracker.lean` (`onCompetitor`, `onVerdict`, `keptRivals`) at bsv-stack-lean `9a727a64`. No sentence of docs/SPEC.md describes the record's join, and none there moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The fix round (lane What the read found. A version 1 The cure. When a competitor or a verdict joins a The Lean.
What the rule keeps of a gone Z: Z stays on the record marked gone and leaves the word's list ( For #47. |
A host can now turn on the recheck of
conflicted: withParams::new(..).with_recheck_conflicted(true)aconflictedword whose every competitor has lost its root from the host's headers returns to the word held before the conflict (seenasannounced), withReask::CompetitorGone. The record behind it is public:State::rivals()(eachCompetitorwith its own measured length, its checked proof and its mark) andState::prior(). With the flag off, the default, the machine is the latch, as before. For every host, a competitor's proof for the tracked txid itself is now refused (CheckError::TxidMismatch).For #47. Lane 3 (
trk-47-1) of the plan for #56 and #47; mirrored from bsv-stack-leanlean/Tracker.leanata7ef91de(section "The recheck ofconflicted").What it builds
Competitor(re-exported),State::rivals,State::prior;on_competitorrefuses the tracked txid, then the competitor's length, then the header check;on_verdictputs a node's competitors on the record with no proof;leave_word(Tracker.leaveWord).Params::recheck_conflicted(false inParams::new) andParams::with_recheck_conflicted;State::stepreads it: off isTracker.step, on isTracker.stepRecheck(recheckConflict,onChainConflict).Tracker: two indexes forconflictedwords (standing checked competitors' heights and headers) and, under the flag alone, their selection after theminedwords.conflictedword puts each id of the word's list with no entry on the record on it as named (name_the_unrecorded), so after any join the word's list and the record's standing ids are one set: a restored version 1 row's competitors stand as named ones and never leave by a chain event or a recheck. Ahead ofonCompetitorandonVerdict(keptRivals) inlean/Tracker.leanat bsv-stack-lean9a727a64, which keep the record of a state stored before the record existed as it was.Evidence::Competitor's doc, README anddocs/SPEC.md: the hash of the competitor's bytes is the crate's check; the spend of our input stays the host's.The tests and what they pin
tests/transitions.rs: the latch leaves aconflictedword whole under every chain event and a recheck;a_competitor_proof_for_the_tracked_txid(refused in both modes; the latch's old answer,conflictedon itself, quoted as what it replaces); the record and the prior word; a competitor's length and the tracked measure kept apart (K4's scope); the door's rows over one state (return, bound, root that stands, fail closed, every word returned to, two competitors, a named one and an empty record never leave, fork then tip, invalidation, splits, hints and host acts).tests/reorg_by_root.rs: the latch's outputs over a registry withconflictedwords (the base commit pins them; they do not move, and are equal with the flag named off); the selection under the door; one header read per standing competitor with a proof.tests/compact.rs: a state with a record round-trips; each refusal of the record and the prior word as bytes; the round trip's generator feeds the door at random places.tests/compact_golden.rs: the publishedconflictedrow of record under the door (a checked competitor joins, its root then gone: the word staysconflictedon the row's competitors, noCompetitorGone), the same with the door off (the latch), and a row nothing joins (never leaves; its write-back bytes spelled as a literal).tests/compact.rs:a_conflicted_word_and_its_record_name_the_same_competitors, over the round trip's generator with every other case a restored version 1 row (129 rows, 46 joins on a row).tests/labels.rs(competitor_gone), a unit test ofleave_word, andhanded_to_only_beside_handedtightened toconflictedwhose prior word ishanded, both ways.Moved by the record (every name of the base is present and green): the golden
conflicted_by_ids_and_text(a node's verdict now writes its two competitors on the record and the prior wordunknown; its old ending is quoted);version_1_bytes_still_restoreandversion_2_is_version_1_with_four_empty_fieldsfor that one state;handed_refusalsandversion_2_refusalslose their pins of a record "held empty in this release";an_instance_beside_each_word_of_record. Every other golden string is byte-identical.The proof (tails)
Rows left
prior; the decoder does not refuse it (the plan lists no such refusal). For lane 4 or the keeper.conflictedword whose list differs from its standing competitors. The word's ids and the record's standing ids agree on every run; the bytes are not checked for it.rows_of_record_recheckandtests/recheck_properties.rsare lane 4's (trk-47-2); thevectorsjob's count does not move here.conflicted_by_ids_and_text. Lane 4's four goldens should be recorded against this layout.The landing is the captain's.
🤖 Generated with Claude Code