Skip to content

feat(economic): a device can publish, and a stranger can verify, which leaves its registered root commits - #764

Merged
cryptskii merged 1 commit into
mainfrom
feat/economic-proof-artifact-transport
Sep 4, 2026
Merged

feat(economic): a device can publish, and a stranger can verify, which leaves its registered root commits#764
cryptskii merged 1 commit into
mainfrom
feat/economic-proof-artifact-transport

Conversation

@cryptskii

Copy link
Copy Markdown
Collaborator

Summary

The generic economic-proof transport, first step of the locked chain. A device publishes which leaves its registered root commits; a stranger verifies them against a root it established itself.

validated post-transition tree  (the one the write set advanced)
        ↓                        root already registered at this position
one named position + root
        ↓
the externally citable leaves this transition wrote
        ↓
a 256-sibling inclusion path for each, from that same tree
        ↓
EconomicProofArtifactV1  ── frozen in the admit tx, delivered by the quorum sweep
        ↓
reader fetches by content address and RECOMPUTES against the root it named

Why nothing could be proven before

The register publishes the root at a position. It never published which leaves that root commits. EconomicSmt::siblings had exactly one production caller, inside the witness builder, and it published nothing. So the trader's 0x0026 (prove the owner's two vault reserves) and the owner's 0x0027 (prove the trader's settlement receipt) both needed material that did not exist. The existing trader settlement receipt does not substitute: it proves against the device tree under a different key derivation.

The three structural properties

property how it is enforced
One snapshot built from tree inside finish_admission — the same post-transition tree whose root was just registered, so no second read and no window for it to move. The root equality is stated, not assumed, and new re-derives every path before the bytes exist, so a mixed-snapshot artifact cannot be constructed
No self-assertion no signature; verify_against takes the publisher, position and root the reader established independently and refuses anything else before recomputing. A locator makes an artifact findable, never valid
Keys are derived the leaf key comes from the decoded state's class plus the publisher's coordinates, never supplied alongside the leaf

What gets published

Every admission publishes proof of the externally citable leaves its transition wrote: vault reserves and settlement receipts, the two classes an evidence type asks another device to verify. Balance and consumed-source leaves are excluded on purpose — nothing cites them, and each path costs 8 KiB, so carrying them would grow every admission to prove what no reader wants. That exclusion has its own mutation control.

The artifact is a post-admit artifact: frozen in the admit transaction and delivered by the existing quorum republish sweep, so it cannot reach the fleet before the root it names is registered.

Proof

check result
a stranger with only coordinates, position and root recomputes every leaf and path, on a real admitted funded create fetched by content address green
both reserve legs provable at the create's vault generation; no balance leaf carried green
leaves and paths from two snapshots refused at construction and at reading green
a tampered path, a repeated leaf, an amount the root does not commit each refused
reading the same bytes at a position or root the reader did not establish refused
decode is strict about shape and does not check inclusion, so shape alone is never evidence green
mutation, per gate: verify_against root equality, check_inclusion recomputation, the producer self-check in new, the citable-leaf filter each reddens only its own named test; restored checksum-verified
boards workspace 74 binaries, 3964 passed / 0 failed / 17 ignored (dsm lib 1692/0, dsm_sdk lib 1813/0/7 ignored), exit 0; node 11 binaries, 276/0, exit 0; root make lint exit 0; frontend type-check 0, lint 0, jest 1101 passed; ci/production_safety_checks.sh PASS (pinned 1.98.0, incl. TLA+); scripts/ci_scan.sh PASS — all on tree stamp e0620f48fde5, identical before and after every run

Not in this PR

No evidence type consumes it yet. ReserveConsumptionEvidenceV1 and SettlementPaymentEvidenceV1 still carry their own bespoke leaf-and-path fields, and no routing advertisement carries a locator. Rewiring those to consume this object belongs with the 0x0026 producer, which is where a reader first needs to find one. Stated rather than left to be discovered.

…h leaves its registered root commits

A device's economic root is published as a write-once register cell at a
named position, so anyone can establish WHICH root it committed. Nothing ever
published which LEAVES that root commits. Both directions of a settlement
need exactly that and neither could get it: the trader's 0x0026 must prove
the owner's two vault reserves, the owner's 0x0027 must prove the trader's
settlement receipt, and `EconomicSmt::siblings` had one production caller,
inside the witness builder, publishing nothing.

This is that object, once, for both directions.

    EconomicProofArtifactV1 {
        publisher_genesis, publisher_devid,
        economic_position, economic_root,
        leaves[] { state_ccb, siblings[256] }
    }

Three properties are structural rather than conventional:

- ONE SNAPSHOT. Every leaf and every path must derive the one root the
  artifact names. The producer builds it from `tree` inside `finish_admission`
  — the same post-transition tree the write set advanced and whose root was
  just registered — so there is no second read and no window in which the tree
  could move between naming the root and taking the paths. The root equality
  is stated there rather than assumed, and `EconomicProofArtifact::new`
  re-derives every path before the bytes exist, so a mixed-snapshot artifact
  cannot be constructed, let alone published.
- NO SELF-ASSERTION. The artifact carries no signature and proves nothing
  about its own authority. `verify_against` takes the publisher, position and
  root the READER established independently and refuses an artifact naming
  anything else, before recomputing. Whatever points at an artifact — an
  advertisement, an evidence descriptor — is a locator, never a warrant.
- KEYS ARE DERIVED. The leaf key comes from the decoded state's own class and
  the publisher's coordinates, so a publisher cannot present a leaf under a
  key it chose.

Every admission now publishes proof of the externally citable leaves its
transition wrote — vault reserves and settlement receipts, the two an
evidence type asks another device to verify. Balance and consumed-source
leaves are excluded deliberately: nothing cites them, and each path costs
8 KiB, so carrying them would grow every admission to prove what no one
reads. The artifact is a post-admit artifact, frozen in the admit
transaction and delivered by the existing quorum republish sweep, so it
cannot reach the fleet before the root it names is registered.

Proven: a stranger holding only the publisher's coordinates, position and
root recomputes every leaf and path and gets that root back, on a real
admitted funded create fetched by content address; leaves and paths from two
snapshots are refused at construction AND at reading; a tampered path, a
repeated leaf, an amount the root does not commit, and reading at a position
or root the reader did not establish are each refused; decode is strict about
shape and does not check inclusion, so shape alone is never evidence. Four
mutation cycles, each reddening only its own named test, restored
checksum-verified.

NOT in this change: no evidence type consumes it yet. The 0x0026 and 0x0027
bundles still carry their own bespoke leaf-and-path fields, and no
advertisement carries a locator. Rewiring them to consume this object is the
0x0026 producer cut, which is where a reader first needs to find one.

Boards: workspace 74 binaries, 3964 passed / 0 failed / 17 ignored (dsm lib 1692/0, dsm_sdk lib 1813/0/7 ignored), exit 0; node 11 binaries, 276/0, exit 0; make lint exit 0; frontend
type-check, lint and jest green; production safety PASS (pinned 1.98.0);
ci_scan PASS.
@cryptskii
cryptskii merged commit 953c5ce into main Sep 4, 2026
18 checks passed
@cryptskii
cryptskii deleted the feat/economic-proof-artifact-transport branch September 4, 2026 02:42
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.

1 participant