winter_air/lib.rs
1// Copyright (c) Facebook, Inc. and its affiliates.
2//
3// This source code is licensed under the MIT license found in the
4// LICENSE file in the root directory of this source tree.
5
6//! This crate contains components need to describe arbitrary computations in a STARK-specific
7//! format.
8//!
9//! Before we can generate proofs attesting that some computations were executed correctly, we
10//! need to describe these computations in a way that can be understood by the Winterfell prover
11//! and verifier.
12//!
13//! More formally, we need to reduce our computations to algebraic statements involving a set of
14//! bounded-degree polynomials. This step is usually called *arithmetization*. STARK arithmetization
15//! reduces computations to an *algebraic intermediate representation* or AIR for short. For basics
16//! of AIR arithmetization please refer to the excellent posts from StarkWare:
17//!
18//! * [Arithmetization I](https://medium.com/starkware/arithmetization-i-15c046390862)
19//! * [Arithmetization II](https://medium.com/starkware/arithmetization-ii-403c3b3f4355)
20//! * [StarkDEX Deep Dive: the STARK Core Engine](https://medium.com/starkware/starkdex-deep-dive-the-stark-core-engine-497942d0f0ab)
21//!
22//! Coming up with efficient arithmetizations for computations is highly non-trivial, and
23//! describing arithmetizations could be tedious and error-prone. The [Air] trait aims to help
24//! with the latter, which, hopefully, also makes the former a little simpler. For additional
25//! details, please refer to the documentation of the [Air] trait itself.
26//!
27//! This crate also contains components describing STARK protocol parameters ([ProofOptions]) and
28//! proof structure ([Proof](proof::Proof)).
29
30#![no_std]
31
32#[macro_use]
33extern crate alloc;
34
35pub mod proof;
36
37mod errors;
38pub use errors::AssertionError;
39
40mod options;
41pub use options::{BatchingMethod, FieldExtension, PartitionOptions, ProofOptions};
42
43mod air;
44pub use air::{
45 Air, AirContext, Assertion, AuxRandElements, BoundaryConstraint, BoundaryConstraintGroup,
46 BoundaryConstraints, ConstraintCompositionCoefficients, ConstraintDivisor,
47 DeepCompositionCoefficients, EvaluationFrame, TraceInfo, TransitionConstraintDegree,
48 TransitionConstraints,
49};