Skip to content

Commit

Permalink
refactor(app.go): turn off IBC modules (#2572)
Browse files Browse the repository at this point in the history
* remove ibc modules

* upgrade handler

* generate files

* lint

* add documented TODO
  • Loading branch information
lumtis authored Jul 28, 2024
1 parent 680cf6a commit 5e9068a
Show file tree
Hide file tree
Showing 55 changed files with 161 additions and 2,362 deletions.
263 changes: 134 additions & 129 deletions app/app.go

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions app/init_genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
"github.com/cosmos/cosmos-sdk/x/authz"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
Expand All @@ -17,33 +16,33 @@ import (
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
evmtypes "github.com/evmos/ethermint/x/evm/types"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

authoritytypes "github.com/zeta-chain/zetacore/x/authority/types"
crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types"
emissionsModuleTypes "github.com/zeta-chain/zetacore/x/emissions/types"
fungibleModuleTypes "github.com/zeta-chain/zetacore/x/fungible/types"
ibccrosschaintypes "github.com/zeta-chain/zetacore/x/ibccrosschain/types"
lightclienttypes "github.com/zeta-chain/zetacore/x/lightclient/types"
observertypes "github.com/zeta-chain/zetacore/x/observer/types"
)

// InitGenesisModuleList returns the module list for genesis initialization
// NOTE: Capability module must occur first so that it can initialize any capabilities
// TODO: enable back IBC
// all commented lines in this function are modules related to IBC
// https://github.com/zeta-chain/node/issues/2573
func InitGenesisModuleList() []string {
return []string{
capabilitytypes.ModuleName,
//capabilitytypes.ModuleName,
authtypes.ModuleName,
banktypes.ModuleName,
distrtypes.ModuleName,
stakingtypes.ModuleName,
slashingtypes.ModuleName,
govtypes.ModuleName,
ibcexported.ModuleName,
ibctransfertypes.ModuleName,
//ibcexported.ModuleName,
//ibctransfertypes.ModuleName,
evmtypes.ModuleName,
feemarkettypes.ModuleName,
paramstypes.ModuleName,
Expand All @@ -54,7 +53,7 @@ func InitGenesisModuleList() []string {
vestingtypes.ModuleName,
observertypes.ModuleName,
crosschaintypes.ModuleName,
ibccrosschaintypes.ModuleName,
//ibccrosschaintypes.ModuleName,
fungibleModuleTypes.ModuleName,
emissionsModuleTypes.ModuleName,
authz.ModuleName,
Expand Down
35 changes: 19 additions & 16 deletions app/setup_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
Expand All @@ -19,14 +18,11 @@ import (
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/cosmos/cosmos-sdk/x/upgrade/types"
ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
"golang.org/x/exp/slices"

"github.com/zeta-chain/zetacore/pkg/constant"
authoritytypes "github.com/zeta-chain/zetacore/x/authority/types"
emissionstypes "github.com/zeta-chain/zetacore/x/emissions/types"
ibccrosschaintypes "github.com/zeta-chain/zetacore/x/ibccrosschain/types"
observertypes "github.com/zeta-chain/zetacore/x/observer/types"
)

Expand Down Expand Up @@ -102,18 +98,25 @@ func SetupHandlers(app *App) {
return vm, nil
},
},
{
index: 1715624665,
storeUpgrade: &storetypes.StoreUpgrades{
Added: []string{capabilitytypes.ModuleName, ibcexported.ModuleName, ibctransfertypes.ModuleName},
},
},
{
index: 1715707436,
storeUpgrade: &storetypes.StoreUpgrades{
Added: []string{ibccrosschaintypes.ModuleName},
},
},
// TODO: enable back IBC
// these commented lines allow for the IBC modules to be added to the upgrade tracker
// https://github.com/zeta-chain/node/issues/2573
//{
// index: 1715624665,
// storeUpgrade: &storetypes.StoreUpgrades{
// Added: []string{
// capabilitytypes.ModuleName,
// ibcexported.ModuleName,
// ibctransfertypes.ModuleName,
// },
// },
//},
//{
// index: 1715707436,
// storeUpgrade: &storetypes.StoreUpgrades{
// Added: []string{ibccrosschaintypes.ModuleName},
// },
//},
},
stateFileDir: DefaultNodeHome,
}
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
* [2515](https://github.com/zeta-chain/node/pull/2515) - replace chainName by chainID for ChainNonces indexing
* [2541](https://github.com/zeta-chain/node/pull/2541) - deprecate ChainName field in Chain object
* [2542](https://github.com/zeta-chain/node/pull/2542) - adjust permissions to be more restrictive
* [2572](https://github.com/zeta-chain/node/pull/2572) - turn off IBC modules
* [2556](https://github.com/zeta-chain/node/pull/2556) - refactor migrator length check to use consensus type

### Tests
Expand Down
3 changes: 0 additions & 3 deletions docs/cli/zetacored/zetacored_query.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ zetacored query [flags]
* [zetacored query fungible](zetacored_query_fungible.md) - Querying commands for the fungible module
* [zetacored query gov](zetacored_query_gov.md) - Querying commands for the governance module
* [zetacored query group](zetacored_query_group.md) - Querying commands for the group module
* [zetacored query ibc](zetacored_query_ibc.md) - Querying commands for the IBC module
* [zetacored query ibc-transfer](zetacored_query_ibc-transfer.md) - IBC fungible token transfer query subcommands
* [zetacored query lightclient](zetacored_query_lightclient.md) - Querying commands for the lightclient module
* [zetacored query observer](zetacored_query_observer.md) - Querying commands for the observer module
* [zetacored query params](zetacored_query_params.md) - Querying commands for the params module
Expand All @@ -52,5 +50,4 @@ zetacored query [flags]
* [zetacored query tx](zetacored_query_tx.md) - Query for a transaction by hash, "[addr]/[seq]" combination or comma-separated signatures in a committed block
* [zetacored query txs](zetacored_query_txs.md) - Query for paginated transactions that match a set of events
* [zetacored query upgrade](zetacored_query_upgrade.md) - Querying commands for the upgrade module
* [zetacored query zetaibccrosschain](zetacored_query_zetaibccrosschain.md) - Querying commands for the zetaibccrosschain module

31 changes: 0 additions & 31 deletions docs/cli/zetacored/zetacored_query_ibc-transfer.md

This file was deleted.

44 changes: 0 additions & 44 deletions docs/cli/zetacored/zetacored_query_ibc-transfer_denom-hash.md

This file was deleted.

44 changes: 0 additions & 44 deletions docs/cli/zetacored/zetacored_query_ibc-transfer_denom-trace.md

This file was deleted.

50 changes: 0 additions & 50 deletions docs/cli/zetacored/zetacored_query_ibc-transfer_denom-traces.md

This file was deleted.

44 changes: 0 additions & 44 deletions docs/cli/zetacored/zetacored_query_ibc-transfer_escrow-address.md

This file was deleted.

Loading

0 comments on commit 5e9068a

Please sign in to comment.