Skip to content

feat(2c-D): PR B — construct and publish TA_B from the economic post-state - #853

Merged
cryptskii merged 1 commit into
mainfrom
feat/2c-d-producer-trader-acceptance
Sep 11, 2026
Merged

feat(2c-D): PR B — construct and publish TA_B from the economic post-state#853
cryptskii merged 1 commit into
mainfrom
feat/2c-d-producer-trader-acceptance

Conversation

@cryptskii

Copy link
Copy Markdown
Collaborator

PR B of the owner's three-change producer/cutover decomposition.

PR A (#852)  bundle-aware settle write set; 0x0032 becomes mandatory
             -> the acceptance leaf is guaranteed to EXIST
PR B (here)  construct and publish TA_B from the resulting post-state
             -> TA_B is guaranteed to be CONSTRUCTIBLE and REACHABLE
PR C         the realization / fence-release cutover
             -> live realization is ALLOWED to consume it

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 comes from the finished tree, and that distinction is testable

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.

the_leafs_own_captured_siblings_are_not_the_path_under_the_final_root pins 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

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. 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, no BundleAcceptanceWitness.

a_settled_market_publishes_a_trader_acceptance_and_realizes_nothing asserts 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_fleet is 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-dependent dlv_routes tests 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_B is the object's inner address under its namespace, and a Def 14.2 receipt binds ta_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.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
amendment 2c-D §6 the producer-adoption record

Verification

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
make lint                              exit 0
ci/production_safety_checks.sh         exit 0

…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
Comment on lines +8546 to +8547
"the fence is committed and awaiting acceptance, not Released ({:?})",
fence.state
@cryptskii
cryptskii merged commit 1c96dbb into main Sep 11, 2026
18 of 19 checks passed
@cryptskii
cryptskii deleted the feat/2c-d-producer-trader-acceptance branch September 11, 2026 00:49
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