@@ -32,19 +32,11 @@ import (
3232 bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
3333 clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper"
3434 authoritykeeper "github.com/noble-assets/authority/keeper"
35- orbiter "github.com/noble-assets/orbiter"
35+ "github.com/noble-assets/orbiter"
3636 orbitertypes "github.com/noble-assets/orbiter/types"
3737 orbitercore "github.com/noble-assets/orbiter/types/core"
3838)
3939
40- // orbiterCustomGen overriede the default module genesis to pause the Hyperlane forwarding.
41- func orbiterCustomGen (cdc codec.Codec ) json.RawMessage {
42- gen := orbitertypes .DefaultGenesisState ()
43- gen .ForwarderGenesis .PausedProtocolIds = append (gen .ForwarderGenesis .PausedProtocolIds , orbitercore .PROTOCOL_HYPERLANE )
44-
45- return cdc .MustMarshalJSON (gen )
46- }
47-
4840func CreateUpgradeHandler (
4941 mm * module.Manager ,
5042 cfg module.Configurator ,
@@ -69,21 +61,26 @@ func CreateUpgradeHandler(
6961 return vm , err
7062 }
7163
72- err = ClaimDistributionFunds (ctx , logger , addressCodec , authorityKeeper , bankKeeper )
64+ err = claimDistributionFunds (ctx , logger , addressCodec , authorityKeeper , bankKeeper )
7365 if err != nil {
7466 return vm , err
7567 }
7668
77- err = UpdateVaultsState (ctx , addressCodec , authorityKeeper , dollarKeeper )
69+ err = updateVaultsState (ctx , addressCodec , authorityKeeper , dollarKeeper )
7870 if err != nil {
7971 return vm , err
8072 }
8173
82- // The IBC light client for the shido_9008-1 chain has expired on
83- // Noble's mainnet. In IBC-Go v8.7.0, the MsgRecoverClient message does
84- // not support the LegacyAminoJSON signing mode, preventing recovery
85- // via the Noble Maintenance Multisig. As a result, the client must be
86- // manually recovered as part of this software upgrade.
74+ // The IBC light clients for both the router_9600-1 and shido_9008-1
75+ // chains have expired on Noble's mainnet. In IBC-Go v8.7.0, the
76+ // MsgRecoverClient message does not support the LegacyAminoJSON
77+ // signing mode, preventing recovery via the Noble Maintenance
78+ // Multisig. As a result, the client must be manually recovered as part
79+ // of this software upgrade.
80+ err = clientKeeper .RecoverClient (sdkCtx , "07-tendermint-136" , "07-tendermint-192" )
81+ if err != nil {
82+ logger .Error ("unabled to recover router_9600-1 light client" , "err" , err )
83+ }
8784 err = clientKeeper .RecoverClient (sdkCtx , "07-tendermint-106" , "07-tendermint-186" )
8885 if err != nil {
8986 logger .Error ("unable to recover shido_9008-1 light client" , "err" , err )
@@ -95,11 +92,19 @@ func CreateUpgradeHandler(
9592 }
9693}
9794
98- // ClaimDistributionFunds transfers all transaction fees accrued by Noble prior
95+ // orbiterCustomGen overrides the default module genesis to pause the Hyperlane forwarding.
96+ func orbiterCustomGen (cdc codec.Codec ) json.RawMessage {
97+ gen := orbitertypes .DefaultGenesisState ()
98+ gen .ForwarderGenesis .PausedProtocolIds = append (gen .ForwarderGenesis .PausedProtocolIds , orbitercore .PROTOCOL_HYPERLANE )
99+
100+ return cdc .MustMarshalJSON (gen )
101+ }
102+
103+ // claimDistributionFunds transfers all transaction fees accrued by Noble prior
99104// to the v8 Helium upgrade (November 2024) to the x/authority owner. The funds
100105// are currently stuck as the x/distribution module was removed and replaced by
101106// the x/authority module without a proper migration of funds.
102- func ClaimDistributionFunds (ctx context.Context , logger log.Logger , addressCodec address.Codec , authorityKeeper * authoritykeeper.Keeper , bankKeeper bankkeeper.Keeper ) error {
107+ func claimDistributionFunds (ctx context.Context , logger log.Logger , addressCodec address.Codec , authorityKeeper * authoritykeeper.Keeper , bankKeeper bankkeeper.Keeper ) error {
103108 // NOTE: We hardcode the x/distribution module name to avoid an import.
104109 address := authtypes .NewModuleAddress ("distribution" )
105110 balance := bankKeeper .GetAllBalances (ctx , address )
@@ -127,10 +132,10 @@ func ClaimDistributionFunds(ctx context.Context, logger log.Logger, addressCodec
127132 return nil
128133}
129134
130- // UpdateVaultsState sets state variables around Vaults Season One and Season
135+ // updateVaultsState sets state variables around Vaults Season One and Season
131136// Two. We do this so that we can remove these values from the app.yaml file,
132137// allowing us to ship one binary for both mainnet and testnet.
133- func UpdateVaultsState (ctx context.Context , addressCodec address.Codec , authorityKeeper * authoritykeeper.Keeper , dollarKeeper * dollarkeeper.Keeper ) error {
138+ func updateVaultsState (ctx context.Context , addressCodec address.Codec , authorityKeeper * authoritykeeper.Keeper , dollarKeeper * dollarkeeper.Keeper ) error {
134139 switch sdk .UnwrapSDKContext (ctx ).ChainID () {
135140 case TestnetChainID :
136141 err := dollarKeeper .VaultsSeasonOneEnded .Set (ctx , true )
0 commit comments