pub struct QueryProof<CP: CommitmentEvaluationProof> {
pub bit_distributions: Vec<BitDistribution>,
pub commitments: Vec<CP::Commitment>,
pub sumcheck_proof: SumcheckProof<CP::Scalar>,
pub pcs_proof_evaluations: Vec<CP::Scalar>,
pub evaluation_proof: CP,
}
Expand description
The proof for a query.
Note: Because the class is deserialized from untrusted data, it cannot maintain any invariant on its data members; hence, they are all public so as to allow for easy manipulation for testing.
Fields§
§bit_distributions: Vec<BitDistribution>
Bit distributions
commitments: Vec<CP::Commitment>
Commitments
sumcheck_proof: SumcheckProof<CP::Scalar>
Sumcheck Proof
pcs_proof_evaluations: Vec<CP::Scalar>
MLEs used in sumcheck except for the result columns
evaluation_proof: CP
Inner product proof of the MLEs’ evaluations
Implementations§
Source§impl<CP: CommitmentEvaluationProof> QueryProof<CP>
impl<CP: CommitmentEvaluationProof> QueryProof<CP>
Sourcepub fn new(
expr: &(impl ProofPlan + Serialize),
accessor: &impl DataAccessor<CP::Scalar>,
setup: &CP::ProverPublicSetup<'_>,
) -> (Self, ProvableQueryResult)
pub fn new( expr: &(impl ProofPlan + Serialize), accessor: &impl DataAccessor<CP::Scalar>, setup: &CP::ProverPublicSetup<'_>, ) -> (Self, ProvableQueryResult)
Create a new QueryProof
.
Sourcepub fn verify(
&self,
expr: &(impl ProofPlan + Serialize),
accessor: &impl CommitmentAccessor<CP::Commitment>,
result: &ProvableQueryResult,
setup: &CP::VerifierPublicSetup<'_>,
) -> QueryResult<CP::Scalar>
pub fn verify( &self, expr: &(impl ProofPlan + Serialize), accessor: &impl CommitmentAccessor<CP::Commitment>, result: &ProvableQueryResult, setup: &CP::VerifierPublicSetup<'_>, ) -> QueryResult<CP::Scalar>
Verify a QueryProof
. Note: This does NOT transform the result!
Trait Implementations§
Source§impl<CP: Clone + CommitmentEvaluationProof> Clone for QueryProof<CP>
impl<CP: Clone + CommitmentEvaluationProof> Clone for QueryProof<CP>
Source§fn clone(&self) -> QueryProof<CP>
fn clone(&self) -> QueryProof<CP>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de, CP> Deserialize<'de> for QueryProof<CP>where
CP: Deserialize<'de> + CommitmentEvaluationProof,
impl<'de, CP> Deserialize<'de> for QueryProof<CP>where
CP: Deserialize<'de> + CommitmentEvaluationProof,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<CP> Serialize for QueryProof<CP>where
CP: Serialize + CommitmentEvaluationProof,
impl<CP> Serialize for QueryProof<CP>where
CP: Serialize + CommitmentEvaluationProof,
Auto Trait Implementations§
impl<CP> Freeze for QueryProof<CP>where
CP: Freeze,
impl<CP> RefUnwindSafe for QueryProof<CP>where
CP: RefUnwindSafe,
<CP as CommitmentEvaluationProof>::Commitment: RefUnwindSafe,
<CP as CommitmentEvaluationProof>::Scalar: RefUnwindSafe,
impl<CP> Send for QueryProof<CP>where
CP: Send,
impl<CP> Sync for QueryProof<CP>where
CP: Sync,
impl<CP> Unpin for QueryProof<CP>where
CP: Unpin,
<CP as CommitmentEvaluationProof>::Commitment: Unpin,
<CP as CommitmentEvaluationProof>::Scalar: Unpin,
impl<CP> UnwindSafe for QueryProof<CP>where
CP: UnwindSafe,
<CP as CommitmentEvaluationProof>::Commitment: UnwindSafe,
<CP as CommitmentEvaluationProof>::Scalar: 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
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 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>
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