feat(2c-D): PR B — construct and publish TA_B from the economic post-state - #853
Merged
Merged
Conversation
…state The owner ruling on producer reachability splits the remaining work into three. PR A (#852) made the 0x0032 acceptance leaf mandatory on every market settle. This is PR B: TA_B stops being an artifact only its own tests can build. Before this, `TraderAcceptance::new` had no caller outside its own tests. 2c-D §7 was constructible in the verifier and unreachable in the live settle path — a verifier with no subject. THE PATH IS TAKEN FROM THE FINISHED TREE, NOT FROM THE MUTATION TA_B proves the acceptance leaf's inclusion under R_T^+, so its path is the one that holds in the FINAL post-state. A mutation's own captured siblings are not that path: the write set captures mutation i's siblings with mutations 0..i applied, and the leaf's key is a hash, so nothing places it last. `produce_trader_acceptance` therefore reads the finished tree — the same single snapshot whose root was registered — and refuses when that tree is not the one the register committed. `the_leafs_own_captured_siblings_are_not_the_path_under_the_final_root` pins that, and it had to CHOOSE an operation id to do so: with the fixture's own id the acceptance sorted last, the two paths agreed, and the test passed while proving nothing. Removing the guard and reusing the mutation's siblings was executed, not reasoned about — that named test plus all eight §7 round-trip tests go red, and the file was restored from a byte copy. THE IDENTITIES ARE CONSUMED, NEVER CHOSEN `b` and `economic_operation_id` arrive inside the emitted leaf, lifted out of the witness; there is no parameter through which a caller could supply either. `trader_genesis` is the authenticated local identity and `economic_position` the position the register just committed. Both the tree and the witness are pinned to the validated root before anything is read out of either, so one transition's leaf can never be paired with another's proof. NOTHING IS REALIZED No `CompleteValidity::from_market_witness`, no fence release, no realized frontier, no receipt publication, and no `BundleAcceptanceWitness` — that type's only constructor is §7's verifier, which needs the composed bundle and an independently established trader AK this path does not have. The live-route control asserts publication and non-realization TOGETHER: a test that only proved publication would not notice a premature release, and one that only proved nothing released would have passed before the producer existed. The stale comment at the settle call site — "no bundle-acceptance witness exists to construct" — is corrected in the same change rather than left to read as still true. The artifact now exists; the witness still does not. dsm/src/economic/acceptance_produce.rs the producer + 8 unit controls dsm/tests/trader_acceptance_producer.rs produced TA_B meets §7, 8 tests economic_admission_flow.rs published from the one snapshot dlv_routes.rs the live-route control No locator is returned from the admission: ta_B IS the object's inner address under its namespace, and a Def 14.2 receipt binds ta_B, so a second copy threaded through the outcome would be one more place to disagree. Verification (targeted, by module path): economic::acceptance_produce 8/8 trader_acceptance_producer 8/8 bundle_acceptance_write_set 12/12 economic_write_set 23/23 trader_acceptance_conformance 5/5 bundle_acceptance_leaf_conformance 7/7 sdk::economic_admission_flow 1/1 dlv_routes settle-dependent set 16/16 (enumerated by call site) make lint exit 0 ci/production_safety_checks.sh exit 0
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.
PR B of the owner's three-change producer/cutover decomposition.
Before this,
TraderAcceptance::newhad no caller outside its own tests. 2c-D §7 was constructible in the verifier and unreachable in the live settle path — a verifier with no subject.The path comes from the finished tree, and that distinction is testable
TA_Bproves the acceptance leaf's inclusion underR_T^+, so its path is the one that holds in the final post-state. A mutation's own captured siblings are not that path: the write set captures mutationi's siblings with mutations0..iapplied, and the leaf's key is a hash, so nothing places it last.the_leafs_own_captured_siblings_are_not_the_path_under_the_final_rootpins it — and it had to choose an operation id to do so. Written the obvious way, the fixture's acceptance sorted last, the two paths agreed, and the test passed while proving nothing. It now picks an id that keys the acceptance before the debit.Mutation control, executed: replace
tree.siblings(&key)with the mutation's own captured siblings. That named test goes red, and all eight §7 round-trip tests go red with it. Restored from a byte copy; re-verified green.Identities are consumed, never chosen
bandeconomic_operation_idarrive inside the emitted leaf, lifted out of the witness — there is no parameter through which a caller could supply either. Both the tree and the witness are pinned to the validated root before anything is read out of either, so one transition's leaf can never be paired with another's proof.Nothing is realized
No
CompleteValidity::from_market_witness, no fence release, no realized frontier, no receipt publication, noBundleAcceptanceWitness.a_settled_market_publishes_a_trader_acceptance_and_realizes_nothingasserts publication and non-realization together, over the live route. A test that only proved publication would not notice a premature release; one that only proved nothing released would have passed before the producer existed.The stale comment at the settle call site — "no bundle-acceptance witness exists to construct" — is corrected in the same change. The artifact now exists; the witness still does not.
Dependent sweep
Every market settle now publishes one additional immutable artifact.
immutable_keys_in_fleetis namespace-scoped to vault-state/anchor-presentation, so artifact-count assertions are unaffected; the durability gate runs before the post-admit push. The 16 settle-dependentdlv_routestests were enumerated by call site and run individually. The crash-resume path replays the frozen witness onto the validated pre-tree, so it produces the identical content-addressed object.No locator is returned from the admission outcome:
ta_Bis the object's inner address under its namespace, and a Def 14.2 receipt bindsta_B— a second copy threaded through would be one more place to disagree. PR C adds a fetch path with the code that reads it.Files
dsm/src/economic/acceptance_produce.rsdsm/tests/trader_acceptance_producer.rsTA_Bmeets §7, 8 testseconomic_admission_flow.rsdlv_routes.rsVerification