(epoch, subject_wallet, subject_epoch). The pattern comes from Dojang.
The pattern: Dojang’s Balance Root, applied to usage
Dojang (도장, the seal) is GIWA’s attestation system. One of its schema pairs is a ready-made template for proving private per-user numbers against a public commitment:- Balance Root: one attestation per
(coinType, snapshotAt)carrying a Merkle root over all users’ balances at a snapshot. - Verified Balance: a per-user Merkle proof against that root, provable without revealing anyone else’s balance.
The attestation: an eight-word data tuple
There is no global cross-builder root: the EASrecipient is the builder’s wallet, and wallet-bound leaves prove membership for that Passport only. The schema string is:
The attestation is non-revocable, has no resolver, and evolves only by new schema registration: EAS schema content participates in the schema UID, so a changed layout is a new schema, never an in-place upgrade.
Leaves, salt, and the provable tier
Membership leaves bind each receipt to one wallet and one subject epoch:uint8(1) discriminator is the gateway-observed-v1 protocol code: the class of evidence behind the root is committed on-chain, not asserted in copy. A tier-in-the-leaf design, leaf = hash(builderAddr, tokens, cost, tier, receiptRoot, salt), would make the verification tier part of the committed data so the tier itself is provable; the frozen V1 implementation instead carries that evidence class as the protocol discriminator inside summaryCommitment and keeps leaves minimal (digest, wallet, subject epoch). Either way, a verifier checks the class cryptographically rather than trusting a label. The five-tier vocabulary is defined in Verified Usage and the Evidence Ladder.
The attestation worker pipeline
The publisher is a background worker following the reconciler pattern: its own pool, an advisory lock, and exactly one replica publishing.1
Check cryptographic eligibility
Before a receipt commitment can enter a candidate set, the worker recomputes the fixed V1 typed data and digest and verifies a canonical low-S ECDSA signature against the versioned production signer registry. The registry excludes the local Anvil fixture signer. A job state of
issued, a 65-byte blob, or a digest-shaped value is never proof; a poisoned row yields no candidate.2
Construct the root
Per
(epoch, subject_wallet, subject_epoch), collect commitments, order leaves by raw RFC 4122 UUID bytes, and build the receiptRoot.3
Persist the durable intent outbox
Write the intent before broadcast, keyed unique on
(epoch, subject_wallet, subject_epoch, eas_schema_uid). A submit timeout is pending, never permission to issue a second attestation for the epoch.4
Publish and reconcile
Broadcast one
attest() call, retain the transaction nonce and hash, and reconcile the receipt and canonical block before recording the EAS UID.5
Persist the proof
Store the attestation UID, transaction hash, root, leaf version, and the ordered leaves or proofs so the public proof page survives retention and project deletion.
Next steps
- For the receipt format that feeds the leaves, see UsageReceiptV1.
- For the attestation rail this schema publishes onto, see Dojang: On-Chain Attestations.
- To verify one receipt against a published root, see Verifying a Receipt.
- For what is anchored on the public chain today, see Live Evidence.