You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/messages/README.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -43,10 +43,10 @@ Instead, it provides runtime-internal method that allows other pallets (or other
43
43
outbound messages.
44
44
45
45
The message "appears" when some runtime code calls the `send_message()` method of the pallet.
46
-
The submitter specifies the lane that he's willing to use and the message itself. If some fee must be
47
-
paid for sending the message, it must be paid outside of the pallet. If a message passes all checks
48
-
(that include, for example, message size check, disabled lane check, ...), the nonce is assigned and the
49
-
message is stored in the module storage. The message is in an "undelivered" state now.
46
+
The submitter specifies the lane that they're willing to use and the message itself. If some fee must
47
+
be paid for sending the message, it must be paid outside of the pallet. If a message passes all checks
48
+
(that include, for example, message size check, disabled lane check, ...), the nonce is assigned and
49
+
the message is stored in the module storage. The message is in an "undelivered" state now.
50
50
51
51
We assume that there are external, offchain actors, called relayers, that are submitting module
52
52
related transactions to both target and source chains. The pallet itself has no assumptions about
@@ -57,17 +57,17 @@ for details.
57
57
Eventually, some relayer would notice this message in the "undelivered" state and it would decide to
58
58
deliver this message. Relayer then crafts `receive_messages_proof()` transaction (aka delivery
59
59
transaction) for the messages module instance, deployed at the target chain. Relayer provides
60
-
his account id at the source chain, the proof of message (or several messages), the number of
60
+
its account id at the source chain, the proof of message (or several messages), the number of
61
61
messages in the transaction and their cumulative dispatch weight. Once a transaction is mined, the
62
62
message is considered "delivered".
63
63
64
64
Once a message is delivered, the relayer may want to confirm delivery back to the source chain.
65
-
There are two reasons why he would want to do that. The first is that we intentionally limit number
65
+
There are two reasons why it would want to do that. The first is that we intentionally limit number
66
66
of "delivered", but not yet "confirmed" messages at inbound lanes
67
67
(see [What about other Constants in the Messages Module Configuration Trait](#What-about-other-Constants-in-the-Messages-Module-Configuration-Trait) for explanation).
68
68
So at some point, the target chain may stop accepting new messages until relayers confirm some of
69
-
these. The second is that if the relayer wants to be rewarded for delivery, he must prove the fact
70
-
that he has actually delivered the message. And this proof may only be generated after the delivery
69
+
these. The second is that if the relayer wants to be rewarded for delivery, it must prove the fact
70
+
that it has actually delivered the message. And this proof may only be generated after the delivery
71
71
transaction is mined. So relayer crafts the `receive_messages_delivery_proof()` transaction (aka
72
72
confirmation transaction) for the messages module instance, deployed at the source chain. Once
73
73
this transaction is mined, the message is considered "confirmed".
@@ -84,8 +84,8 @@ relayer sometimes includes a nonce of the latest "confirmed" message in the next
84
84
As it has been said above, the messages module supports both outbound and inbound message lanes.
85
85
So if we will integrate a module in some runtime, it may act as the source chain runtime for
86
86
outbound messages and as the target chain runtime for inbound messages. In this section, we'll
87
-
sometimes refer to the chain we're currently integrating with, as this chain and the other chain as
88
-
bridged chain.
87
+
sometimes refer to the chain we're currently integrating with, as "this chain" and the other
88
+
chain as "bridged chain".
89
89
90
90
Messages module doesn't simply accept transactions that are claiming that the bridged chain has
91
91
some updated data for us. Instead of this, the module assumes that the bridged chain is able to
@@ -96,7 +96,7 @@ transaction proofs, Substrate header digests or anything else that may be proved
96
96
**IMPORTANT NOTE**: everything below in this chapter describes details of the messages module
97
97
configuration. But if you interested in well-probed and relatively easy integration of two
98
98
Substrate-based chains, you may want to look at the
99
-
[bridge-runtime-common](../../bin/runtime-common/README.md) crate. This crate is providing a lot of
99
+
[bridge-runtime-common](../../bin/runtime-common/) crate. This crate is providing a lot of
100
100
helpers for integration, which may be directly used from within your runtime. Then if you'll decide
101
101
to change something in this scheme, get back here for detailed information.
0 commit comments