@@ -14,10 +14,10 @@ capability, chains that implement `IBC-rs` may bring various concerns and
14
14
characteristics than Tendermint chains leading to different ways for upgrading
15
15
their clients. However there are general rules that apply to all and can serve
16
16
as a framework for any ` IBC-rs ` implementation. On this basis, this record aims
17
- to justify the logic behind upgrading a light client, determine the boundary
18
- between client-wide and client-specific upgrade processes, list requisites for
19
- validation and execution steps , and explain Tendermint's upgrade client
20
- implementation within the
17
+ to justify the chain-wide logic behind upgrading light clients, list requisites
18
+ for validation and execution steps, determine the boundary between basic and
19
+ message-specific validations by an IBC handler , and explain Tendermint's upgrade
20
+ client implementation within the
21
21
[ ics07_tendermint] ( ../../crates/ibc/src/clients/ics07_tendermint ) .
22
22
23
23
## Decision
@@ -46,18 +46,18 @@ implementation of this rationale in `IBC-rs` is explained.
46
46
* It is ** UP TO** the chain's architecture how updated client and consensus
47
47
states are committed, either through decentralized approaches, like governance
48
48
or centralized methods, like a multisig account, etc.
49
- * Upon commitment, chain's store ** MUST** contain updated client and consensus
49
+ * Upon commitment, chain's store ** MUST** contain upgraded client and consensus
50
50
states, which can be retrieved using respective upgrade paths
51
51
52
52
#### IBC Handler accepts upgrade?
53
53
54
54
After ensuring that the chain upgrades is supported by IBC, the general
55
55
validation and execution steps that apply to all chains are as follows. The
56
- criteria for classifying a validation as client-wide (also can be known as
57
- basic) or client-specific was whether that IBC handler can perform that action
58
- just using its own context data, which are available upon calling interfaces
59
- provided by ` ClientState ` and ` ConsensusState ` traits, like ` is_frozen() ` ,
60
- ` latest_height() ` , etc.
56
+ criteria for classifying a validation as basic or message-specific was whether
57
+ that IBC handler can perform that action , regardless of knowing the message
58
+ content, just using its own context data that are available upon calling
59
+ provided interfaces by ` ClientState ` and ` ConsensusState ` traits, like
60
+ ` is_frozen() ` , ` latest_height() ` , etc.
61
61
62
62
* Latest client state ** MUST NOT** be frozen
63
63
* Received update message including verification proofs ** MUST** successfully be
@@ -66,6 +66,8 @@ provided by `ClientState` and `ConsensusState` traits, like `is_frozen()`,
66
66
current revision which is somehow encoded in the proof verification process.
67
67
This prevents premature upgrades, as the counterparty may cancel or modify
68
68
upgrade plans before the last planned height.
69
+ * Latest consensus state ** MUST** be within the trusting period of the latest
70
+ client state, which for clients without a trusting period is always true.
69
71
70
72
Any other requisite beyond the above rules are considered client-specific. Next,
71
73
we go through the upgrade process for Tendermint clients to justify the logic
@@ -121,7 +123,9 @@ supported by `IBC-rs`:
121
123
An IBC-connected Tendermint chain will take the following steps to completely
122
124
upgrade its own chain and counterparty's IBC client. Note that the chain-level
123
125
upgrade instruction (1) is not a part of the IBC protocol. It is provided for
124
- the sake of the big picture and as an example of how the upgrade process can be.
126
+ the sake of the big picture and as a reference to follow the upgrade process
127
+ from the very beginning when a proposal is initiated to when the upgrade message
128
+ is entirely handled.
125
129
126
130
1 . Upgrade chain through governance
127
131
1 . Create a 02-client
@@ -147,17 +151,21 @@ the sake of the big picture and as an example of how the upgrade process can be.
147
151
upgrade/UpgradedIBCState/{upgradeHeight}/upgradedConsState
148
152
```
149
153
154
+ Notice that since the `UpgradedConsensusState` will not be available at
155
+ the upgrade path prior to this height, relayers cannot submit a valid
156
+ upgrade message as the proof verification would fail
157
+
150
158
2. Submit an upgrade client message by relayers to the counterparty chain
151
159
1. Wait for the upgrading chain to reach the upgrade height and halt
152
160
2. Query a full node for the proofs of `UpgradedClient` and
153
161
`UpgradedConsensusState` at the last height of the old chain
154
162
3. Update the counterparty client to the last height of the old chain using
155
163
the `UpdateClient` msg
156
- 4. Submit an `UpgradeClient` msg to the counterparty chain with the
164
+ 4. Submit a `MsgUpgradeClient` message to the counterparty chain with the
157
165
`UpgradedClient`, `UpgradedConsensusState` and their respective proofs
158
166
159
167
3. Process the upgrade message on the counterparty chain upon receiving a
160
- `MsgUpgradeClient` message performs basic validations (BV), client -specific
168
+ `MsgUpgradeClient` message performs basic validations (BV), message -specific
161
169
validations (SV) and lastly execution (E) steps as follows:
162
170
1. (BV) Check that the current client is not frozen
163
171
2. (BV) Check if the latest consensus state is within the trust period
@@ -189,7 +197,7 @@ validations (SV) and lastly execution (E) steps as follows:
189
197
the connection can be used for relaying packets, relayers must submit an
190
198
`UpdateClientMsg` with a header from the new chain.
191
199
192
- 4 . Submit an `UpdateClient` msg by a relayer to the counterparty chain with a
200
+ 1 . Submit an `UpdateClient` msg by a relayer to the counterparty chain with a
193
201
header from the newly upgraded chain
194
202
195
203
#### Decisions
0 commit comments