pub trait RelayChainInterface: Send + Sync {
Show 15 methods fn get_storage_by_key<'life0, 'life1, 'async_trait>(
        &'life0 self,
        relay_parent: PHash,
        key: &'life1 [u8]
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<Option<StorageValue>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; fn validators<'life0, 'async_trait>(
        &'life0 self,
        block_id: PHash
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<Vec<ValidatorId>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn best_block_hash<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<PHash>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn retrieve_dmq_contents<'life0, 'async_trait>(
        &'life0 self,
        para_id: ParaId,
        relay_parent: PHash
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<Vec<InboundDownwardMessage>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn retrieve_all_inbound_hrmp_channel_contents<'life0, 'async_trait>(
        &'life0 self,
        para_id: ParaId,
        relay_parent: PHash
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<BTreeMap<ParaId, Vec<InboundHrmpMessage>>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn persisted_validation_data<'life0, 'async_trait>(
        &'life0 self,
        block_id: PHash,
        para_id: ParaId,
        __arg3: OccupiedCoreAssumption
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<Option<PersistedValidationData>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn candidate_pending_availability<'life0, 'async_trait>(
        &'life0 self,
        block_id: PHash,
        para_id: ParaId
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<Option<CommittedCandidateReceipt>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn session_index_for_child<'life0, 'async_trait>(
        &'life0 self,
        block_id: PHash
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<SessionIndex>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn import_notification_stream<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<Pin<Box<dyn Stream<Item = PHeader> + Send>>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn new_best_notification_stream<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<Pin<Box<dyn Stream<Item = PHeader> + Send>>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn wait_for_block<'life0, 'async_trait>(
        &'life0 self,
        hash: PHash
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<()>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn finality_notification_stream<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<Pin<Box<dyn Stream<Item = PHeader> + Send>>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn is_major_syncing<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<bool>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn overseer_handle(&self) -> RelayChainResult<Option<OverseerHandle>>; fn prove_read<'life0, 'life1, 'async_trait>(
        &'life0 self,
        relay_parent: PHash,
        relevant_keys: &'life1 Vec<Vec<u8>>
    ) -> Pin<Box<dyn Future<Output = RelayChainResult<StorageProof>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
;
}
Expand description

Trait that provides all necessary methods for interaction between collator and relay chain.

Required Methods§

Fetch a storage item by key.

Fetch a vector of current validators.

Get the hash of the current best block.

Returns the whole contents of the downward message queue for the parachain we are collating for.

Returns None in case of an error.

Returns channels contents for each inbound HRMP channel addressed to the parachain we are collating for.

Empty channels are also included.

Yields the persisted validation data for the given ParaId along with an assumption that should be used if the para currently occupies a core.

Returns None if either the para is not registered or the assumption is Freed and the para already occupies a core.

Get the receipt of a candidate pending availability. This returns Some for any paras assigned to occupied cores in availability_cores and None otherwise.

Returns the session index expected at a child of the block.

Get a stream of import block notifications.

Get a stream of new best block notifications.

Wait for a block with a given hash in the relay chain.

This method returns immediately on error or if the block is already reported to be in chain. Otherwise, it waits for the block to arrive.

Get a stream of finality notifications.

Whether the synchronization service is undergoing major sync. Returns true if so.

Get a handle to the overseer.

Generate a storage read proof.

Implementations on Foreign Types§

Implementors§