Skip to main content

CtProver

Struct CtProver 

Source
pub struct CtProver { /* private fields */ }

Implementations§

Source§

impl CtProver

Source

pub fn new() -> Self

Source

pub fn prove( &self, witness: &CtWitness, ) -> Result<(Vec<u8>, CtPublicInputs), String>

Generate a STARK proof for a confidential transfer. Returns (proof_bytes, public_inputs).

Trait Implementations§

Source§

impl Prover for CtProver

Source§

type BaseField = BaseElement

Base field for the computation described by this prover.
Source§

type Air = CtAir

Algebraic intermediate representation (AIR) for the computation described by this prover.
Source§

type Trace = TraceTable<BaseElement>

Execution trace of the computation described by this prover.
Source§

type HashFn = Rp64_256

Hash function to be used.
Source§

type VC = MerkleTree<Rp64_256>

Vector commitment scheme to be used.
Source§

type RandomCoin = DefaultRandomCoin<Rp64_256>

PRNG to be used for generating random field elements.
Source§

type TraceLde<E: FieldElement<BaseField = BaseElement>> = DefaultTraceLde<E, Rp64_256, MerkleTree<Rp64_256>>

Trace low-degree extension for building the LDEs of trace segments and their commitments.
Source§

type ConstraintEvaluator<'a, E: FieldElement<BaseField = BaseElement>> = DefaultConstraintEvaluator<'a, CtAir, E>

Constraints evaluator used to evaluate AIR constraints over the extended execution trace.
Source§

type ConstraintCommitment<E: FieldElement<BaseField = BaseElement>> = DefaultConstraintCommitment<E, Rp64_256, MerkleTree<Rp64_256>>

Constraint low-degree extension for building the LDEs of composition polynomial columns and their commitments.
Source§

fn get_pub_inputs(&self, trace: &Self::Trace) -> CtPublicInputs

Returns a set of public inputs for an instance of the computation defined by the provided trace. Read more
Source§

fn options(&self) -> &ProofOptions

Returns ProofOptions which this prover uses to generate STARK proofs. Read more
Source§

fn new_trace_lde<E: FieldElement<BaseField = BaseElement>>( &self, trace_info: &TraceInfo, main_trace: &ColMatrix<BaseElement>, domain: &StarkDomain<BaseElement>, partition_option: PartitionOptions, ) -> (Self::TraceLde<E>, TracePolyTable<E>)

Takes the main trace segment columns as input, interpolates them into polynomials in coefficient form, and evaluates the polynomials over the LDE domain. Read more
Source§

fn new_evaluator<'a, E: FieldElement<BaseField = BaseElement>>( &self, air: &'a Self::Air, aux_rand_elements: Option<AuxRandElements<E>>, composition_coefficients: ConstraintCompositionCoefficients<E>, ) -> Self::ConstraintEvaluator<'a, E>

Returns a new constraint evaluator which can be used to evaluate transition and boundary constraints over the extended execution trace.
Source§

fn build_constraint_commitment<E: FieldElement<BaseField = BaseElement>>( &self, composition_poly_trace: CompositionPolyTrace<E>, num_constraint_composition_columns: usize, domain: &StarkDomain<BaseElement>, partition_options: PartitionOptions, ) -> (Self::ConstraintCommitment<E>, CompositionPoly<E>)

Extends constraint composition polynomial over the LDE domain and builds a commitment to its evaluations. Read more
Source§

fn build_aux_trace<E>( &self, main_trace: &Self::Trace, aux_rand_elements: &AuxRandElements<E>, ) -> ColMatrix<E>
where E: FieldElement<BaseField = Self::BaseField>,

Builds and returns the auxiliary trace.
Source§

fn prove(&self, trace: Self::Trace) -> Result<Proof, ProverError>
where <Self::Air as Air>::PublicInputs: Send,

Returns a STARK proof attesting to a correct execution of a computation defined by the provided trace. Read more

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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