referrerpolicy=no-referrer-when-downgrade

Trait bp_messages::ChainWithMessages

source ·
pub trait ChainWithMessages: Chain {
    const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str;
    const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce;
    const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce;

    // Provided methods
    fn maximal_incoming_message_dispatch_weight() -> Weight { ... }
    fn maximal_incoming_message_size() -> u32 { ... }
}
Expand description

Substrate-based chain with messaging support.

Required Associated Constants§

source

const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str

Name of the bridge messages pallet (used in construct_runtime macro call) that is deployed at some other chain to bridge with this ChainWithMessages.

We assume that all chains that are bridging with this ChainWithMessages are using the same name.

source

const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce

Maximal number of unrewarded relayers in a single confirmation transaction at this ChainWithMessages. Unrewarded means that the relayer has delivered messages, but either confirmations haven’t been delivered back to the source chain, or we haven’t received reward confirmations yet.

This constant limits maximal number of entries in the InboundLaneData::relayers. Keep in mind that the same relayer account may take several (non-consecutive) entries in this set.

source

const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce

Maximal number of unconfirmed messages in a single confirmation transaction at this ChainWithMessages. Unconfirmed means that the message has been delivered, but either confirmations haven’t been delivered back to the source chain, or we haven’t received reward confirmations for these messages yet.

This constant limits difference between last message from last entry of the InboundLaneData::relayers and first message at the first entry.

There is no point of making this parameter lesser than MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, because then maximal number of relayer entries will be limited by maximal number of messages.

This value also represents maximal number of messages in single delivery transaction. Transaction that is declaring more messages than this value, will be rejected. Even if these messages are from different lanes.

Provided Methods§

source

fn maximal_incoming_message_dispatch_weight() -> Weight

Return maximal dispatch weight of the message we’re able to receive.

source

fn maximal_incoming_message_size() -> u32

Return maximal size of the message we’re able to receive.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> ChainWithMessages for T
where T: Chain + UnderlyingChainProvider, UnderlyingChainOf<T>: ChainWithMessages,

source§

const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = UnderlyingChainOf<T>::WITH_CHAIN_MESSAGES_PALLET_NAME

source§

const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = UnderlyingChainOf<T>::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX

source§

const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = UnderlyingChainOf<T>::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX