Repository navigation
Commit 299613c
authored
Remove IBC leftovers and delete retired IBC stores at v6.8 (#4337)
After the IBC modules were unwired, the chain still carried their
leftovers: the `capability`, `ibc` and `transfer` stores stayed mounted,
`app/retiredibc` intercepted `/store/ibc/*` raw queries and kept
decode-only codecs for the historical `/ibc.core.client.v1.*` governance
proposals, the transfer module account kept minter/burner permissions,
and seidb tooling and docs still listed the IBC stores. IBC is never
coming back, so none of this compatibility layer should survive.
This PR removes that layer and cleans the persisted state at the v6.8
boundary. The `capability`, `ibc` and `transfer` stores are unmounted
from both `app.App` and the wasmd test app and are deleted alongside
`oracle` through the v6.8 `UpgradeStoreLoader`, with their
module-version entries dropped by the handler. Mainnet holds four passed
IBC governance proposals whose `Any` content can no longer be decoded
once the codecs go, which would break `IterateProposals` and genesis
export, so `rewriteRetiredIBCProposals` rewrites any proposal with a
`/ibc.` type URL in place as a `TextProposal`, reading title and
description from the raw protobuf bytes with `protowire` and leaving
IDs, status, deposits, votes and queue entries untouched.
`pruneUpgradedIBCState` removes the `upgradedIBCState/*` keys from the
upgrade store. Bank balances and supply are deliberately not touched:
the 96 `ibc/*` voucher denominations on mainnet remain ordinary bank
coins. Two things are kept on purpose. The IBC precompile at `0x1009`
stays registered, in both the regular and Giga fail-fast engines, as a
tombstone that reverts every call, because deleting it would turn the
address into an empty account where low-level calls succeed and value
gets stranded. The deterministic `transfer` module address stays in the
bank blocked-address set through `retiredModuleAccounts`, without any
module or permissions behind it, so nothing can be sent to an account no
key or module can spend from.
This is a consensus-affecting state migration and reviewers should focus
on the v6.8 handler and the store loader. Coverage is in
`app/upgrade_v68_test.go` (module versions, proposal rewrite,
upgrade-state pruning, second application is a no-op) and the offline
v6.8 source/target fixtures, which seed the four deleted stores, an IBC
proposal, an upgraded-IBC-state key and an `ibc/*` voucher, then assert
physical tree deletion after reopen, crash/replay hash equality, the
rewritten proposal, the pruned keys, a successful post-upgrade bank send
of the voucher, and that every other key of the retained `bank`, `gov`
and `upgrade` stores is unchanged apart from the entries the upgrade
block is specified to touch. `make upgrade-test`, `make
upgrade-test-vet`, `make upgrade-test-offline FROM_REF=release/v6.7` and
`make lint` pass.
The proposal rewrite runs before `RunMigrations` so no module migration
can walk the gov store while the four
`/ibc.core.client.v1.ClientUpdateProposal` records are still
undecodable. It keeps title and description and drops the client fields,
recorded here so the loss is explicit rather than silent: proposal 52
`subject_client_id=07-tendermint-44`
`substitute_client_id=07-tendermint-112`; 81 `07-tendermint-120` /
`07-tendermint-131`; 100 `07-tendermint-135` / `07-tendermint-146`; 119
`07-tendermint-12` / `07-tendermint-168`. After this upgrade v6.8 nodes
cannot answer gov state queries at pre-v6.8 heights for those four
proposals, nor any other pre-retirement IBC history; that is served by
v6.6 freeze nodes, and the README states so.1 parent 7f94d23 commit 299613c
31 files changed
Lines changed: 619 additions & 1589 deletions
File tree
- app
- retiredibc
- gov
- testdata
- docs
- evmrpc/tests
- precompiles/gov
- proto/ibc/core/client/v1
- scripts
- sei-cosmos/x/gov
- sei-db
- common/keys
- tools/cmd/seidb/operations
- sei-wasmd/app
- tools/utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
173 | | - | |
174 | | - | |
175 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
| |||
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
104 | | - | |
105 | | - | |
106 | 103 | | |
107 | 104 | | |
108 | 105 | | |
| |||
221 | 218 | | |
222 | 219 | | |
223 | 220 | | |
224 | | - | |
225 | 221 | | |
226 | 222 | | |
227 | 223 | | |
| |||
230 | 226 | | |
231 | 227 | | |
232 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| |||
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
242 | | - | |
243 | | - | |
| 243 | + | |
| 244 | + | |
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
| |||
275 | 276 | | |
276 | 277 | | |
277 | 278 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
283 | 282 | | |
284 | 283 | | |
285 | 284 | | |
| |||
457 | 456 | | |
458 | 457 | | |
459 | 458 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | 459 | | |
469 | 460 | | |
470 | 461 | | |
| |||
781 | 772 | | |
782 | 773 | | |
783 | 774 | | |
784 | | - | |
785 | 775 | | |
786 | 776 | | |
787 | 777 | | |
| |||
1140 | 1130 | | |
1141 | 1131 | | |
1142 | 1132 | | |
1143 | | - | |
| 1133 | + | |
1144 | 1134 | | |
1145 | 1135 | | |
1146 | 1136 | | |
| |||
1169 | 1159 | | |
1170 | 1160 | | |
1171 | 1161 | | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
1179 | | - | |
| 1162 | + | |
1180 | 1163 | | |
1181 | 1164 | | |
1182 | 1165 | | |
| |||
2433 | 2416 | | |
2434 | 2417 | | |
2435 | 2418 | | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
2436 | 2422 | | |
2437 | 2423 | | |
2438 | 2424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
| |||
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
32 | | - | |
33 | 30 | | |
34 | 31 | | |
35 | 32 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments