diff --git a/bridges/modules/message-lane/src/lib.rs b/bridges/modules/message-lane/src/lib.rs index 8fcc1ce5ae..0404fecd5c 100644 --- a/bridges/modules/message-lane/src/lib.rs +++ b/bridges/modules/message-lane/src/lib.rs @@ -66,10 +66,16 @@ pub trait Trait: frame_system::Trait { /// confirmed. The reason is that if you want to use lane, you should be ready to pay /// for it. type MaxMessagesToPruneAtOnce: Get; - /// Maximal number of messages in the 'unconfirmed' state at inbound lane. Unconfirmed - /// message at inbound lane is the message that has been: sent, delivered and dispatched. - /// Its delivery confirmation is still pending. This limit is introduced to bound maximal - /// number of relayers-ids in the inbound lane state. + /// Maximal number of "messages" (see note below) in the 'unconfirmed' state at inbound lane. + /// Unconfirmed message at inbound lane is the message that has been: sent, delivered and + /// dispatched. Its delivery confirmation is still pending. This limit is introduced to bound + /// maximal number of relayers-ids in the inbound lane state. + /// + /// "Message" in this context does not necessarily mean an individual message, but instead + /// continuous range of individual messages, that are delivered by single relayer. So if relayer#1 + /// has submitted delivery transaction#1 with individual messages [1; 2] and then delivery + /// transaction#2 with individual messages [3; 4], this would be treated as single "Message" and + /// would occupy single unit of `MaxUnconfirmedMessagesAtInboundLane` limit. type MaxUnconfirmedMessagesAtInboundLane: Get; /// Payload type of outbound messages. This payload is dispatched on the bridged chain. diff --git a/bridges/primitives/message-lane/src/lib.rs b/bridges/primitives/message-lane/src/lib.rs index 75c627e9e5..672ba719b9 100644 --- a/bridges/primitives/message-lane/src/lib.rs +++ b/bridges/primitives/message-lane/src/lib.rs @@ -136,5 +136,7 @@ decl_runtime_apis! { pub trait InboundLaneApi { /// Returns nonce of the latest message, received by given lane. fn latest_received_nonce(lane: LaneId) -> MessageNonce; + /// Nonce of latest message that has been confirmed to the bridged chain. + fn latest_confirmed_nonce(lane: LaneId) -> MessageNonce; } }