pub struct BinaryMerkleTreeProver<T, H, C> { /* private fields */ }
Implementations§
Source§impl<T, H, C> BinaryMerkleTreeProver<T, H, C>
impl<T, H, C> BinaryMerkleTreeProver<T, H, C>
pub fn scheme(&self) -> &BinaryMerkleTreeScheme<T, H, C>
Source§impl<T, C, H> BinaryMerkleTreeProver<T, H, C>
impl<T, C, H> BinaryMerkleTreeProver<T, H, C>
Trait Implementations§
Source§impl<F, H, C> MerkleTreeProver<F> for BinaryMerkleTreeProver<F, H, C>where
F: TowerField,
H: Digest + BlockSizeUser + FixedOutputReset,
C: PseudoCompressionFunction<Output<H>, 2> + Sync,
impl<F, H, C> MerkleTreeProver<F> for BinaryMerkleTreeProver<F, H, C>where
F: TowerField,
H: Digest + BlockSizeUser + FixedOutputReset,
C: PseudoCompressionFunction<Output<H>, 2> + Sync,
type Scheme = BinaryMerkleTreeScheme<F, H, C>
Source§type Committed = BinaryMerkleTree<GenericArray<u8, <H as OutputSizeUser>::OutputSize>>
type Committed = BinaryMerkleTree<GenericArray<u8, <H as OutputSizeUser>::OutputSize>>
Data generated during commitment required to generate opening proofs.
Source§fn commit(
&self,
data: &[F],
batch_size: usize,
) -> Result<(Commitment<Output<H>>, Self::Committed), Error>
fn commit( &self, data: &[F], batch_size: usize, ) -> Result<(Commitment<Output<H>>, Self::Committed), Error>
Commit a vector of values.
Source§fn layer<'a>(
&self,
committed: &'a Self::Committed,
depth: usize,
) -> Result<&'a [Output<H>], Error>
fn layer<'a>( &self, committed: &'a Self::Committed, depth: usize, ) -> Result<&'a [Output<H>], Error>
Returns the internal digest layer at the given depth.
Source§fn prove_opening<Proof: CanWrite>(
&self,
committed: &Self::Committed,
layer_depth: usize,
index: usize,
proof: Proof,
) -> Result<(), Error>
fn prove_opening<Proof: CanWrite>( &self, committed: &Self::Committed, layer_depth: usize, index: usize, proof: Proof, ) -> Result<(), Error>
Generate an opening proof for an entry in a committed vector at the given index. Read more
Source§fn commit_iterated<ParIter>(
&self,
iterated_chunks: ParIter,
log_len: usize,
) -> Result<(Commitment<<Self::Scheme as MerkleTreeScheme<F>>::Digest>, Self::Committed), Error>where
ParIter: IndexedParallelIterator<Item: IntoIterator<Item = F>>,
fn commit_iterated<ParIter>(
&self,
iterated_chunks: ParIter,
log_len: usize,
) -> Result<(Commitment<<Self::Scheme as MerkleTreeScheme<F>>::Digest>, Self::Committed), Error>where
ParIter: IndexedParallelIterator<Item: IntoIterator<Item = F>>,
Commit interleaved elements from iterator by val
Auto Trait Implementations§
impl<T, H, C> Freeze for BinaryMerkleTreeProver<T, H, C>where
C: Freeze,
impl<T, H, C> RefUnwindSafe for BinaryMerkleTreeProver<T, H, C>where
C: RefUnwindSafe,
impl<T, H, C> Send for BinaryMerkleTreeProver<T, H, C>where
C: Send,
impl<T, H, C> Sync for BinaryMerkleTreeProver<T, H, C>where
C: Sync,
impl<T, H, C> Unpin for BinaryMerkleTreeProver<T, H, C>where
C: Unpin,
impl<T, H, C> UnwindSafe for BinaryMerkleTreeProver<T, H, C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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