Skip to content

Commit 0277bc9

Browse files
authored
chore: recover expired shido ibc light client (#597)
1 parent 911b883 commit 0277bc9

5 files changed

Lines changed: 21 additions & 3 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Recover expired Shido IBC light client, `07-tendermint-106``07-tendermint-186` ([#597](https://github.com/noble-assets/noble/pull/597))

app.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ func (app *App) RegisterUpgradeHandler() error {
478478
app.AccountKeeper.AddressCodec(),
479479
app.AuthorityKeeper,
480480
app.BankKeeper,
481+
app.IBCKeeper.ClientKeeper,
481482
app.DollarKeeper,
482483
),
483484
)

e2e/upgrade_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TestChainUpgrade(t *testing.T) {
2727
t.Skip("skipping test in short mode.")
2828
}
2929

30-
genesisVersion := "v10.1.0"
30+
genesisVersion := "v10.1.1"
3131

3232
upgrades := []e2e.ChainUpgrade{
3333
{

e2e/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ func modifyGenesisAll(nw *NobleWrapper, setupAllCircleRoles bool) func(cc ibc.Ch
186186
}
187187

188188
// Modify the genesis file with the appropriate Dollar Vaults Season One and Two state.
189-
// For v10.1.0, we opt to not set this state as these values were hardcoded in the app wiring!
190-
if cc.Images[0].Version != "v10.1.0" {
189+
// For v10.1, we opt to not set this state as these values were hardcoded in the app wiring!
190+
if cc.Images[0].Version != "v10.1.1" {
191191
updatedGenesis = append(updatedGenesis, cosmos.NewGenesisKV("app_state.dollar.vaults.season_one_ended", true))
192192
updatedGenesis = append(updatedGenesis, cosmos.NewGenesisKV("app_state.dollar.vaults.season_two_yield_collector", nw.Authority.FormattedAddress()))
193193
}

upgrade/upgrade.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"github.com/cosmos/cosmos-sdk/types/module"
2929
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
3030
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
31+
clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper"
3132
authoritykeeper "github.com/noble-assets/authority/keeper"
3233
)
3334

@@ -38,9 +39,12 @@ func CreateUpgradeHandler(
3839
addressCodec address.Codec,
3940
authorityKeeper *authoritykeeper.Keeper,
4041
bankKeeper bankkeeper.Keeper,
42+
clientKeeper clientkeeper.Keeper,
4143
dollarKeeper *dollarkeeper.Keeper,
4244
) upgradetypes.UpgradeHandler {
4345
return func(ctx context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
46+
sdkCtx := sdk.UnwrapSDKContext(ctx)
47+
4448
vm, err := mm.RunMigrations(ctx, cfg, vm)
4549
if err != nil {
4650
return vm, err
@@ -56,6 +60,18 @@ func CreateUpgradeHandler(
5660
return vm, err
5761
}
5862

63+
// The IBC light client for the shido_9008-1 chain has expired on
64+
// Noble's mainnet. In IBC-Go v8.7.0, the MsgRecoverClient message does
65+
// not support the LegacyAminoJSON signing mode, preventing recovery
66+
// via the Noble Maintenance Multisig. As a result, the client must be
67+
// manually recovered as part of this software upgrade.
68+
if sdkCtx.ChainID() == MainnetChainID {
69+
err = clientKeeper.RecoverClient(sdkCtx, "07-tendermint-106", "07-tendermint-186")
70+
if err != nil {
71+
logger.Error("unable to recover shido_9008-1 light client", "err", err)
72+
}
73+
}
74+
5975
logger.Info(UpgradeASCII)
6076

6177
return vm, nil

0 commit comments

Comments
 (0)