Trait ProtocolUpdateBatchGenerator

Source
pub trait ProtocolUpdateBatchGenerator {
    // Required methods
    fn batch_name(&self) -> &str;
    fn generate_batch(
        self: Box<Self>,
        store: &dyn SubstateDatabase,
    ) -> ProtocolUpdateBatch;
}
Expand description

Generate a batch of transactions to be committed atomically with a proof.

It should be assumed that the SubstateDatabase has committed all previous batches. This ensures that the update is deterministically continuable if the node shuts down mid-update.

Required Methods§

Source

fn batch_name(&self) -> &str

The batch name should be kebab-case for consistency

Source

fn generate_batch( self: Box<Self>, store: &dyn SubstateDatabase, ) -> ProtocolUpdateBatch

Generates the content of the batch

Implementors§