Trait StateCatchup

Source
pub trait StateCatchup: Send + Sync {
Show 13 methods // Required methods fn try_fetch_leaf<'life0, 'async_trait>( &'life0 self, retry: usize, height: u64, stake_table: HSStakeTable<SeqTypes>, success_threshold: U256, ) -> Pin<Box<dyn Future<Output = Result<Leaf2>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn try_fetch_accounts<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, retry: usize, instance: &'life1 NodeState, height: u64, view: ViewNumber, fee_merkle_tree_root: FeeMerkleCommitment, accounts: &'life2 [FeeAccount], ) -> Pin<Box<dyn Future<Output = Result<Vec<FeeAccountProof>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn try_remember_blocks_merkle_tree<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, retry: usize, instance: &'life1 NodeState, height: u64, view: ViewNumber, mt: &'life2 mut BlockMerkleTree, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn try_fetch_chain_config<'life0, 'async_trait>( &'life0 self, retry: usize, commitment: Commitment<ChainConfig>, ) -> Pin<Box<dyn Future<Output = Result<ChainConfig>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn try_fetch_reward_accounts<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, retry: usize, instance: &'life1 NodeState, height: u64, view: ViewNumber, reward_merkle_tree_root: RewardMerkleCommitment, accounts: &'life2 [RewardAccount], ) -> Pin<Box<dyn Future<Output = Result<Vec<RewardAccountProof>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn is_local(&self) -> bool; fn backoff(&self) -> &BackoffParams; fn name(&self) -> String; // Provided methods fn fetch_leaf<'life0, 'async_trait>( &'life0 self, height: u64, stake_table: HSStakeTable<SeqTypes>, success_threshold: U256, ) -> Pin<Box<dyn Future<Output = Result<Leaf2>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn fetch_accounts<'life0, 'life1, 'async_trait>( &'life0 self, instance: &'life1 NodeState, height: u64, view: ViewNumber, fee_merkle_tree_root: FeeMerkleCommitment, accounts: Vec<FeeAccount>, ) -> Pin<Box<dyn Future<Output = Result<Vec<FeeAccountProof>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn remember_blocks_merkle_tree<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, instance: &'life1 NodeState, height: u64, view: ViewNumber, mt: &'life2 mut BlockMerkleTree, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn fetch_chain_config<'life0, 'async_trait>( &'life0 self, commitment: Commitment<ChainConfig>, ) -> Pin<Box<dyn Future<Output = Result<ChainConfig>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn fetch_reward_accounts<'life0, 'life1, 'async_trait>( &'life0 self, instance: &'life1 NodeState, height: u64, view: ViewNumber, reward_merkle_tree_root: RewardMerkleCommitment, accounts: Vec<RewardAccount>, ) -> Pin<Box<dyn Future<Output = Result<Vec<RewardAccountProof>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... }
}

Required Methods§

Source

fn try_fetch_leaf<'life0, 'async_trait>( &'life0 self, retry: usize, height: u64, stake_table: HSStakeTable<SeqTypes>, success_threshold: U256, ) -> Pin<Box<dyn Future<Output = Result<Leaf2>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetch the leaf at the given height without retrying on transient errors.

Source

fn try_fetch_accounts<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, retry: usize, instance: &'life1 NodeState, height: u64, view: ViewNumber, fee_merkle_tree_root: FeeMerkleCommitment, accounts: &'life2 [FeeAccount], ) -> Pin<Box<dyn Future<Output = Result<Vec<FeeAccountProof>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Fetch the given list of accounts without retrying on transient errors.

Source

fn try_remember_blocks_merkle_tree<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, retry: usize, instance: &'life1 NodeState, height: u64, view: ViewNumber, mt: &'life2 mut BlockMerkleTree, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Fetch and remember the blocks frontier without retrying on transient errors.

Source

fn try_fetch_chain_config<'life0, 'async_trait>( &'life0 self, retry: usize, commitment: Commitment<ChainConfig>, ) -> Pin<Box<dyn Future<Output = Result<ChainConfig>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetch the chain config without retrying on transient errors.

Source

fn try_fetch_reward_accounts<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, retry: usize, instance: &'life1 NodeState, height: u64, view: ViewNumber, reward_merkle_tree_root: RewardMerkleCommitment, accounts: &'life2 [RewardAccount], ) -> Pin<Box<dyn Future<Output = Result<Vec<RewardAccountProof>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Fetch the given list of reward accounts without retrying on transient errors.

Source

fn is_local(&self) -> bool

Returns true if the catchup provider is local (e.g. does not make calls to remote resources).

Source

fn backoff(&self) -> &BackoffParams

