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§
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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 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.
Sourcefn is_local(&self) -> bool
fn is_local(&self) -> bool
Returns true if the catchup provider is local (e.g. does not make calls to remote resources).
Sourcefn backoff(&self) -> &BackoffParams
fn backoff(&self) -> &BackoffParams
Returns the backoff parameters for the catchup provider.
Provided Methods§
Sourcefn 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_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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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_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.
Sourcefn 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,
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.