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 : the old root, the new root, the , the key and the .

  2. 02

    Compile

    The 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.

Measured, v1.2.0

Where one request spends its time.

17.8 msof an 18.7 ms job is proving

Stage medians of one job, drawn to scale. Its reply is written 0.05 ms after the job completes.

Once per operation and configurationdirect calls, reused by every request

  1. 02Compile the circuit
  2. 02Commit to the circuit

Every requesttimed on the worker that computes it

  1. 02Generate the witness
  2. 03Prove
  3. 04Encode the proof
  4. 04Hash the encoding
  5. 04Free its witness and proof
  6. 04Wait in the reply queue
05Verify

The caller decodes the reply, binds it to its original request and checks the proof.

Once: direct calls, depth-24 membership, 192-core bare-metal host, median of five processes. Every request: stage timers in continuous serving on a 192-core VM, balanced depth-24 requests at 1,000 and 1,150 requests/s, three 60-second runs each, medians. The two groups are separate measurements and are not added together.

Serving path

A job starts when
a worker is free.

By default v1.2.0 no longer waits for batches. Each request is computed and freed by the worker that picked it up and returns as soon as its proof is ready; proof bytes and the verifier are unchanged.

v1.1.0

Batch loop

  1. 01Queue by kind

    Requests wait in one of three queues, one per operation kind.

  2. 02Fill a batch

    A batch leaves when it is full or when its wait expires.

  3. 03Compute together

    One batch at a time: witness, proof and encoding in parallel.

  4. 04Release on one thread

    The dispatcher hashes, writes and logs each result, then frees the whole batch.

    45.3 ms per batch
  5. 05Reply

    Replies leave in batch order, and the next batch starts after the release.

v1.2.0 default

Continuous

  1. 01Admit

    One bounded queue in arrival order. Work beyond its cap is refused with a reason.

  2. 02Start when free

    Each worker takes the oldest admitted job as soon as it finishes the last one.

  3. 03Finish on the same worker

    The worker that computed the job also hashes it and frees its memory.

    22.5–23.8 µs per job
  4. 04Return in budget

    Buffered replies are capped, so a stalled reader becomes backpressure, not memory growth.

  5. 05Reply

    Replies leave in completion order, matched to their requests by job ID.

Freeing a job's memory
233–236 µs22.5–23.8 µs
One thread for the whole batch, then the worker that computed the job.
Wait before computing starts, p99
471.7 ms0.03 ms
At 1,150 requests/s, same-day v1.1.0 against v1.2.0 continuous.
Unchanged
Proof bytes and the verifier
Existing verifiers accept the GKR proofs of v1.2.0 without any change.

192-core VMs, balanced depth-24 requests, same day. v1.1.0 figures come from its serving loop with release timers added; v1.2.0 ranges cover both of its serving modes, three 60-second runs at 1,000 and 1,150 requests/s. Timelines are schematic and do not share a time scale.

Why v1.2.0 is faster

Two changes, measured one at a time.

440 → 34 msp99 at 1,000/s, same 192-core VM and day
With the v1.1.0 prover
v1.1.0 serving loop440.2ms
v1.2.0 batch-fused233.9ms
v1.2.0 continuous75.3ms
With the v1.2.0 prover
v1.2.0 batch-fused96.0ms
v1.2.0 continuous33.8ms
  1. v1.1.0 as released440.2ms
  2. New serving path75.3ms
  3. Plus new prover33.8ms

Three 60-second runs per row at 1,000 requests per second on the same 192-core VM and day; bars are the median p99 and ticks mark each run. Rows two to five pair the v1.2.0 serving binary with the prover of either release. Every request was accepted within 1 s. The rows are measured combinations, not shares of one gain.

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. separates everything that stays the same from everything that belongs to one request.

Sparse layer reduction

No square tables.

The dense baseline builds six square tables of input pairs per layer; the sparse prover records only the gate list and never builds them. Version 1.2.0 computes the same proofs with less arithmetic.

Dense baseline6 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 has, not six square tables of input pairs. At width 4,096 that is 88.87 times less peak memory than the engine's own dense baseline on v1.2.0 (89.46 on v1.1.0), and v1.2.0 makes 93 to 94 percent fewer allocation calls per proof.

Sparse layer reductionMeasured
02

Verification skips repeated work.

Regular connections are derived from the circuit's structure instead of looked up, so the same proof verifies 10.80 to 23.68 times faster than with table wiring (measured on v1.1.0, whose verifier v1.2.0 keeps). The formal model states the equivalence.

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 with v1.2.0, per-request proving time is 7.19 to 10.13 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, each with its own witness, transcript and proof. In v1.2.0's continuous serving a worker starts the oldest waiting request as soon as it is free, so no request waits for a batch to fill.

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. 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, and rejects malformed bytes and any proof for a different request. That binding lets v1.2.0 return replies in completion order, matched by job identifier.

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.

No dependency either way
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.

No sparse-Merkle assumptions below this line

Generic proving core

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.

Plonky3 0.4.3named only by the primitives crate
Each crate builds only on crates in the rows below it. The docs list every direct dependency.

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.

, , proving speed, memory and verification, each under its own controlled conditions.