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: docs/adr/XCall_IBC_Connection.md
+15-28
Original file line number
Diff line number
Diff line change
@@ -13,28 +13,25 @@ The sendMessage function is responsible for sending a message to a specified tar
13
13
14
14
The behavior of sendMessage depends on the value of sn (sequence number). If sn is greater than 0, it indicates a new message that requires a response. In this case, both the sending fee and the response fee should be included. If sn is 0, it signifies a one-way message where no response is expected. If sn is less than 0, it implies that the message is a response to a previously received message. In this scenario, no fee is included in the sending message since it should have already been paid when the positive sn was sent.
15
15
16
-
After handling the sn value, the sendMessage function triggers the handleMessage function on the targetNetwork. It passes targetNetwork, sn, and msg as arguments to handleMessage. The purpose of this function is to handle the incoming message on the specified targetNetwork's xCall contract.
16
+
After handling the sn value, the sendMessage function triggers the handleMessage function on the targetNetwork. It passes targetNetworkand msg as arguments to handleMessageon xCall.
17
17
18
-
In case the message fails to be delivered for any reason, the code triggers the handleError function. It passes sn, errorCode, and errorMessage to the function. The responsibility of this function is to handle errors that occur during the message delivery process.
18
+
In case the message fails to be delivered for any reason, the connection triggers the handleError function. It passes the failed sn to the function. The responsibility of this function is to handle errors that occur during the message delivery process.
19
19
20
20
The second external function, getFee(network, response), calculates and returns the fee required to send a message to the specified network and back. It takes into account the optional response parameter when determining the fee.
21
21
22
22
In summary, this code snippet illustrates a specific behavior expected from a connection regarding message sending and error handling.
Returns the fee required to send a message to "network" and back, considering the optional response parameter.
35
-
...
36
32
```
37
33
34
+
38
35
## General IBC Connection Design Overview
39
36
The IBC (Inter-Blockchain Communication) connection facilitates communication between different chains using IBC channels and ports. This connection relies on the administrator to associate network IDs with specific connections/ports. Once established, these properties become immutable and cannot be changed. Consequently, users can depend on the stability and reliability of a configured connection to another chain.
0 commit comments