VAnchorCircuit

Struct VAnchorCircuit 

Source
pub struct VAnchorCircuit<F: PrimeField, H: CRH, HG: CRHGadget<H, F>, C: MerkleConfig, LHGT: CRHGadget<C::LeafH, F>, HGT: CRHGadget<C::H, F>, const K: usize, const N_INS: usize, const N_OUTS: usize, const M: usize> { /* private fields */ }

Implementations§

Source§

impl<F, H, HG, C, LHGT, HGT, const K: usize, const N_INS: usize, const N_OUTS: usize, const M: usize> VAnchorCircuit<F, H, HG, C, LHGT, HGT, K, N_INS, N_OUTS, M>
where F: PrimeField, H: CRH, HG: CRHGadget<H, F>, C: MerkleConfig, LHGT: CRHGadget<C::LeafH, F>, HGT: CRHGadget<C::H, F>,

Source

pub fn new( public_amount: F, ext_data_hash: ArbitraryInput<F>, leaf_private_inputs: Vec<LeafPrivateInputs<F>>, keypair_inputs: Vec<Keypair<F, H>>, leaf_public_input: LeafPublicInputs<F>, root_set: [F; M], hasher_params_w2: H::Parameters, hasher_params_w4: H::Parameters, hasher_params_w5: H::Parameters, paths: Vec<Path<C, K>>, indices: Vec<F>, nullifier_hash: Vec<H::Output>, output_commitment: Vec<H::Output>, out_leaf_private: Vec<LeafPrivateInputs<F>>, out_leaf_public: Vec<LeafPublicInputs<F>>, out_pubkey: Vec<F>, ) -> Self

Source

pub fn verify_input_var( hasher_params_w2_var: &HG::ParametersVar, hasher_params_w4_var: &HG::ParametersVar, hasher_params_w5_var: &HG::ParametersVar, leaf_private_var: &[LeafPrivateInputsVar<F>], inkeypair_var: &[KeypairVar<F, H, HG>], leaf_public_input_var: &LeafPublicInputsVar<F>, in_path_indices_var: &[FpVar<F>], in_path_elements_var: &[PathVar<F, C, HGT, LHGT, K>], in_nullifier_var: &[HG::OutputVar], set_gadget: &SetGadget<F>, ) -> Result<FpVar<F>, SynthesisError>

Source

pub fn verify_output_var( hasher_params_w5_var: &HG::ParametersVar, output_commitment_var: &[HG::OutputVar], leaf_private_var: &[LeafPrivateInputsVar<F>], leaf_public_var: &[LeafPublicInputsVar<F>], out_pubkey_var: &[FpVar<F>], limit_var: &FpVar<F>, ) -> Result<FpVar<F>, SynthesisError>

Source

pub fn verify_no_same_nul( in_nullifier_var: &[HG::OutputVar], ) -> Result<(), SynthesisError>

Source

pub fn verify_input_invariant( public_amount_var: &FpVar<F>, sum_ins_var: &FpVar<F>, sum_outs_var: &FpVar<F>, ) -> Result<(), SynthesisError>

Trait Implementations§

Source§

impl<F, H, HG, C, LHGT, HGT, const K: usize, const N_INS: usize, const N_OUTS: usize, const M: usize> Clone for VAnchorCircuit<F, H, HG, C, LHGT, HGT, K, N_INS, N_OUTS, M>
where F: PrimeField, H: CRH, HG: CRHGadget<H, F>, C: MerkleConfig, LHGT: CRHGadget<C::LeafH, F>, HGT: CRHGadget<C::H, F>,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<F, H, HG, C, LHGT, HGT, const K: usize, const N_INS: usize, const N_OUTS: usize, const M: usize> ConstraintSynthesizer<F> for VAnchorCircuit<F, H, HG, C, LHGT, HGT, K, N_INS, N_OUTS, M>
where F: PrimeField, H: CRH, HG: CRHGadget<H, F>, C: MerkleConfig, LHGT: CRHGadget<C::LeafH, F>, HGT: CRHGadget<C::H, F>,

Source§

fn generate_constraints( self, cs: ConstraintSystemRef<F>, ) -> Result<(), SynthesisError>

Drives generation of new constraints inside cs.

Auto Trait Implementations§

§

impl<F, H, HG, C, LHGT, HGT, const K: usize, const N_INS: usize, const N_OUTS: usize, const M: usize> Freeze for VAnchorCircuit<F, H, HG, C, LHGT, HGT, K, N_INS, N_OUTS, M>
where F: Freeze, <H as CRH>::Parameters: Freeze,

§

impl<F, H, HG, C, LHGT, HGT, const K: usize, const N_INS: usize, const N_OUTS: usize, const M: usize> RefUnwindSafe for VAnchorCircuit<F, H, HG, C, LHGT, HGT, K, N_INS, N_OUTS, M>

§

impl<F, H, HG, C, LHGT, HGT, const K: usize, const N_INS: usize, const N_OUTS: usize, const M: usize> !Send for VAnchorCircuit<F, H, HG, C, LHGT, HGT, K, N_INS, N_OUTS, M>

§

impl<F, H, HG, C, LHGT, HGT, const K: usize, const N_INS: usize, const N_OUTS: usize, const M: usize> !Sync for VAnchorCircuit<F, H, HG, C, LHGT, HGT, K, N_INS, N_OUTS, M>

§

impl<F, H, HG, C, LHGT, HGT, const K: usize, const N_INS: usize, const N_OUTS: usize, const M: usize> Unpin for VAnchorCircuit<F, H, HG, C, LHGT, HGT, K, N_INS, N_OUTS, M>
where F: Unpin, <H as CRH>::Parameters: Unpin, H: Unpin, HG: Unpin, LHGT: Unpin, HGT: Unpin, C: Unpin, <H as CRH>::Output: Unpin, <<C as Config>::LeafH as CRH>::Output: Unpin, <<C as Config>::H as CRH>::Output: Unpin,

§

impl<F, H, HG, C, LHGT, HGT, const K: usize, const N_INS: usize, const N_OUTS: usize, const M: usize> UnwindSafe for VAnchorCircuit<F, H, HG, C, LHGT, HGT, K, N_INS, N_OUTS, M>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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