Get started

Introduction

StateSync-GKR is a GKR and sumcheck proof engine in Rust, built for state synchronization and machine-checked from state semantics to verification. Start here to see what it does, who it is for and how these docs are organized.

StateSync-GKR is a Rust implementation of the protocol and multilinear , developed by Oraclizer Labs. It was built for state synchronization, where one system has to prove to another that a record is present, absent or correctly changed, and its name comes from that origin. Its compiles those state operations into layered arithmetic circuits, so you can prove and verify that an authenticated state tree contains a record, does not contain a record, or changed one leaf from an to a new root. The protocol and sumcheck layers do not depend on that frontend, so the same engine can prove other computations written as .

The path from state semantics to GKR verification is machine-checked in , and a connects the shipped Rust verifier to that model under stated conditions. Formal verification explains what is proved and what is not.

What you can do with it#

TaskEntry pointGuide
Prove and verify membership, non-membership or a single-leaf updateStateSyncProver with a SyncRequestProving state operations
Prepare a circuit once and reuse it for every request of the same kindprepare, prove_sync_op_prepared, verify_sync_op_preparedPrepared execution
Run independent proof jobs across CPU cores, one proof per jobmake_job_prepared, prove_batch_parallelBatching and parallelism
Send a proof to another process and verify the received bytesencode_sync_result, verify_encoded_sync_opEncoding and transport
Run a proof service with bounded admission, framed replies and continuous workersThe ssgkr-serving crate and its in benches/servingServing components
Build a frontend for a different arithmetic circuitThe sumcheck and gkr modulesCustom frontends
Check a supplied sparse-Merkle path without creating a GKR proofcompiler::smt_valid_nativeAPI reference

In separate controlled comparisons against its own internal references, StateSync-GKR used about 89 times less peak process memory on a generic two-layer test circuit (89.46 times on v1.1.0, 88.87 on v1.2.0) and verified the same proof up to 23.68 times faster with derived instead of (measured on v1.1.0; v1.2.0 keeps the same verifier). Version 1.2.0 produces the same proof bytes and serves more: on one 192-core server its reference server accepted 3,300 requests per second with every request within one second over one connection, against 1,150 for v1.1.0 measured on the same day, and its at 1,000 requests per second was 33.7–33.9 ms against 433.8–475.1 ms. Each figure has its own reference, workload and timer boundary. See Benchmark results and Serving capacity before you reuse a number.

Who it is for#

  • Blockchain and infrastructure developers who need to prove or verify the contents of a and single-leaf changes to it.
  • Engineers who want a reusable GKR and sumcheck core for their own circuit frontend.
  • Reviewers, auditors and researchers who need to see what is machine-checked, what is measured and what is assumed.

Version and status#

  • Docs version line: 1.2. These pages describe the 1.2 component line.
  • Current version: 1.2.1. It keeps the code of 1.2.0, which computes the same proofs with less prover arithmetic, adds serving components with a reference server and refuses two misuses in every build profile, and it attaches an of the 1.2 program. Release history is in the changelog.
  • Packages: The Cargo packages carry version 0.1.0-dev and are not published to crates.io. Integrate by pinning an exact source revision. See Versioning.
  • License: The current official distribution is licensed under the 1.1. Non-production use, such as research, development and testing, is free. Production use that generates proofs, embeds or redistributes the proving functionality in a product or service, or offers proof generation to third parties requires a ; production use solely to verify proofs stays free. See Licensing.
  • Formal verification: The compiler and protocol models are machine-checked in Isabelle/HOL, and a refinement theorem connects the shipped Rust verifier to them under stated conditions. See Formal verification, and read Trust boundaries before you deploy.

Fastest path to a first proof#

  1. Install the pinned Rust toolchain: Installation.
  2. Run the bundled example: Quickstart.
  3. Build requests from your own state: Proving state operations.
  4. Reuse for repeated requests: Prepared execution.

The Quickstart example builds one synthetic membership request, proves it, verifies the honest proof and checks that a tampered copy is rejected. A successful run prints:

Text
honest-proof=PASS
tampered-proof=REJECTED
secondary-finalized=false

The last line records that the local example makes no finality claim on any destination chain.

How these docs are organized#

SectionWhat it coversPages
Get startedToolchain setup, a first proof and the repository layoutInstallation, Quickstart, Project layout
ConceptsHow GKR reduces a circuit, how sparse-Merkle state is represented, how circuits are layered and how a proof moves from request to acceptanceHow GKR works, Sparse-Merkle state, Circuits and layers, Proof lifecycle
GuidesTask-oriented instructions for proving, reuse, parallel jobs, transport, custom frontends, integration, serving, tuning and diagnosisProving state operations, Prepared execution, Batching and parallelism, Encoding and transport, Custom frontends, Production integration, Serving components, Performance tuning, Troubleshooting
BenchmarksMeasured serving, proving, memory, verification and results, and how they were measuredResults, Serving capacity, Methodology
Security and assuranceWhat the component checks and assumes, what the formal proofs cover and how to report a vulnerabilityTrust boundaries, Formal verification, Security policy
ReferencePublic API, configuration values, the encoded proof format and error typesAPI, Configuration, Wire format, Errors
ResourcesTerm definitions, common questions, release history, version numbers, license terms and citationGlossary, FAQ, Changelog, Versioning, Licensing, Citing

Get help#