Skip to main content

Crate p3_uni_stark

Crate p3_uni_stark 

Source
Expand description

§p3-uni-stark

A minimal univariate STARK framework: proving and verification of a single AIR over a two-adic field, generic over the polynomial commitment scheme.

Key items:

  • prove / verify (and *_with_preprocessed variants) — the prover and verifier entry points
  • StarkConfig / StarkGenericConfig — ties together field, PCS and challenger
  • SymbolicAirBuilder — symbolic constraint evaluation for degree inference
  • Proof, VerificationError — proof object and typed verifier errors

The verifier is designed to reject malformed proofs with a typed error, but panics on adversarial inputs are not yet ruled out; see the repository README’s known-issues section.

Part of Plonky3, dual-licensed under MIT and Apache 2.0.

Structs§

AirLayout
Describes the shape of an AIR for symbolic constraint evaluation.
Commitments
ConjecturedSecurity
Conjectured security level (in bits) using the “random words” regime of 2025/2010 §1.5.
ConstraintLayout
Maps between global constraint indices and the separated base/ext streams.
GrindingSites
Where a STARK grinds, in bits per site.
LegacySecurity
Historical security estimate using the pre-random-words ethSTARK FRI query formula: num_queries * log_blowup + query_pow_bits.
OpenedValues
Every committed polynomial evaluated at the out-of-domain point.
PreprocessedOpenedValues
The preprocessed trace evaluated at the out-of-domain point.
PreprocessedProverData
Prover-side reusable data for preprocessed columns.
PreprocessedVerifierKey
Verifier-side reusable data for preprocessed columns.
Proof
ProvenSecurity
Proven security level (in bits) of a STARK configuration.
ProverConstraintFolder
Packed constraint folder for SIMD-optimized prover evaluation.
StarkConfig
StarkOpeningLayout
Commitment positions in the univariate STARK opening batch.
StarkProverTranscript
Prover-side transcript of one uni-STARK run.
StarkSecurityParams
Parameters required to compute STARK proof security level.
StarkShape
Numbers that fix the transcript of one uni-STARK run.
StarkVerifierTranscript
Verifier-side transcript of one uni-STARK run.
SubAirBuilder
Evaluates a sub-AIR against a restricted slice of the parent trace.
SubSliced
A column-restricted view over a trace window.
SymbolicAirBuilder
Symbolic AIR builder that records constraints.
SymbolicVariable
A variable within the evaluation window for base-field columns.
SymbolicVariableExt
A variable within the evaluation window for extension-field columns.
VectorizedConstraintFolder
Packed constraint folder evaluating N packed vectors per constraint in lockstep.
VerifierConstraintFolder
Handles constraint verification for the verifier in a STARK system.

Enums§

BaseEntry
Entry kinds for base-field trace columns and public inputs.
BaseLeaf
Leaf nodes for base-field symbolic expressions.
ExtEntry
Entry kinds for extension-field columns (permutation trace, challenges, and permutation values).
ExtLeaf
Leaf nodes for extension-field symbolic expressions.
InvalidProofShapeError
Specific reasons why a proof’s shape is invalid.
OpeningShape
What the polynomial commitment scheme commits beyond what the AIR itself determines.
PeriodicColumnShapeError
Why a declared periodic column cannot be laid over a trace of a given height.
ProvingError
A recoverable PCS configuration or budget failure during proof generation.
StarkTranscriptFailure
A transcript step the proof failed to satisfy.
SymbolicExpr
A symbolic expression tree, generic over its leaf type A.
VerificationError
Top-level verification error.

Traits§

QuotientAir
AIRs usable with quotient_values and the functions built on it.
StarkGenericConfig
SymLeaf
Properties that leaf nodes must provide for the generic expression tree.

Functions§

constraint_degree_from_poly_degree
Convert an absolute constraint-polynomial degree into the “constraint degree” used to size the quotient: the number of degree-(trace_len - 1) trace polynomials the constraint behaves like.
get_all_symbolic_constraints
get_constraint_layout
Evaluate the AIR symbolically and return the constraint layout.
get_log_num_quotient_chunks
Two-adic quotient sizing; use get_log_num_quotient_chunks_for_domain for other domains.
get_log_num_quotient_chunks_for_domain
Size the quotient using the trace domain’s transition-selector degree.
get_log_quotient_degree_extension
Two-adic quotient sizing, including extension constraints.
get_max_constraint_degree
get_max_constraint_degree_extension
get_symbolic_constraints
get_symbolic_constraints_extension
num_batched_openings
Number of batching powers consumed by the polynomial commitment scheme’s random linear combination into its single low-degree-test instance.
prove
Prove a trace, returning the PCS failure with its proving phase.
prove_with_preprocessed
Prove with reusable preprocessing, returning the PCS failure with its proving phase. No partial proof is emitted on a configuration or disclosure-budget error.
quotient_values
recompose_quotient_from_chunks
Recomposes the quotient polynomial from its chunks evaluated at a point.
setup_preprocessed
Set up and commit the preprocessed trace for a given Air and degree.
validate_degree_bits
verify
verify_constraints
Verifies that the folded constraints match the quotient polynomial at zeta.
verify_with_preprocessed

Type Aliases§

Com
Domain
PackedChallenge
PackedVal
PcsError
PcsProverError
Configuration or budget failure reported by the proving commitment scheme.
SymbolicExpression
A symbolic expression tree for base-field AIR constraints.
SymbolicExpressionExt
A symbolic expression tree for extension-field AIR constraints.
Val
VectorizedChallenge
Vectorized extension-field expression type used by VectorizedConstraintFolder.
VectorizedVal
Vectorized base-field expression type used by VectorizedConstraintFolder: N packed vectors evaluated in lockstep.