#[non_exhaustive]pub enum BinaryPcsError<F, MmcsError> {
Show 18 variants
RoundCountMismatch {
expected: usize,
actual: usize,
},
OpeningCountMismatch {
round: usize,
expected: usize,
actual: usize,
},
RowWidthMismatch {
round: usize,
query: usize,
expected: usize,
actual: usize,
},
FinalCodewordLengthMismatch {
expected: usize,
actual: usize,
},
MerkleFailed {
round: usize,
source: MmcsError,
},
FoldMismatch {
round: usize,
query: usize,
},
FinalCheck,
InvalidPowWitness,
OpeningBatchCountMismatch {
expected: usize,
actual: usize,
},
OpeningClaimCountExceedsSecurityBudget {
actual: usize,
max: usize,
security_level: usize,
},
InvalidOpeningProtocol,
OpeningPointShapeMismatch,
OpeningEvalCountMismatch {
expected: usize,
actual: usize,
},
OpeningBatchSizeMismatch {
table_idx: usize,
expected_current: usize,
expected_next: usize,
actual_current: usize,
actual_next: usize,
},
OpeningPreprocessingDepth {
folding: usize,
},
Sumcheck(SumcheckError),
NonEmptyPowWitnesses {
actual: usize,
},
NonCanonicalPowWitness {
actual: F,
},
}Expand description
Why an opening proof was rejected.
Derives thiserror::Error and Debug only — not PartialEq/Eq. p3_commit::Mmcs
carries no such bound on Error for a general MMCS (commit/src/mmcs.rs), so the derive
cannot apply here.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RoundCountMismatch
The proof carries a different number of intermediate folding rounds than the config derives.
Checked before any indexing into rounds, so a malformed proof is rejected rather
than desyncing the round loop that walks it.
OpeningCountMismatch
A round opened a different number of rows than the sampled query count demands.
Checked before any indexing into the opened rows, so a short or padded opening list is rejected instead of being read out of bounds or silently truncated.
RowWidthMismatch
An opened row had the wrong width.
Every committed round holds a width-1 codeword; a row of any other width would desync the fold if it were read as-is rather than rejected up front.
FinalCodewordLengthMismatch
The final codeword’s length disagrees with the fold schedule.
Checked before any query reads from it, so an under- or over-sized final codeword is rejected instead of being indexed out of bounds.
MerkleFailed
A Merkle multiproof did not verify.
FoldMismatch
Folding the queried pair at one round does not reproduce the value read at the next round (or, at the last round, in the final codeword).
This is what ties every committed round to its neighbours; without it, a prover could commit to codewords with no relation to one another at all.
FinalCheck
The final codeword does not encode the value the sumcheck ended at.
InvalidPowWitness
The grinding witness did not meet the demanded difficulty.
OpeningBatchCountMismatch
The proof carries a different number of opening-protocol evaluation batches than the public protocol schedules.
Checked before any claim is registered, so a malformed proof is rejected before it can desync the transcript one claim at a time.
OpeningClaimCountExceedsSecurityBudget
The scalar claim count exceeds the remaining alpha-batching budget.
InvalidOpeningProtocol
The table dimensions do not fit the configured stacked polynomial.
OpeningPointShapeMismatch
Prescribed points must match the batches and their table arities.
OpeningEvalCountMismatch
Supplied evaluations must cover every batch the protocol schedules.
Reported apart from the points, which the same protocol also prescribes, so a caller that got one of the two lists wrong learns which.
OpeningBatchSizeMismatch
One opening batch has the wrong number of evaluations for its column list.
A batch’s shape is the pair of side lengths, not their total, so the two sides are reported apart: a request and a list that agree on the total can still disagree here.
Fields
OpeningPreprocessingDepth
The committed layout runs preprocessing rounds the opening pipeline does not lay out.
The commit phase lays out a single committed column, so no round has a per-round residual to read. Checked before any transcript operation, like every other shape check here, so a layout the pipeline cannot open leaves the challenger alone.
Sumcheck(SumcheckError)
The sumcheck transcript did not verify.
NonEmptyPowWitnesses
The proof’s sumcheck data carries PoW witnesses.
Every fold round runs at pow_bits = 0 (see prover::fold_rounds_with), and the verifier
replays each round with a freshly built, always-empty pow_witnesses vector, so
whatever the proof carries here is read by nothing and bound to nothing: a third party
could mutate it and keep a valid proof. p3_sumcheck::ring_switch rejects a non-empty
pow_witnesses for the same reason.
NonCanonicalPowWitness
The grinding witness is not the value a zero difficulty budget admits.
Checked before any transcript operation, like every other proof-shape check here.
Fields
actual: FTrait Implementations§
Source§impl<F, MmcsError> Display for BinaryPcsError<F, MmcsError>
impl<F, MmcsError> Display for BinaryPcsError<F, MmcsError>
Source§impl<F, MmcsError> Error for BinaryPcsError<F, MmcsError>
impl<F, MmcsError> Error for BinaryPcsError<F, MmcsError>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl<F, MmcsError> From<SumcheckError> for BinaryPcsError<F, MmcsError>
impl<F, MmcsError> From<SumcheckError> for BinaryPcsError<F, MmcsError>
Source§fn from(source: SumcheckError) -> Self
fn from(source: SumcheckError) -> Self
Source§impl<F: Debug, E: Debug> From<TranscriptFailure<F>> for BinaryPcsError<F, E>
impl<F: Debug, E: Debug> From<TranscriptFailure<F>> for BinaryPcsError<F, E>
Source§fn from(failure: TranscriptFailure<F>) -> Self
fn from(failure: TranscriptFailure<F>) -> Self
Auto Trait Implementations§
impl<F, MmcsError> Freeze for BinaryPcsError<F, MmcsError>
impl<F, MmcsError> RefUnwindSafe for BinaryPcsError<F, MmcsError>where
MmcsError: RefUnwindSafe,
F: RefUnwindSafe,
impl<F, MmcsError> Send for BinaryPcsError<F, MmcsError>
impl<F, MmcsError> Sync for BinaryPcsError<F, MmcsError>
impl<F, MmcsError> Unpin for BinaryPcsError<F, MmcsError>
impl<F, MmcsError> UnsafeUnpin for BinaryPcsError<F, MmcsError>where
MmcsError: UnsafeUnpin,
F: UnsafeUnpin,
impl<F, MmcsError> UnwindSafe for BinaryPcsError<F, MmcsError>where
MmcsError: UnwindSafe,
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more