Set L2 Architecture
Set L2 anchors batch commitments and proof metadata on-chain, so a client can verify event inclusion and policy compliance without trusting the sequencer. The chain becomes the source of truth rather than the operator.The flow
- The sequencer orders events and computes Merkle roots over payload hashes.
- The prover generates zero-knowledge compliance proofs over encrypted payloads.
- SetRegistry on-chain stores the batch commitment and proof hashes.
- A verifier recomputes the root locally and compares it against the on-chain commitment.
Batch commitments
Each batch anchors a state transition, not just a set of events:prev_state_root chaining is what makes gaps and forks detectable. Strict mode verification
checks continuity across the chain of commitments, so a missing or rewritten batch fails
verification rather than passing silently.VES_LEAF_V1 for leaves,
VES_NODE_V1 for internal nodes, and a VES_PAD_LEAF_V1 constant padding the tree to a power of
two. A leaf commits to the stream identity and sequence number as well as the event, so a leaf
cannot be replayed into a different position. The engine can produce an inclusion proof for any
individual event.
Compliance proofs
When payloads are encrypted β an order amount, say β a policy still needs checking without revealing the data. Thatβs what the STARK prover produces:Chain configuration
Multi-tenant isolation is per tenant and store, keyed by
keccak256(tenantId, storeId).
Merchants can sponsor user transactions through SetPaymaster.
Why anchor at all
This is the same principle as verified decisions and
ICP receipts: the party relying on a claim can check it themselves.
Related
- Set L2 Overview
- Set L2 Verification β how to actually verify
- Sequencer Architecture