Crate winter_prover

source ·
Expand description

This crate contains Winterfell STARK prover.

This prover can be used to generate proofs of computational integrity using the STARK (Scalable Transparent ARguments of Knowledge) protocol.

When the crate is compiled with concurrent feature enabled, proof generation will be performed in multiple threads (usually, as many threads as there are logical cores on the machine). The number of threads can be configured via RAYON_NUM_THREADS environment variable.

§Usage

To generate a proof that a computation was executed correctly, you’ll need to do the following:

  1. Define an algebraic intermediate representation (AIR) for your computation. This can be done by implementing Air trait.
  2. Define an execution trace for your computation. This can be done by implementing Trace trait. Alternatively, you can use TraceTable struct which already implements Trace trait in cases when this generic implementation works for your use case.
  3. Execute your computation and record its execution trace.
  4. Define your prover by implementing Prover trait. Then execute Prover::prove() function passing the trace generated in the previous step into it as a parameter. The function will return a instance of StarkProof.

This StarkProof can be serialized and sent to a STARK verifier for verification. The size of proof depends on the specifics of a given computation, but for most computations it should be in the range between 15 KB (for very small computations) and 300 KB (for very large computations).

Proof generation time is also highly dependent on the specifics of a given computation, but also depends on the capabilities of the machine used to generate the proofs (i.e. on number of CPU cores and memory bandwidth).

Re-exports§

Modules§

  • Components needed for parallel iterators.
  • Two-dimensional data structures used to represent polynomials and polynomial evaluations.
  • Contains STARK proof struct and associated components.

Structs§

Enums§

  • Defines errors which can occur during deserialization.
  • Defines an extension field for the composition polynomial.
  • Represents an error returned by the prover during an execution of the protocol.

Traits§

  • Describes algebraic intermediate representation of a computation.
  • Defines how primitive values are to be read from Self.
  • Defines how primitive values are to be written into Self.
  • Contains logic for evaluating AIR constraints over an extended execution trace.
  • Defines how to deserialize Self from bytes.
  • Defines a STARK prover for a computation.
  • Defines how to serialize Self into bytes.
  • Defines an execution trace of a computation.
  • Contains all segments of the extended execution trace and their commitments.