Struct proof_of_sql::sql::proof::QueryProof   
source · 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: CPInner product proof of the MLEs’ evaluations
Implementations§
source§impl<CP: CommitmentEvaluationProof> QueryProof<CP>
 
impl<CP: CommitmentEvaluationProof> QueryProof<CP>
sourcepub fn new(
    expr: &(impl ProofPlan<CP::Commitment> + Serialize),
    accessor: &impl DataAccessor<CP::Scalar>,
    setup: &CP::ProverPublicSetup<'_>,
) -> (Self, ProvableQueryResult)
 
pub fn new( expr: &(impl ProofPlan<CP::Commitment> + Serialize), accessor: &impl DataAccessor<CP::Scalar>, setup: &CP::ProverPublicSetup<'_>, ) -> (Self, ProvableQueryResult)
Create a new QueryProof.
sourcepub fn verify(
    &self,
    expr: &(impl ProofPlan<CP::Commitment> + Serialize),
    accessor: &impl CommitmentAccessor<CP::Commitment>,
    result: &ProvableQueryResult,
    setup: &CP::VerifierPublicSetup<'_>,
) -> QueryResult<CP::Scalar>
 
pub fn verify( &self, expr: &(impl ProofPlan<CP::Commitment> + 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