pub trait SctManager: StateWrite {
// Provided methods
fn write_sct<'life0, 'async_trait>(
&'life0 mut self,
height: u64,
sct: Tree,
block_root: Root,
epoch_root: Option<Root>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait { ... }
fn add_sct_commitment<'life0, 'async_trait>(
&'life0 mut self,
commitment: StateCommitment,
source: CommitmentSource,
) -> Pin<Box<dyn Future<Output = Result<Position>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait { ... }
fn nullify<'life0, 'async_trait>(
&'life0 mut self,
nullifier: Nullifier,
source: CommitmentSource,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait { ... }
fn end_sct_block<'life0, 'async_trait>(
&'life0 mut self,
end_epoch: bool,
) -> Pin<Box<dyn Future<Output = Result<(Root, Option<Root>)>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait { ... }
fn write_sct_cache(&mut self, tree: Tree) { ... }
fn persist_sct_cache(&mut self) { ... }
}
component
only.Expand description
Provides write access to the state commitment tree and related data.
Provided Methods§
Sourcefn write_sct<'life0, 'async_trait>(
&'life0 mut self,
height: u64,
sct: Tree,
block_root: Root,
epoch_root: Option<Root>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn write_sct<'life0, 'async_trait>(
&'life0 mut self,
height: u64,
sct: Tree,
block_root: Root,
epoch_root: Option<Root>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Write an SCT instance to nonverifiable storage and record the block and epoch roots in the JMT.
§Panics
If the epoch has not been set, or if a serialization failure occurs.
Sourcefn add_sct_commitment<'life0, 'async_trait>(
&'life0 mut self,
commitment: StateCommitment,
source: CommitmentSource,
) -> Pin<Box<dyn Future<Output = Result<Position>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn add_sct_commitment<'life0, 'async_trait>(
&'life0 mut self,
commitment: StateCommitment,
source: CommitmentSource,
) -> Pin<Box<dyn Future<Output = Result<Position>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Add a state commitment into the SCT, emitting an event recording its source, and return the insert position in the tree.
Sourcefn nullify<'life0, 'async_trait>(
&'life0 mut self,
nullifier: Nullifier,
source: CommitmentSource,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn nullify<'life0, 'async_trait>(
&'life0 mut self,
nullifier: Nullifier,
source: CommitmentSource,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Record a nullifier as spent in the verifiable storage.
Sourcefn end_sct_block<'life0, 'async_trait>(
&'life0 mut self,
end_epoch: bool,
) -> Pin<Box<dyn Future<Output = Result<(Root, Option<Root>)>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn end_sct_block<'life0, 'async_trait>(
&'life0 mut self,
end_epoch: bool,
) -> Pin<Box<dyn Future<Output = Result<(Root, Option<Root>)>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Seal the current block in the SCT, and produce an epoch root if we are ending an epoch as well.
§Panics
This method panic if the block is full, or if a serialization failure occurs.
fn write_sct_cache(&mut self, tree: Tree)
Sourcefn persist_sct_cache(&mut self)
fn persist_sct_cache(&mut self)
Persist the object-store SCT instance to nonverifiable storage. Note that this doesn’t actually persist the SCT to disk, see the cndiarium documentation for more information.
§Panics
This method panics if a serialization failure occurs.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.