Expand description
§p3-commit
A framework for cryptographic commitment schemes, including non-hiding variants. This crate defines the traits that connect proof systems to their commitment backends.
Key items:
Pcs/MultilinearPcs— polynomial commitment scheme interfaces used by the STARK provers and verifiersMmcs— “Mixed Matrix Commitment Scheme”, a vector-commitment abstraction over batches of matrices of differing heightsPolynomialSpaceandTwoAdicMultiplicativeCoset— evaluation-domain abstractionsperiodic— periodic-column evaluation helperstesting(the opt-intest-utilsfeature) — mock instantiations and shared PCS contract checks for downstream tests
Implementations live in p3-merkle-tree (Mmcs), p3-fri, p3-circle and
p3-whir (Pcs).
testing::assert_pcs_opening_contract exercises real transparent backends with
caller-supplied matrices and independently computed expected values. It checks
batched opening order, honest verification, transcript agreement, and rejection
of swapped point fields, modified values and missing matrix/column claims. Fixtures
must include a multi-matrix commitment and point-dependent expected values. FRI,
Circle, and STIR use this helper alongside their backend-specific tests.
Part of Plonky3, dual-licensed under MIT and Apache 2.0.
§Univariate PCS API migration
Pcs covers domains, commitments, prover data, and opening/verification. Implementers
that serve univariate STARKs also implement UnivariateStarkPcs: move
EvaluationsOnDomain, ZK, LDE/evaluation/quotient/periodic helpers and preprocessing
adaptation to that implementation. Generic commitment clients can continue to bound
only Pcs; STARK configurations require UnivariateStarkPcs. Import both traits when
calling both sets of methods, and change qualified references to moved members to
UnivariateStarkPcs. MultilinearPcs is unchanged.
Opening batches now use named requests and claims:
let requests = vec![OpeningRequest {
prover_data: &data,
points: vec![vec![zeta]], // one point vector per committed matrix
}];
let claims = vec![CommitmentOpening {
commitment,
matrices: vec![MatrixOpening {
domain,
points: vec![PointOpening { point: zeta, values }],
}],
}];Requests borrow prover data and own their point vectors. Claims own commitments,
matrices and column values, as before. All ordering remains significant: requests,
matrices, points and columns are used in caller order. The existing
CommitmentWithOpeningPoints name aliases CommitmentOpening. Explicit From
conversions accept the former tuples, including nested matrix/point claims, so a
caller can migrate a batch with old_batch.into_iter().map(Into::into).collect().
The FRI ProverDataWithOpeningPoints alias likewise names OpeningRequest.
PCS traits no longer define trace, quotient or preprocessing commitment indices.
Univariate STARK owns these positions in p3_uni_stark::StarkOpeningLayout.
open_with_preprocessing now takes Option<usize> identifying the preprocessing
commitment request, replacing the old boolean. Use None for no preprocessing;
STARK callers pass Some(layout.preprocessed) when it is present. Other clients may
place preprocessing at any commitment index.
This is a Rust API change only; commitment/proof serialization, transcript absorption order and evaluation-view ownership remain unchanged. No version bump is included.
Structs§
- Batch
Opening - A Batched opening proof.
- Batch
Opening Ref - A reference to a batched opening proof.
- Commitment
Opening - A joint commitment to a collection of matrices and their opening at a collection of points.
- Extension
Mmcs - A wrapper to lift an MMCS from a base field
Fto an extension fieldEF. - Lagrange
Selectors - Given a
PolynomialSpace,S, and a subsetR, a Lagrange selectorP_Ris a polynomial which is not equal to0for every element inRbut is equal to0for every element ofSnot inR. - Matrix
Opening - Opening points and claimed column evaluations for one matrix.
- Opening
Request - Points to open for each matrix in one commitment.
- Periodic
Columns - Periodic columns screened against the rows they have to cover.
- Periodic
LdeTable - Compact storage for periodic column values on the LDE domain.
- Point
Opening - Claimed evaluations of every column at one point, in column order.
Enums§
- Periodic
Column Shape Error - Why a declared periodic column cannot be laid over a trace of a given height.
Traits§
- Encoder
- A linear code applied to every column of a matrix.
- Mmcs
- A “Mixed Matrix Commitment Scheme” (MMCS) is a generalization of a vector commitment scheme.
- Multilinear
Pcs - Polynomial commitment scheme for multilinear polynomials over the Boolean hypercube.
- Pcs
- A polynomial commitment scheme, for committing to batches of polynomials defined by their evaluations over some domain.
- Periodic
Evaluator - Evaluates periodic polynomials for a given domain system.
- Polynomial
Space - Fixing a field,
F,PolynomialSpace<Val = F>denotes an indexed subset ofF^nwith some additional algebraic structure. - Univariate
Stark Pcs - Capabilities used by univariate STARK provers and verifiers.
Type Aliases§
- Commitment
With Opening Points - Compatibility name for the named verification claim.
- Opened
Values - Opened
Values ForMatrix - Opened
Values ForPoint - Opened
Values ForRound - Val