Skip to main content

Corset

Corset is part of the LinethLineth (Formerly the Linea Stack) The open-source ZK-rollup stack, codebase, and technical protocol that's the foundation of Linea Mainnet. Operators can deploy this stack to launch their own Ethereum-compatible L2 or L3 networks. prover. It performs the first stage of the proving system: it compiles Lineth's zkEVMzkEVM A virtual machine that executes smart contracts and proves the correctness of execution using zero-knowledge proofs. zkEVMs recreate aspects of Ethereum's design, which provides an "Ethereum-like" experience for developers and users. rules into a constraint system, and prepares each batch's execution traces so the prover can check them against that system.

A constraint system is a set of rules that a computation must satisfy. Proving in zero knowledge means showing that some data satisfies every rule in the system, without revealing the data itself.

How it works​

Corset runs at two different times.

At build time, it compiles Lineth's arithmetization: the constraint definitions, written in a Lisp domain-specific language, that describe what correct zkEVM execution looks like. The compiled constraint system is bundled into the prover, so a change to the arithmetization reaches the prover as a new build rather than at runtime.

At runtime, it expands the conflatedConflation The process of combining two or more blocks' worth of transactions into one data set before proof generation. Conflation lets Lineth produce one Merkle tree update and one zero-knowledge proof per batch instead of per block, which makes the proving system more efficient. The coordinator decides where batch boundaries fall, using trace counts from the tracer, and the trace data itself is generated inside the execution client. traces that the tracerTracer The Linea Besu plugin, part of the sequencer, that generates the execution traces the prover needs to create zero-knowledge proofs. The tracer provides trace counts for batch-size calculations and produces conflated trace files as prover input. produced for a batch. Trace expansion derives the columns the constraint system checks from the columns the tracer recorded, producing the complete data set, or witness, that the prover proves against.

See also​

  • See gnark for the second stage of the proving system, where the witness is turned into a proof.
  • See Module limits for the per-module trace line limits that keep an expanded trace within what the prover can handle.
  • See the go-corset source code, and Lineth's constraint definitions in the lineth-monorepo.

Was this page helpful?