Trait mithril_signer::services::TransactionStore

source ·
pub trait TransactionStore: Send + Sync {
    // Required methods
    fn get_highest_beacon<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = StdResult<Option<ChainPoint>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_highest_block_range<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = StdResult<Option<BlockRange>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn store_transactions<'life0, 'async_trait>(
        &'life0 self,
        transactions: Vec<CardanoTransaction>,
    ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_transactions_in_range<'life0, 'async_trait>(
        &'life0 self,
        range: Range<BlockNumber>,
    ) -> Pin<Box<dyn Future<Output = StdResult<Vec<CardanoTransaction>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn store_block_range_roots<'life0, 'async_trait>(
        &'life0 self,
        block_ranges: Vec<(BlockRange, MKTreeNode)>,
    ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn remove_rolled_back_transactions_and_block_range<'life0, 'async_trait>(
        &'life0 self,
        slot_number: SlotNumber,
    ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Cardano transactions store

Required Methods§

source

fn get_highest_beacon<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = StdResult<Option<ChainPoint>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the highest known transaction beacon

source

fn get_highest_block_range<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = StdResult<Option<BlockRange>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the highest stored block range root bounds

source

fn store_transactions<'life0, 'async_trait>( &'life0 self, transactions: Vec<CardanoTransaction>, ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Store list of transactions

source

fn get_transactions_in_range<'life0, 'async_trait>( &'life0 self, range: Range<BlockNumber>, ) -> Pin<Box<dyn Future<Output = StdResult<Vec<CardanoTransaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get transactions in an interval of blocks

source

fn store_block_range_roots<'life0, 'async_trait>( &'life0 self, block_ranges: Vec<(BlockRange, MKTreeNode)>, ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Store list of block ranges with their corresponding merkle root

source

fn remove_rolled_back_transactions_and_block_range<'life0, 'async_trait>( &'life0 self, slot_number: SlotNumber, ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Remove transactions and block range roots that are in a rolled-back fork

  • Remove transactions with slot number strictly greater than the given slot number
  • Remove block range roots that have lower bound range strictly above the given slot number

Implementations on Foreign Types§

source§

impl TransactionStore for CardanoTransactionRepository

source§

fn get_highest_beacon<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = StdResult<Option<ChainPoint>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_highest_block_range<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = StdResult<Option<BlockRange>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn store_transactions<'life0, 'async_trait>( &'life0 self, transactions: Vec<CardanoTransaction>, ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_transactions_in_range<'life0, 'async_trait>( &'life0 self, range: Range<BlockNumber>, ) -> Pin<Box<dyn Future<Output = StdResult<Vec<CardanoTransaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn store_block_range_roots<'life0, 'async_trait>( &'life0 self, block_ranges: Vec<(BlockRange, MKTreeNode)>, ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn remove_rolled_back_transactions_and_block_range<'life0, 'async_trait>( &'life0 self, slot_number: SlotNumber, ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§