Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/unreleased/improvements/597-shido-client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Recover expired Shido IBC light client, `07-tendermint-106` → `07-tendermint-186` ([#597](https://github.com/noble-assets/noble/pull/597))
1 change: 1 addition & 0 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ func (app *App) RegisterUpgradeHandler() error {
app.AccountKeeper.AddressCodec(),
app.AuthorityKeeper,
app.BankKeeper,
app.IBCKeeper.ClientKeeper,
app.DollarKeeper,
),
)
Expand Down
2 changes: 1 addition & 1 deletion e2e/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestChainUpgrade(t *testing.T) {
t.Skip("skipping test in short mode.")
}

genesisVersion := "v10.1.0"
genesisVersion := "v10.1.1"

upgrades := []e2e.ChainUpgrade{
{
Expand Down
4 changes: 2 additions & 2 deletions e2e/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ func modifyGenesisAll(nw *NobleWrapper, setupAllCircleRoles bool) func(cc ibc.Ch
}

// Modify the genesis file with the appropriate Dollar Vaults Season One and Two state.
// For v10.1.0, we opt to not set this state as these values were hardcoded in the app wiring!
if cc.Images[0].Version != "v10.1.0" {
// For v10.1, we opt to not set this state as these values were hardcoded in the app wiring!
if cc.Images[0].Version != "v10.1.1" {
updatedGenesis = append(updatedGenesis, cosmos.NewGenesisKV("app_state.dollar.vaults.season_one_ended", true))
updatedGenesis = append(updatedGenesis, cosmos.NewGenesisKV("app_state.dollar.vaults.season_two_yield_collector", nw.Authority.FormattedAddress()))
}
Expand Down
16 changes: 16 additions & 0 deletions upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper"
authoritykeeper "github.com/noble-assets/authority/keeper"
)

Expand All @@ -38,9 +39,12 @@ func CreateUpgradeHandler(
addressCodec address.Codec,
authorityKeeper *authoritykeeper.Keeper,
bankKeeper bankkeeper.Keeper,
clientKeeper clientkeeper.Keeper,
dollarKeeper *dollarkeeper.Keeper,
) upgradetypes.UpgradeHandler {
return func(ctx context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
sdkCtx := sdk.UnwrapSDKContext(ctx)

vm, err := mm.RunMigrations(ctx, cfg, vm)
if err != nil {
return vm, err
Expand All @@ -56,6 +60,18 @@ func CreateUpgradeHandler(
return vm, err
}

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

logger.Info(UpgradeASCII)

return vm, nil
Expand Down