pub trait TargetClient<P: ParachainsPipeline>: RelayClient {
type TransactionTracker: TransactionTracker<HeaderId = HeaderIdOf<P::TargetChain>>;
// Required methods
fn best_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HeaderIdOf<P::TargetChain>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn best_finalized_source_relay_chain_block<'life0, 'life1, 'async_trait>(
&'life0 self,
at_block: &'life1 HeaderIdOf<P::TargetChain>,
) -> Pin<Box<dyn Future<Output = Result<HeaderIdOf<P::SourceRelayChain>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn free_source_relay_headers_interval<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<BlockNumberOf<P::SourceRelayChain>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn parachain_head<'life0, 'async_trait>(
&'life0 self,
at_block: HeaderIdOf<P::TargetChain>,
) -> Pin<Box<dyn Future<Output = Result<Option<(HeaderIdOf<P::SourceRelayChain>, HeaderIdOf<P::SourceParachain>)>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn submit_parachain_head_proof<'life0, 'async_trait>(
&'life0 self,
at_source_block: HeaderIdOf<P::SourceRelayChain>,
para_head_hash: ParaHash,
proof: ParaHeadsProof,
is_free_execution_expected: bool,
) -> Pin<Box<dyn Future<Output = Result<Self::TransactionTracker, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Target client used in parachain heads synchronization loop.
Required Associated Types§
sourcetype TransactionTracker: TransactionTracker<HeaderId = HeaderIdOf<P::TargetChain>>
type TransactionTracker: TransactionTracker<HeaderId = HeaderIdOf<P::TargetChain>>
Transaction tracker to track submitted transactions.
Required Methods§
sourcefn best_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HeaderIdOf<P::TargetChain>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn best_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HeaderIdOf<P::TargetChain>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get best block id.
sourcefn best_finalized_source_relay_chain_block<'life0, 'life1, 'async_trait>(
&'life0 self,
at_block: &'life1 HeaderIdOf<P::TargetChain>,
) -> Pin<Box<dyn Future<Output = Result<HeaderIdOf<P::SourceRelayChain>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn best_finalized_source_relay_chain_block<'life0, 'life1, 'async_trait>(
&'life0 self,
at_block: &'life1 HeaderIdOf<P::TargetChain>,
) -> Pin<Box<dyn Future<Output = Result<HeaderIdOf<P::SourceRelayChain>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get best finalized source relay chain block id. If free_source_relay_headers_interval
is Some(_)
, the returned
sourcefn free_source_relay_headers_interval<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<BlockNumberOf<P::SourceRelayChain>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn free_source_relay_headers_interval<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<BlockNumberOf<P::SourceRelayChain>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get free source relay headers submission interval, if it is configured in the target runtime. We assume that the target chain will accept parachain header, proved at such relay header for free.
sourcefn parachain_head<'life0, 'async_trait>(
&'life0 self,
at_block: HeaderIdOf<P::TargetChain>,
) -> Pin<Box<dyn Future<Output = Result<Option<(HeaderIdOf<P::SourceRelayChain>, HeaderIdOf<P::SourceParachain>)>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn parachain_head<'life0, 'async_trait>(
&'life0 self,
at_block: HeaderIdOf<P::TargetChain>,
) -> Pin<Box<dyn Future<Output = Result<Option<(HeaderIdOf<P::SourceRelayChain>, HeaderIdOf<P::SourceParachain>)>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get parachain head id at given block.
sourcefn submit_parachain_head_proof<'life0, 'async_trait>(
&'life0 self,
at_source_block: HeaderIdOf<P::SourceRelayChain>,
para_head_hash: ParaHash,
proof: ParaHeadsProof,
is_free_execution_expected: bool,
) -> Pin<Box<dyn Future<Output = Result<Self::TransactionTracker, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_parachain_head_proof<'life0, 'async_trait>(
&'life0 self,
at_source_block: HeaderIdOf<P::SourceRelayChain>,
para_head_hash: ParaHash,
proof: ParaHeadsProof,
is_free_execution_expected: bool,
) -> Pin<Box<dyn Future<Output = Result<Self::TransactionTracker, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submit parachain heads proof.
Object Safety§
This trait is not object safe.