DataSource

Type Alias DataSource 

Source
pub type DataSource = SqlDataSource<SeqTypes, Provider>;

Aliased Type§

pub struct DataSource { /* private fields */ }

Trait Implementations§

Source§

impl CatchupStorage for DataSource

Source§

async fn get_accounts( &self, instance: &NodeState, height: u64, view: ViewNumber, accounts: &[FeeAccount], ) -> Result<(FeeMerkleTree, Leaf2)>

Get the state of the requested accounts. Read more
Source§

async fn get_reward_accounts_v2( &self, instance: &NodeState, height: u64, view: ViewNumber, accounts: &[RewardAccountV2], ) -> Result<(RewardMerkleTreeV2, Leaf2)>

Source§

async fn get_reward_accounts_v1( &self, instance: &NodeState, height: u64, view: ViewNumber, accounts: &[RewardAccountV1], ) -> Result<(RewardMerkleTreeV1, Leaf2)>

Source§

async fn get_frontier( &self, instance: &NodeState, height: u64, view: ViewNumber, ) -> Result<BlocksFrontier>

Get the blocks Merkle tree frontier. Read more
Source§

async fn get_chain_config( &self, commitment: Commitment<ChainConfig>, ) -> Result<ChainConfig>

Source§

async fn get_leaf_chain(&self, height: u64) -> Result<Vec<Leaf2>>

Source§

impl DatabaseMetadataSource for DataSource

Source§

async fn get_table_sizes(&self) -> Result<Vec<TableSize>>

Get the sizes of all tables in the database.
Source§

impl RewardMerkleTreeDataSource for DataSource

Source§

async fn load_v1_reward_account_proof( &self, height: u64, account: RewardAccountV1, ) -> Result<RewardAccountQueryDataV1>

Source§

fn persist_tree( &self, height: u64, merkle_tree: Vec<u8>, ) -> impl Send + Future<Output = Result<()>>

Source§

fn load_tree(&self, height: u64) -> impl Send + Future<Output = Result<Vec<u8>>>

Source§

fn garbage_collect( &self, height: u64, ) -> impl Send + Future<Output = Result<()>>

garbage collects merkle tree data for blocks strictly older than height
Source§

fn persist_proofs( &self, height: u64, proofs: impl Iterator<Item = (Vec<u8>, Vec<u8>)> + Send, ) -> impl Send + Future<Output = Result<()>>

Source§

fn load_proof( &self, height: u64, account: Vec<u8>, epoch_height: u64, ) -> impl Send + Future<Output = Result<Vec<u8>>>

Source§

fn load_latest_proof( &self, account: Vec<u8>, ) -> impl Send + Future<Output = Result<Vec<u8>>>

Source§

fn proof_exists(&self, height: u64) -> impl Send + Future<Output = bool>

Source§

fn persist_reward_proofs( &self, node_state: &NodeState, height: u64, version: Version, ) -> impl Send + Future<Output = Result<()>>

Source§

fn save_and_gc_reward_tree_v2( &self, node_state: &NodeState, height: u64, version: Version, merkle_tree: &RewardMerkleTreeV2, ) -> impl Send + Future<Output = Result<()>>

Source§

fn load_reward_merkle_tree_v2( &self, height: u64, ) -> impl Send + Future<Output = Result<PermittedRewardMerkleTreeV2>>

Source§

fn load_reward_account_proof_v2( &self, _height: u64, _account: RewardAccountV2, ) -> impl Send + Future<Output = Result<RewardAccountQueryDataV2>>

Source§

fn load_latest_reward_account_proof_v2( &self, account: RewardAccountV2, ) -> impl Send + Future<Output = Result<RewardAccountQueryDataV2>>

Source§

impl SequencerDataSource for DataSource

Source§

type Options = Options

Source§

fn create<'async_trait>( opt: Self::Options, provider: Provider, reset: bool, ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where Self: 'async_trait,

Instantiate a data source from command line options.
Source§

impl TestableSequencerDataSource for DataSource

Source§

type Storage = TmpDb

Source§

fn create_storage<'async_trait>() -> Pin<Box<dyn Future<Output = Self::Storage> + Send + 'async_trait>>
where Self: 'async_trait,

Source§

fn persistence_options(storage: &Self::Storage) -> Self::Options

Source§

fn leaf_only_ds_options( storage: &Self::Storage, opt: Options, ) -> Result<Options>

Source§

fn options(storage: &Self::Storage, opt: Options) -> Options