pub struct SparseMerkleRangeProof<H: SimpleHasher> { /* private fields */ }
Expand description
Note: this is not a range proof in the sense that a range of nodes is verified! Instead, it verifies the entire left part of the tree up to a known rightmost node. See the description below.
A proof that can be used to authenticate a range of consecutive leaves, from the leftmost leaf to the rightmost known one, in a sparse Merkle tree. For example, given the following sparse Merkle tree:
root
/ \
/ \
/ \
o o
/ \ / \
a o o h
/ \ / \
o d e X
/ \ / \
b c f g
if the proof wants show that [a, b, c, d, e]
exists in the tree, it would need the siblings
X
and h
on the right.
Implementations§
Source§impl<H: SimpleHasher> SparseMerkleRangeProof<H>
impl<H: SimpleHasher> SparseMerkleRangeProof<H>
Trait Implementations§
Source§impl<H: SimpleHasher> BorshDeserialize for SparseMerkleRangeProof<H>
impl<H: SimpleHasher> BorshDeserialize for SparseMerkleRangeProof<H>
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl<H: SimpleHasher> BorshSerialize for SparseMerkleRangeProof<H>
impl<H: SimpleHasher> BorshSerialize for SparseMerkleRangeProof<H>
Source§impl<H: SimpleHasher> Clone for SparseMerkleRangeProof<H>
impl<H: SimpleHasher> Clone for SparseMerkleRangeProof<H>
Source§impl<H: SimpleHasher> Debug for SparseMerkleRangeProof<H>
impl<H: SimpleHasher> Debug for SparseMerkleRangeProof<H>
Source§impl<'de, H: SimpleHasher> Deserialize<'de> for SparseMerkleRangeProof<H>
impl<'de, H: SimpleHasher> Deserialize<'de> for SparseMerkleRangeProof<H>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<H: SimpleHasher> PartialEq for SparseMerkleRangeProof<H>
impl<H: SimpleHasher> PartialEq for SparseMerkleRangeProof<H>
Source§impl<H: SimpleHasher> Serialize for SparseMerkleRangeProof<H>
impl<H: SimpleHasher> Serialize for SparseMerkleRangeProof<H>
impl<H: Eq + SimpleHasher> Eq for SparseMerkleRangeProof<H>
Auto Trait Implementations§
impl<H> Freeze for SparseMerkleRangeProof<H>
impl<H> RefUnwindSafe for SparseMerkleRangeProof<H>where
H: RefUnwindSafe,
impl<H> Send for SparseMerkleRangeProof<H>where
H: Send,
impl<H> Sync for SparseMerkleRangeProof<H>where
H: Sync,
impl<H> Unpin for SparseMerkleRangeProof<H>where
H: Unpin,
impl<H> UnwindSafe for SparseMerkleRangeProof<H>where
H: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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