Skip to main content

BinaryPcsError

Enum BinaryPcsError 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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.

Fields

§expected: usize
§actual: usize
§

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.

Fields

§round: usize
§expected: usize
§actual: usize
§

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.

Fields

§round: usize
§query: usize
§expected: usize
§actual: usize
§

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.

Fields

§expected: usize
§actual: usize
§

MerkleFailed

A Merkle multiproof did not verify.

Fields

§round: usize
§source: MmcsError
§

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.

Fields

§round: usize
§query: usize
§

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.

Fields

§expected: usize
§actual: usize
§

OpeningClaimCountExceedsSecurityBudget

The scalar claim count exceeds the remaining alpha-batching budget.

Fields

§actual: usize
§max: usize
§security_level: usize
§

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.

Fields

§expected: usize
§actual: usize
§

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

§table_idx: usize
§expected_current: usize
§expected_next: usize
§actual_current: usize
§actual_next: usize
§

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.

Fields

§folding: usize
§

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.

Fields

§actual: usize
§

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: F

Trait Implementations§

Source§

impl<F: Debug, MmcsError: Debug> Debug for BinaryPcsError<F, MmcsError>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<F, MmcsError> Display for BinaryPcsError<F, MmcsError>
where MmcsError: Debug, F: Display,

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<F, MmcsError> Error for BinaryPcsError<F, MmcsError>
where MmcsError: Error + 'static, Self: Debug + Display,

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl<F, MmcsError> From<SumcheckError> for BinaryPcsError<F, MmcsError>

Source§

fn from(source: SumcheckError) -> Self

Converts to this type from the input type.
Source§

impl<F: Debug, E: Debug> From<TranscriptFailure<F>> for BinaryPcsError<F, E>

Source§

fn from(failure: TranscriptFailure<F>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<F, MmcsError> Freeze for BinaryPcsError<F, MmcsError>
where MmcsError: Freeze, F: Freeze,

§

impl<F, MmcsError> RefUnwindSafe for BinaryPcsError<F, MmcsError>
where MmcsError: RefUnwindSafe, F: RefUnwindSafe,

§

impl<F, MmcsError> Send for BinaryPcsError<F, MmcsError>
where MmcsError: Send, F: Send,

§

impl<F, MmcsError> Sync for BinaryPcsError<F, MmcsError>
where MmcsError: Sync, F: Sync,

§

impl<F, MmcsError> Unpin for BinaryPcsError<F, MmcsError>
where MmcsError: Unpin, F: Unpin,

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more