#[repr(C)]pub struct StateMerkleTreeAccount {Show 15 fields
pub index: u64,
pub rollover_fee: u64,
pub rollover_threshold: u64,
pub tip: u64,
pub rolledover_slot: u64,
pub close_threshold: u64,
pub next_merkle_tree: Pubkey,
pub owner: Pubkey,
pub delegate: Pubkey,
pub associated_queue: Pubkey,
pub state_merkle_tree_struct: [u8; 272],
pub state_merkle_tree_filled_subtrees: [u8; 832],
pub state_merkle_tree_changelog: [u8; 1220800],
pub state_merkle_tree_roots: [u8; 76800],
pub state_merkle_tree_canopy: [u8; 65472],
}Expand description
Concurrent state Merkle tree used for public compressed transactions.
Fields§
§index: u64Unique index.
rollover_fee: u64This fee is used for rent for the next account. It accumulates in the account so that once the corresponding Merkle tree account is full it can be rolled over
rollover_threshold: u64The threshold in percentage points when the account should be rolled over (95 corresponds to 95% filled).
tip: u64Tip for maintaining the account.
rolledover_slot: u64The slot when the account was rolled over, a rolled over account should not be written to.
close_threshold: u64If current slot is greater than rolledover_slot + close_threshold and the account is empty it can be closed.
next_merkle_tree: PubkeyPublic key of the next Merkle tree.
owner: PubkeyOwner of the Merkle tree.
delegate: PubkeyDelegate of the Merkle tree. This will be used for program owned Merkle trees.
associated_queue: Pubkey§state_merkle_tree_struct: [u8; 272]Merkle tree for the transaction state.
state_merkle_tree_filled_subtrees: [u8; 832]§state_merkle_tree_changelog: [u8; 1220800]§state_merkle_tree_roots: [u8; 76800]§state_merkle_tree_canopy: [u8; 65472]Implementations§
source§impl StateMerkleTreeAccount
impl StateMerkleTreeAccount
pub fn copy_merkle_tree(&self) -> Result<ConcurrentMerkleTree26<'_, Poseidon>>
pub fn load_merkle_tree(&self) -> Result<&ConcurrentMerkleTree26<'_, Poseidon>>
pub fn load_merkle_tree_init( &mut self, height: usize, changelog_size: usize, roots_size: usize, canopy_depth: usize ) -> Result<&mut ConcurrentMerkleTree26<'_, Poseidon>>
pub fn load_merkle_tree_mut( &mut self ) -> Result<&mut ConcurrentMerkleTree26<'_, Poseidon>>
pub fn load_next_index(&self) -> Result<usize>
pub fn load_roots(&self) -> Result<CyclicBoundedVec<'_, [u8; 32]>>
Trait Implementations§
source§impl AccountDeserialize for StateMerkleTreeAccount
impl AccountDeserialize for StateMerkleTreeAccount
source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Mint account into a token
Account.source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
source§impl BorshDeserialize for StateMerkleTreeAccountwhere
u64: BorshDeserialize,
Pubkey: BorshDeserialize,
[u8; 272]: BorshDeserialize,
[u8; 832]: BorshDeserialize,
[u8; 1220800]: BorshDeserialize,
[u8; 76800]: BorshDeserialize,
[u8; 65472]: BorshDeserialize,
impl BorshDeserialize for StateMerkleTreeAccountwhere
u64: BorshDeserialize,
Pubkey: BorshDeserialize,
[u8; 272]: BorshDeserialize,
[u8; 832]: BorshDeserialize,
[u8; 1220800]: BorshDeserialize,
[u8; 76800]: BorshDeserialize,
[u8; 65472]: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for StateMerkleTreeAccountwhere
u64: BorshSerialize,
Pubkey: BorshSerialize,
[u8; 272]: BorshSerialize,
[u8; 832]: BorshSerialize,
[u8; 1220800]: BorshSerialize,
[u8; 76800]: BorshSerialize,
[u8; 65472]: BorshSerialize,
impl BorshSerialize for StateMerkleTreeAccountwhere
u64: BorshSerialize,
Pubkey: BorshSerialize,
[u8; 272]: BorshSerialize,
[u8; 832]: BorshSerialize,
[u8; 1220800]: BorshSerialize,
[u8; 76800]: BorshSerialize,
[u8; 65472]: BorshSerialize,
source§impl Clone for StateMerkleTreeAccount
impl Clone for StateMerkleTreeAccount
source§fn clone(&self) -> StateMerkleTreeAccount
fn clone(&self) -> StateMerkleTreeAccount
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for StateMerkleTreeAccount
impl Debug for StateMerkleTreeAccount
source§impl Discriminator for StateMerkleTreeAccount
impl Discriminator for StateMerkleTreeAccount
const DISCRIMINATOR: [u8; 8] = _
fn discriminator() -> [u8; 8]
source§impl GroupAccess for StateMerkleTreeAccount
impl GroupAccess for StateMerkleTreeAccount
impl Copy for StateMerkleTreeAccount
impl Pod for StateMerkleTreeAccount
impl ZeroCopy for StateMerkleTreeAccount
Auto Trait Implementations§
impl Freeze for StateMerkleTreeAccount
impl RefUnwindSafe for StateMerkleTreeAccount
impl Send for StateMerkleTreeAccount
impl Sync for StateMerkleTreeAccount
impl Unpin for StateMerkleTreeAccount
impl UnwindSafe for StateMerkleTreeAccount
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
source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &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> ⓘ
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> ⓘ
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