proof_of_sql::sql::proof_plans

Enum DynProofPlan

source
pub enum DynProofPlan<C: Commitment> {
    Projection(ProjectionExec<C>),
    GroupBy(GroupByExec<C>),
    Filter(OstensibleFilterExec<C, HonestProver>),
}
Expand description

The query plan for proving a query

Variants§

§

Projection(ProjectionExec<C>)

Provable expressions for queries of the form

    SELECT <result_expr1>, ..., <result_exprN> FROM <table>
§

GroupBy(GroupByExec<C>)

Provable expressions for queries of the form

    SELECT <group_by_expr1>, ..., <group_by_exprM>,
        SUM(<sum_expr1>.0) as <sum_expr1>.1, ..., SUM(<sum_exprN>.0) as <sum_exprN>.1,
        COUNT(*) as count_alias
    FROM <table>
    WHERE <where_clause>
    GROUP BY <group_by_expr1>, ..., <group_by_exprM>
§

Filter(OstensibleFilterExec<C, HonestProver>)

Provable expressions for queries of the form, where the result is sent in a dense form

    SELECT <result_expr1>, ..., <result_exprN> FROM <table> WHERE <where_clause>

Trait Implementations§

source§

impl<C: Debug + Commitment> Debug for DynProofPlan<C>

source§

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

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

impl<'de, C> Deserialize<'de> for DynProofPlan<C>
where C: Deserialize<'de> + Commitment,

source§

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<C: PartialEq + Commitment> PartialEq for DynProofPlan<C>

source§

fn eq(&self, other: &DynProofPlan<C>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<C: Commitment> ProofPlan<C> for DynProofPlan<C>

source§

fn count( &self, builder: &mut CountBuilder<'_>, accessor: &dyn MetadataAccessor, ) -> Result<(), ProofError>

Count terms used within the Query’s proof
source§

fn get_length(&self, accessor: &dyn MetadataAccessor) -> usize

The length of the input table
source§

fn get_offset(&self, accessor: &dyn MetadataAccessor) -> usize

The offset of the query, that is, how many rows to skip before starting to read the input table
source§

fn verifier_evaluate( &self, builder: &mut VerificationBuilder<'_, C>, accessor: &dyn CommitmentAccessor<C>, result: Option<&OwnedTable<C::Scalar>>, ) -> Result<Vec<C::Scalar>, ProofError>

Form components needed to verify and proof store into VerificationBuilder
source§

fn get_column_result_fields(&self) -> Vec<ColumnField>

Return all the result column fields
source§

fn get_column_references( &self, ) -> IndexSet<ColumnRef, BuildHasherDefault<AHasher>>

Return all the columns referenced in the Query
source§

fn is_empty(&self, accessor: &dyn MetadataAccessor) -> bool

Check if the input table is empty
source§

impl<C> Serialize for DynProofPlan<C>
where C: Serialize + Commitment,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<C: Commitment> StructuralPartialEq for DynProofPlan<C>

Auto Trait Implementations§

§

impl<C> Freeze for DynProofPlan<C>
where <C as Commitment>::Scalar: Freeze,

§

impl<C> RefUnwindSafe for DynProofPlan<C>

§

impl<C> Send for DynProofPlan<C>

§

impl<C> Sync for DynProofPlan<C>

§

impl<C> Unpin for DynProofPlan<C>
where C: Unpin, <C as Commitment>::Scalar: Unpin,

§

impl<C> UnwindSafe for DynProofPlan<C>

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> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

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

source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

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
source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,