Engine

From a state change
to an accepted proof.

A sparse-Merkle frontend compiles each state change into a layered circuit. A reusable sumcheck and GKR core proves it. A strict verifier accepts the result only for the request that asked for it.

The path

Five steps, one request.

Every step is deterministic and every boundary is explicit, so a result can be checked by a party that never saw it being made.

  1. 01

    Request

    An operation, its witness and its public inputs: the old root, the new root, the operation tag, the key and the value digest.

  2. 02

    Compile

    The sparse-Merkle frontend turns the operation into a layered arithmetic circuit. For repeated work this is prepared once and reused.

  3. 03

    Prove

    Sumcheck reduces the claim at each layer, from the output down to the inputs. The transcript binds every round in a fixed order.

  4. 04

    Encode

    The complete result is encoded into canonical bytes that can cross a process or network boundary without losing what it proves.

  5. 05

    Verify

    The verifier decodes, binds the result to the original request and checks the proof. Anything else is rejected.

Two design rules

Sparse where it counts.
Shared where it repeats.

The sparse prover follows the Libra approach of booking only the gates a layer actually has. Preparation separates everything that stays the same from everything that belongs to one request.

Sparse layer reduction

No square tables.

The dense reference builds six tables of input pairs per layer, so its memory grows with the square of the layer width. The sparse prover records only the gate list, in two passes, and never builds those tables.

Dense reference6 square tables per layer

Storage grows with the square of the input width.

StateSync-GKR sparseOnly the gates that exist

Two-phase booking avoids the square tables.

Reusable preparation

Shared setup, separate proofs.

One prepared circuit serves every request of the same operation and configuration. Witnesses, transcripts and proofs are never shared, so one request's result cannot be mixed into another's.

Prepared once per operation and configurationCircuit + derived wiring + commitment
Request A

Own witness

Own transcript

Proof A
Request B

Own witness

Own transcript

Proof B
Request C

Own witness

Own transcript

Proof C
Checked against the original requestEncode, verify, then accept or reject

Nine mechanisms

What each part of the design buys you.

The nine mechanisms work together. They are not nine separate experiments, so each one names the kind of evidence that supports it.

Memory and speed

01

More work fits in the same memory.

The prover books only the gates a layer actually has, instead of six square tables of input pairs. On a two-layer mixed circuit of width 4,096, peak process memory falls 89.46-fold against the engine's dense reference.

Sparse layer reductionMeasured
02

Verification skips repeated work.

Regular circuit connections are derived from their structure instead of looked up. Prepared verification of the same proof runs 10.80 to 23.68 times faster, and the formal model states the equivalence to explicit wiring.

Derived wiringMeasured + formal model
03

Hash rounds stay compact.

Native cube gates and fused affine steps express the supported hash rounds with fewer intermediate wires and layers. This is a structural property of the circuit.

Cube gates and affine fusionSource structure
04

Proofs grow slowly with depth.

Path constraints widen the circuit within the same layer schedule. From tree depth 24 to 32 the inclusion proof grows by about 2.93 percent, while the total work still grows with the path.

Parallel path constraintsMeasured + structure

Throughput

05

Setup is paid once.

Circuit, derived wiring and commitment are prepared once per operation and configuration. At depth 24, per-request proving time is 3.46 to 4.45 times lower than preparing fresh for every request.

Reusable preparationMeasured
06

Each proof keeps its own lane.

Caller-sized worker pools run independent proof jobs and keep their input order. Parallel encoding and checking make a complete prepared local batch 9.71 to 10.71 times faster than serial output handling.

Independent proof parallelismMeasured + controls

Correct results

07

Deleted and never-written stay distinct.

Empty, occupied and tombstone leaves stay distinct, so a deleted record is never confused with one that never existed, and insert, update, delete and restore keep their meaning. An absence proof accepts either an empty or a deleted slot.

Three-state recordsModel + input tests
08

A proof answers only its own request.

The encoded verifier checks the original request, the complete proof and its settings together. Malformed bytes and proofs for a different request are rejected; only a complete proof that checks out against the original request is accepted.

Request bindingRejection tests

Extensibility

09

A core you can build on.

The layered-circuit core is separate from the sparse-Merkle compiler. A new frontend supplies its own circuit and inputs, and settles the final input checks the core leaves to it.

Reusable sumcheck/GKR coreSource + formal model

Architecture

A generic core that
never learns about state.

The sumcheck and GKR crates do not depend on the sparse-Merkle compiler, and only the primitives crate touches the underlying field and hash libraries. That boundary is what lets another frontend reuse the core.

statesync-gkrFacade

The entry point for host code: requests, preparation, proving, encoding and verification.

ssgkr-verificationVerification

Owns the composed request and result types and the acceptance path.

ssgkr-wrapExternal proof

External proof, manifest, receipt and local transition encodings. Meets verification only at the facade.

ssgkr-batchingBatching

Groups independent jobs that share a prepared circuit; each job keeps its own proof.

ssgkr-commitmentCommitment

Circuit and prepared-material commitments shared by verification and the external path.

ssgkr-compilerSparse-Merkle frontend

Native sparse-Merkle semantics compiled to a layered circuit and witness layout.

ssgkr-protocolGKR core

Layer-by-layer GKR proving and verification over any layered circuit.

ssgkr-sumcheckSumcheck core

The sumcheck prover and verifier that every layer reduction runs on.

ssgkr-primitivesField and hash

KoalaBear field, degree-four extension, Poseidon2 and challenger, built on Plonky3 0.4.3 components.

Listed from the facade down to the primitives. The highlighted crates form the generic proving core. Dependency direction, the sumcheck message order, the circuit shape, the acceptance boundary, the transcript order and the public-input set are frozen for the current release line.

See the results it produces.

Memory, verification, preparation, parallel batches and sustained delivery, each under its own controlled conditions.