[−][src]Struct sapling_crypto_ce::circuit::merkle::PoseidonHashTree
Methods
impl<'a, E: PoseidonEngine<SBox = QuinticSBox<E>>> PoseidonHashTree<'a, E>
[src]
pub fn new(
root: AllocatedNum<E>,
height: usize,
bits_per_level: usize,
params: &'a E::Params,
zero: AllocatedNum<E>
) -> Self
[src]
root: AllocatedNum<E>,
height: usize,
bits_per_level: usize,
params: &'a E::Params,
zero: AllocatedNum<E>
) -> Self
pub fn calculate_swaps<CS: ConstraintSystem<E>>(
&self,
cs: CS,
path_bits_slice: &[Boolean]
) -> Result<Vec<Boolean>, SynthesisError>
[src]
&self,
cs: CS,
path_bits_slice: &[Boolean]
) -> Result<Vec<Boolean>, SynthesisError>
Trait Implementations
impl<'a, E: PoseidonEngine<SBox = QuinticSBox<E>>> MerkleTree<E> for PoseidonHashTree<'a, E>
[src]
type Hash = AllocatedNum<E>
fn path_bits_per_level(&self) -> usize
[src]
fn branching_factor(&self) -> usize
[src]
fn hash_leaf<CS: ConstraintSystem<E>>(
&self,
cs: CS,
leaf: &[Boolean]
) -> Result<Self::Hash, SynthesisError>
[src]
&self,
cs: CS,
leaf: &[Boolean]
) -> Result<Self::Hash, SynthesisError>
fn hash_node<CS: ConstraintSystem<E>>(
&self,
cs: CS,
children: &[Self::Hash],
level: usize
) -> Result<Self::Hash, SynthesisError>
[src]
&self,
cs: CS,
children: &[Self::Hash],
level: usize
) -> Result<Self::Hash, SynthesisError>
fn check_inclusion<CS: ConstraintSystem<E>>(
&self,
cs: CS,
leaf: &[Boolean],
path: &[Boolean],
witness: &[Self::Hash]
) -> Result<Boolean, SynthesisError>
[src]
&self,
cs: CS,
leaf: &[Boolean],
path: &[Boolean],
witness: &[Self::Hash]
) -> Result<Boolean, SynthesisError>
fn check_inclusion_for_root<CS: ConstraintSystem<E>>(
&self,
cs: CS,
root: &Self::Hash,
leaf: &[Boolean],
path: &[Boolean],
witness: &[Self::Hash]
) -> Result<Boolean, SynthesisError>
[src]
&self,
cs: CS,
root: &Self::Hash,
leaf: &[Boolean],
path: &[Boolean],
witness: &[Self::Hash]
) -> Result<Boolean, SynthesisError>
fn check_hash_inclusion<CS: ConstraintSystem<E>>(
&self,
cs: CS,
hash: &Self::Hash,
path: &[Boolean],
witness: &[Self::Hash]
) -> Result<Boolean, SynthesisError>
[src]
&self,
cs: CS,
hash: &Self::Hash,
path: &[Boolean],
witness: &[Self::Hash]
) -> Result<Boolean, SynthesisError>
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>
[src]
&self,
cs: CS,
root: &Self::Hash,
hash: &Self::Hash,
path: &[Boolean],
witness: &[Self::Hash]
) -> Result<Boolean, SynthesisError>
fn update<CS: ConstraintSystem<E>>(
&mut self,
cs: CS,
leaf: &[Boolean],
path: &[Boolean],
witness: &[Self::Hash]
) -> Result<Self::Hash, SynthesisError>
[src]
&mut self,
cs: CS,
leaf: &[Boolean],
path: &[Boolean],
witness: &[Self::Hash]
) -> Result<Self::Hash, SynthesisError>
fn update_from_hash<CS: ConstraintSystem<E>>(
&mut self,
cs: CS,
hash: &Self::Hash,
path: &[Boolean],
witness: &[Self::Hash]
) -> Result<Self::Hash, SynthesisError>
[src]
&mut self,
cs: CS,
hash: &Self::Hash,
path: &[Boolean],
witness: &[Self::Hash]
) -> Result<Self::Hash, SynthesisError>
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>
[src]
&mut self,
cs: CS,
leafs: (&[Boolean], &[Boolean]),
paths: (&[Boolean], &[Boolean]),
witnesses: (&[Self::Hash], &[Self::Hash])
) -> Result<Self::Hash, SynthesisError>
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>
[src]
&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> Send for PoseidonHashTree<'a, E> where
<E as ScalarEngine>::Fr: Send,
<E as PoseidonEngine>::Params: Sync,
<E as ScalarEngine>::Fr: Send,
<E as PoseidonEngine>::Params: Sync,
impl<'a, E> Sync for PoseidonHashTree<'a, E> where
<E as ScalarEngine>::Fr: Sync,
<E as PoseidonEngine>::Params: Sync,
<E as ScalarEngine>::Fr: Sync,
<E as PoseidonEngine>::Params: Sync,
impl<'a, E> Unpin for PoseidonHashTree<'a, E> where
<E as ScalarEngine>::Fr: Unpin,
<E as ScalarEngine>::Fr: Unpin,
impl<'a, E> UnwindSafe for PoseidonHashTree<'a, E> where
<E as ScalarEngine>::Fr: UnwindSafe,
<E as PoseidonEngine>::Params: RefUnwindSafe,
<E as ScalarEngine>::Fr: UnwindSafe,
<E as PoseidonEngine>::Params: RefUnwindSafe,
impl<'a, E> RefUnwindSafe for PoseidonHashTree<'a, E> where
<E as ScalarEngine>::Fr: RefUnwindSafe,
<E as PoseidonEngine>::Params: RefUnwindSafe,
<E as ScalarEngine>::Fr: RefUnwindSafe,
<E as PoseidonEngine>::Params: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self