Returns the backoff parameters for the catchup provider.

Source

fn name(&self) -> String

Returns the name of the catchup provider.

Provided Methods§

Source

fn fetch_leaf<'life0, 'async_trait>( &'life0 self, height: u64, stake_table: HSStakeTable<SeqTypes>, success_threshold: U256, ) -> Pin<Box<dyn Future<Output = Result<Leaf2>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetch the leaf at the given height, retrying on transient errors.

Source

fn fetch_accounts<'life0, 'life1, 'async_trait>( &'life0 self, instance: &'life1 NodeState, height: u64, view: ViewNumber, fee_merkle_tree_root: FeeMerkleCommitment, accounts: Vec<FeeAccount>, ) -> Pin<Box<dyn Future<Output = Result<Vec<FeeAccountProof>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch the given list of accounts, retrying on transient errors.

Source

fn remember_blocks_merkle_tree<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, instance: &'life1 NodeState, height: u64, view: ViewNumber, mt: &'life2 mut BlockMerkleTree, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Fetch and remember the blocks frontier, retrying on transient errors.

Source

fn fetch_chain_config<'life0, 'async_trait>( &'life0 self, commitment: Commitment<ChainConfig>, ) -> Pin<Box<dyn Future<Output = Result<ChainConfig>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetch the chain config, retrying on transient errors.

Source

fn fetch_reward_accounts<'life0, 'life1, 'async_trait>( &'life0 self, instance: &'life1 NodeState, height: u64, view: ViewNumber, reward_merkle_tree_root: RewardMerkleCommitment, accounts: Vec<RewardAccount>, ) -> Pin<Box<dyn Future<Output = Result<Vec<RewardAccountProof>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch the given list of reward accounts, retrying on transient errors.

Implementations on Foreign Types§

Source§

impl<T: StateCatchup + ?Sized> StateCatchup for Arc<T>

Source§

fn try_fetch_leaf<'life0, 'async_trait>( &'life0 self, retry: usize, height: u64, stake_table: HSStakeTable<SeqTypes>, success_threshold: U256, ) -> Pin<Box<dyn Future<Output = Result<Leaf2>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn fetch_leaf<'life0, 'async_trait>( &'life0 self, height: u64, stake_table: HSStakeTable<SeqTypes>, success_threshold: U256, ) -> Pin<Box<dyn Future<Output = Result<Leaf2>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn try_fetch_accounts<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, retry: usize, instance: &'life1 NodeState, height: u64, view: ViewNumber, fee_merkle_tree_root: FeeMerkleCommitment, accounts: &'life2 [FeeAccount], ) -> Pin<Box<dyn Future<Output = Result<Vec<FeeAccountProof>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn fetch_accounts<'life0, 'life1, 'async_trait>( &'life0 self, instance: &'life1 NodeState, height: u64, view: ViewNumber, fee_merkle_tree_root: FeeMerkleCommitment, accounts: Vec<FeeAccount>, ) -> Pin<Box<dyn Future<Output = Result<Vec<FeeAccountProof>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn try_remember_blocks_merkle_tree<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, retry: usize, instance: &'life1 NodeState, height: u64, view: ViewNumber, mt: &'life2 mut BlockMerkleTree, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn remember_blocks_merkle_tree<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, instance: &'life1 NodeState, height: u64, view: ViewNumber, mt: &'life2 mut BlockMerkleTree, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn try_fetch_chain_config<'life0, 'async_trait>( &'life0 self, retry: usize, commitment: Commitment<ChainConfig>, ) -> Pin<Box<dyn Future<Output = Result<ChainConfig>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn fetch_chain_config<'life0, 'async_trait>( &'life0 self, commitment: Commitment<ChainConfig>, ) -> Pin<Box<dyn Future<Output = Result<ChainConfig>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn try_fetch_reward_accounts<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, retry: usize, instance: &'life1 NodeState, height: u64, view: ViewNumber, reward_merkle_tree_root: RewardMerkleCommitment, accounts: &'life2 [RewardAccount], ) -> Pin<Box<dyn Future<Output = Result<Vec<RewardAccountProof>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn fetch_reward_accounts<'life0, 'life1, 'async_trait>( &'life0 self, instance: &'life1 NodeState, height: u64, view: ViewNumber, reward_merkle_tree_root: RewardMerkleCommitment, accounts: Vec<RewardAccount>, ) -> Pin<Box<dyn Future<Output = Result<Vec<RewardAccountProof>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn backoff(&self) -> &BackoffParams

Source§

fn name(&self) -> String

Source§

fn is_local(&self) -> bool

Implementors§