@@ -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
+ upgrade-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,17 @@ 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 upgrade-specific was whether
57
+ that IBC handler can perform that check just using its own contextual data,
58
+ which are available upon calling interfaces provided by ` ClientState ` and
59
+ ` ConsensusState ` traits, like ` is_frozen() ` , ` latest_height() ` , etc.
61
60
62
61
* Latest client state ** MUST NOT** be frozen
63
62
* Received update message including verification proofs ** MUST** successfully be
@@ -66,6 +65,8 @@ provided by `ClientState` and `ConsensusState` traits, like `is_frozen()`,
66
65
current revision which is somehow encoded in the proof verification process.
67
66
This prevents premature upgrades, as the counterparty may cancel or modify
68
67
upgrade plans before the last planned height.
68
+ * Latest consensus state ** MUST** be within the trusting period of the latest
69
+ client state, which for clients without a trusting period is not applicable.
69
70
70
71
Any other requisite beyond the above rules are considered client-specific. Next,
71
72
we go through the upgrade process for Tendermint clients to justify the logic
@@ -121,7 +122,9 @@ supported by `IBC-rs`:
121
122
An IBC-connected Tendermint chain will take the following steps to completely
122
123
upgrade its own chain and counterparty's IBC client. Note that the chain-level
123
124
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.
125
+ the sake of the big picture and as a reference to follow the upgrade process
126
+ from the very beginning when a proposal is initiated to when the upgrade message
127
+ is entirely handled.
125
128
126
129
1 . Upgrade chain through governance
127
130
1 . Create a 02-client
@@ -147,17 +150,21 @@ the sake of the big picture and as an example of how the upgrade process can be.
147
150
upgrade/UpgradedIBCState/{upgradeHeight}/upgradedConsState
148
151
```
149
152
153
+ Notice that since the `UpgradedConsensusState` will not be available at
154
+ the upgrade path prior to this height, relayers cannot submit a valid
155
+ upgrade message as the proof verification would fail
156
+
150
157
2. Submit an upgrade client message by relayers to the counterparty chain
151
158
1. Wait for the upgrading chain to reach the upgrade height and halt
152
159
2. Query a full node for the proofs of `UpgradedClient` and
153
160
`UpgradedConsensusState` at the last height of the old chain
154
161
3. Update the counterparty client to the last height of the old chain using
155
162
the `UpdateClient` msg
156
- 4. Submit an `UpgradeClient` msg to the counterparty chain with the
163
+ 4. Submit a `MsgUpgradeClient` message to the counterparty chain with the
157
164
`UpgradedClient`, `UpgradedConsensusState` and their respective proofs
158
165
159
166
3. Process the upgrade message on the counterparty chain upon receiving a
160
- `MsgUpgradeClient` message performs basic validations (BV), client -specific
167
+ `MsgUpgradeClient` message performs basic validations (BV), upgrade -specific
161
168
validations (SV) and lastly execution (E) steps as follows:
162
169
1. (BV) Check that the current client is not frozen
163
170
2. (BV) Check if the latest consensus state is within the trust period
0 commit comments