Struct PedersenHashTree

Source
pub struct PedersenHashTree<'a, E: JubjubEngine> { /* private fields */ }

Trait Implementations§

Source§

impl<'a, E: JubjubEngine> MerkleTree<E> for PedersenHashTree<'a, E>

Source§

type Hash = AllocatedNum<E>

Source§

fn path_bits_per_level(&self) -> usize

Source§

fn branching_factor(&self) -> usize

Source§

fn hash_leaf<CS: ConstraintSystem<E>>( &self, cs: CS, leaf: &[Boolean], ) -> Result<Self::Hash, SynthesisError>

Source§

fn hash_node<CS: ConstraintSystem<E>>( &self, cs: CS, children: &[Self::Hash], level: usize, ) -> Result<Self::Hash, SynthesisError>

Source§

fn check_inclusion<CS: ConstraintSystem<E>>( &self, cs: CS, leaf: &[Boolean], path: &[Boolean], witness: &[Self::Hash], ) -> Result<Boolean, SynthesisError>

Source§

fn check_inclusion_for_root<CS: ConstraintSystem<E>>( &self, cs: CS, root: &Self::Hash, leaf: &[Boolean], path: &[Boolean], witness: &[Self::Hash], ) -> Result<Boolean, SynthesisError>

Source§

fn check_hash_inclusion<CS: ConstraintSystem<E>>( &self, cs: CS, hash: &Self::Hash, path: &[Boolean], witness: &[Self::Hash], ) -> Result<Boolean, SynthesisError>

Source§

fn check_hash_inclusion_for_root<CS: ConstraintSystem<E>>( &self, cs: CS, root: &Self::Hash, hash: &Self::Hash, path: &[Boolean], witness: &[Self::Hash], ) -> Result<Boolean, SynthesisError>

Source§

fn update<CS: ConstraintSystem<E>>( &mut self, cs: CS, leaf: &[Boolean], path: &[Boolean], witness: &[Self::Hash], ) -> Result<Self::Hash, SynthesisError>

Source§

fn update_from_hash<CS: ConstraintSystem<E>>( &mut self, cs: CS, hash: &Self::Hash, path: &[Boolean], witness: &[Self::Hash], ) -> Result<Self::Hash, SynthesisError>

Source§

fn update_intersect<CS: ConstraintSystem<E>>( &mut self, cs: CS, leafs: (&[Boolean], &[Boolean]), paths: (&[Boolean], &[Boolean]), witnesses: (&[Self::Hash], &[Self::Hash]), ) -> Result<Self::Hash, SynthesisError>

Source§

fn update_from_hash_intersect<CS: ConstraintSystem<E>>( &mut self, cs: CS, leafs: (&Self::Hash, &Self::Hash), paths: (&[Boolean], &[Boolean]), witnesses: (&[Self::Hash], &[Self::Hash]), ) -> Result<Self::Hash, SynthesisError>

Auto Trait Implementations§

§

impl<'a, E> Freeze for PedersenHashTree<'a, E>
where <E as ScalarEngine>::Fr: Freeze,

§

impl<'a, E> RefUnwindSafe for PedersenHashTree<'a, E>

§

impl<'a, E> Send for PedersenHashTree<'a, E>

§

impl<'a, E> Sync for PedersenHashTree<'a, E>

§

impl<'a, E> Unpin for PedersenHashTree<'a, E>
where <E as ScalarEngine>::Fr: Unpin,

§

impl<'a, E> UnwindSafe for PedersenHashTree<'a, E>

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, 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, 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.