pub struct AddressQueueData {Show 13 fields
pub addresses: Vec<[u8; 32]>,
pub low_element_values: Vec<[u8; 32]>,
pub low_element_next_values: Vec<[u8; 32]>,
pub low_element_indices: Vec<u64>,
pub low_element_next_indices: Vec<u64>,
pub nodes: Vec<u64>,
pub node_hashes: Vec<[u8; 32]>,
pub initial_root: [u8; 32],
pub leaves_hash_chains: Vec<[u8; 32]>,
pub subtrees: Vec<[u8; 32]>,
pub start_index: u64,
pub tree_next_insertion_index: u64,
pub root_seq: u64,
}Expand description
V2 Address Queue Data with deduplicated nodes
Proofs are reconstructed from nodes/node_hashes using low_element_indices
Fields§
§addresses: Vec<[u8; 32]>§low_element_values: Vec<[u8; 32]>§low_element_next_values: Vec<[u8; 32]>§low_element_indices: Vec<u64>§low_element_next_indices: Vec<u64>§nodes: Vec<u64>Deduplicated node indices - encoding: (level << 56) | position
node_hashes: Vec<[u8; 32]>Hashes corresponding to each node index
initial_root: [u8; 32]§leaves_hash_chains: Vec<[u8; 32]>§subtrees: Vec<[u8; 32]>§start_index: u64Pagination offset for the returned queue slice.
tree_next_insertion_index: u64Sparse tree insertion point / next index used to initialize staging trees.
root_seq: u64Implementations§
Source§impl AddressQueueData
impl AddressQueueData
pub const ADDRESS_TREE_HEIGHT: usize
Sourcepub fn reconstruct_proofs<const HEIGHT: usize>(
&self,
address_range: Range<usize>,
) -> Result<Vec<[[u8; 32]; HEIGHT]>, IndexerError>
pub fn reconstruct_proofs<const HEIGHT: usize>( &self, address_range: Range<usize>, ) -> Result<Vec<[[u8; 32]; HEIGHT]>, IndexerError>
Reconstruct a contiguous batch of proofs while reusing a single node lookup table.
Sourcepub fn reconstruct_all_proofs<const HEIGHT: usize>(
&self,
) -> Result<Vec<[[u8; 32]; HEIGHT]>, IndexerError>
pub fn reconstruct_all_proofs<const HEIGHT: usize>( &self, ) -> Result<Vec<[[u8; 32]; HEIGHT]>, IndexerError>
Reconstruct all proofs for all addresses
Trait Implementations§
Source§impl Clone for AddressQueueData
impl Clone for AddressQueueData
Source§fn clone(&self) -> AddressQueueData
fn clone(&self) -> AddressQueueData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AddressQueueData
impl Debug for AddressQueueData
Source§impl Default for AddressQueueData
impl Default for AddressQueueData
Source§fn default() -> AddressQueueData
fn default() -> AddressQueueData
Returns the “default value” for a type. Read more
Source§impl PartialEq for AddressQueueData
impl PartialEq for AddressQueueData
Source§fn eq(&self, other: &AddressQueueData) -> bool
fn eq(&self, other: &AddressQueueData) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AddressQueueData
Auto Trait Implementations§
impl Freeze for AddressQueueData
impl RefUnwindSafe for AddressQueueData
impl Send for AddressQueueData
impl Sync for AddressQueueData
impl Unpin for AddressQueueData
impl UnsafeUnpin for AddressQueueData
impl UnwindSafe for AddressQueueData
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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