Crate pallet_bridge_messages
source ·Expand description
Runtime module that allows sending and receiving messages using lane concept:
- the message is sent using
send_message()
call; - every outbound message is assigned nonce;
- the messages are stored in the storage;
- external component (relay) delivers messages to bridged chain;
- messages are processed in order (ordered by assigned nonce);
- relay may send proof-of-delivery back to this chain.
Once message is sent, its progress can be tracked by looking at module events.
The assigned nonce is reported using MessageAccepted
event. When message is
delivered to the the bridged chain, it is reported using MessagesDelivered
event.
IMPORTANT NOTE: after generating weights (custom WeighInfo
implementation) for
your runtime (where this module is plugged to), please add test for these weights.
The test should call the ensure_weights_are_correct
function from this module.
If this test fails with your weights, then either weights are computed incorrectly,
or some benchmarks assumptions are broken for your runtime.
Re-exports§
pub use weights::WeightInfo;
pub use pallet::*;
Modules§
- Messages pallet benchmarking.
- Helpers for generating message storage proofs, that are used by tests and by benchmarks.
- A module that is responsible for migration of storage.
- The
pallet
module in each FRAME pallet hosts the most important items needed to construct this pallet. - Autogenerated weights for pallet_bridge_messages
Structs§
- Helper struct that provides methods for working with a call supported by
MessagesCallInfo
. - Inbound messages lane.
- Message lanes manager.
- Outbound messages lane.
- Runtime inbound lane storage.
- Runtime outbound lane storage.
- Structure, containing a validated message payload and all the info required to send it on the bridge.
- Inbound lane data wrapper that implements
MaxEncodedLen
.
Enums§
- Lanes manager errors.
- Result of messages receival confirmation.
Constants§
- Size of the message being delivered in benchmarks.
- Number of extra bytes (excluding size of storage value itself) of storage proof. This mostly depends on number of entries (and their density) in the storage trie. Some reserve is reserved to account future chain growth.
- The target that will be used when publishing logs related to this pallet.
Traits§
- Trait representing a call that is a sub type of
pallet_bridge_messages::Call
. - Inbound lane storage.
- Outbound lane storage.
- Extended weight info.
Functions§
- Ensure that we’re able to receive maximal confirmation from other chain.
- Ensure that we’re able to receive maximal (by-size and by-weight) message from other chain.
- Ensure that we are able to dispatch maximal size messages.
- Ensure that weights from
WeightInfoExt
implementation are looking correct.
Type Aliases§
- Outbound message data wrapper that implements
MaxEncodedLen
.