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§
sourceconst WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str
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.
sourceconst MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce
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.
sourceconst MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce
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§
sourcefn maximal_incoming_message_dispatch_weight() -> Weight
fn maximal_incoming_message_dispatch_weight() -> Weight
Return maximal dispatch weight of the message we’re able to receive.
sourcefn maximal_incoming_message_size() -> u32
fn maximal_incoming_message_size() -> u32
Return maximal size of the message we’re able to receive.