Skip to content

Problem: ibc-go v10.x is not used #573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
- name: 'Tar debug files'
if: failure()
run: tar cfz debug_files.tar.gz -C /tmp/pytest-of-runner .
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: debug-files
Expand Down
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ linters:
- misspell
- nakedret
- prealloc
- exportloopref
- staticcheck
- stylecheck
- typecheck
Expand All @@ -30,7 +29,6 @@ linters:
- unused
- nolintlint
- asciicheck
- exportloopref
- gofumpt
- gomodguard
- whitespace
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [#555](https://github.com/crypto-org-chain/ethermint/pull/555) Update cometbft to 0.38.14 and rocksdb to 9.7.4.
* [#565](https://github.com/crypto-org-chain/ethermint/pull/565) Add back CacheWrapWithTrace api.
* [#563](https://github.com/crypto-org-chain/ethermint/pull/563) Bump ibc-go to v9.0.2.
* [#573](https://github.com/crypto-org-chain/ethermint/pull/573) Bump ibc-go to v10.0.x.

## v0.21.x-cronos

Expand Down
2 changes: 1 addition & 1 deletion app/ante/eip712.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
ibcante "github.com/cosmos/ibc-go/v9/modules/core/ante"
ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante"

ethcrypto "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/signer/core/apitypes"
Expand Down
4 changes: 2 additions & 2 deletions app/ante/handler_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
ethtypes "github.com/ethereum/go-ethereum/core/types"

ibcante "github.com/cosmos/ibc-go/v9/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v9/modules/core/keeper"
ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"

evmtypes "github.com/evmos/ethermint/x/evm/types"
)
Expand Down
68 changes: 23 additions & 45 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,17 @@ import (
"github.com/cosmos/cosmos-sdk/x/staking"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/cosmos/ibc-go/modules/capability"
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"

"github.com/cosmos/ibc-go/v9/modules/apps/transfer"
ibctransferkeeper "github.com/cosmos/ibc-go/v9/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v9/modules/core"
ibcclienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types"
ibcconnectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types"
porttypes "github.com/cosmos/ibc-go/v9/modules/core/05-port/types"
ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v9/modules/core/keeper"
ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint"

"github.com/cosmos/ibc-go/v10/modules/apps/transfer"
ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v10/modules/core"
ibcclienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types"
ibcconnectiontypes "github.com/cosmos/ibc-go/v10/modules/core/03-connection/types"
porttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types"
ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"
ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint"

"github.com/evmos/ethermint/client/docs"

Expand Down Expand Up @@ -220,7 +217,6 @@ type EthermintApp struct {
// keepers
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
CapabilityKeeper *capabilitykeeper.Keeper
StakingKeeper *stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
MintKeeper mintkeeper.Keeper
Expand All @@ -236,10 +232,6 @@ type EthermintApp struct {
TransferKeeper ibctransferkeeper.Keeper
ConsensusParamsKeeper consensusparamkeeper.Keeper

// make scoped keepers public for test purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper

// Ethermint keepers
EvmKeeper *evmkeeper.Keeper
FeeMarketKeeper feemarketkeeper.Keeper
Expand Down Expand Up @@ -308,7 +300,7 @@ func NewEthermintApp(
authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey,
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, upgradetypes.StoreKey,
evidencetypes.StoreKey, capabilitytypes.StoreKey, consensusparamtypes.StoreKey,
evidencetypes.StoreKey, consensusparamtypes.StoreKey,
feegrant.StoreKey, authzkeeper.StoreKey, crisistypes.StoreKey,
// ibc keys
ibcexported.StoreKey, ibctransfertypes.StoreKey,
Expand All @@ -318,7 +310,6 @@ func NewEthermintApp(

// Add the EVM transient store key
tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey)
memKeys := storetypes.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)
okeys := storetypes.NewObjectStoreKeys(banktypes.ObjectStoreKey, evmtypes.ObjectStoreKey)

// load state streaming if enabled
Expand All @@ -336,7 +327,6 @@ func NewEthermintApp(
invCheckPeriod: invCheckPeriod,
keys: keys,
tkeys: tkeys,
memKeys: memKeys,
okeys: okeys,
}

Expand All @@ -355,16 +345,6 @@ func NewEthermintApp(
)
bApp.SetParamStore(app.ConsensusParamsKeeper.ParamsStore)

// add capability keeper and ScopeToModule for ibc module
app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey])

scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName)
scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName)

// Applications that wish to enforce statically created ScopedKeepers should call `Seal` after creating
// their scoped modules in `NewApp` with `ScopeToModule`
app.CapabilityKeeper.Seal()

// use custom Ethermint account for contracts
app.AccountKeeper = authkeeper.NewAccountKeeper(
appCodec, runtime.NewKVStoreService(keys[authtypes.StoreKey]),
Expand Down Expand Up @@ -482,10 +462,10 @@ func NewEthermintApp(

// Create IBC Keeper
app.IBCKeeper = ibckeeper.NewKeeper(
appCodec, keys[ibcexported.StoreKey],
appCodec,
runtime.NewKVStoreService(keys[ibcexported.StoreKey]),
app.GetSubspace(ibcexported.ModuleName),
app.UpgradeKeeper,
scopedIBCKeeper,
authAddr,
)

Expand Down Expand Up @@ -538,10 +518,16 @@ func NewEthermintApp(

// Create Transfer Keepers
app.TransferKeeper = ibctransferkeeper.NewKeeper(
appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName),
app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, app.IBCKeeper.PortKeeper,
app.AccountKeeper, app.BankKeeper, scopedTransferKeeper, authAddr,
appCodec,
runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]),
app.GetSubspace(ibctransfertypes.ModuleName),
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.ChannelKeeperV2,
app.AccountKeeper, app.BankKeeper,
authAddr,
)

transferModule := transfer.NewAppModule(app.TransferKeeper)
transferIBCModule := transfer.NewIBCModule(app.TransferKeeper)

Expand Down Expand Up @@ -578,7 +564,6 @@ func NewEthermintApp(
auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)),
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper),
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)),
capability.NewAppModule(appCodec, *app.CapabilityKeeper, false),
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry),
gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)),
Expand Down Expand Up @@ -639,7 +624,6 @@ func NewEthermintApp(
// NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC)
app.ModuleManager.SetOrderBeginBlockers(
upgradetypes.ModuleName,
capabilitytypes.ModuleName,
feemarkettypes.ModuleName,
evmtypes.ModuleName,
minttypes.ModuleName,
Expand Down Expand Up @@ -671,7 +655,6 @@ func NewEthermintApp(
evmtypes.ModuleName,
feemarkettypes.ModuleName,
// no-op modules
capabilitytypes.ModuleName,
ibcexported.ModuleName,
ibctransfertypes.ModuleName,
authtypes.ModuleName,
Expand All @@ -696,7 +679,6 @@ func NewEthermintApp(
// can do so safely.
genesisModuleOrder := []string{
// SDK modules
capabilitytypes.ModuleName,
authtypes.ModuleName,
banktypes.ModuleName,
distrtypes.ModuleName,
Expand Down Expand Up @@ -763,7 +745,6 @@ func NewEthermintApp(
// initialize stores
app.MountKVStores(keys)
app.MountTransientStores(tkeys)
app.MountMemoryStores(memKeys)
app.MountObjectStores(okeys)

// initialize BaseApp
Expand Down Expand Up @@ -805,9 +786,6 @@ func NewEthermintApp(
}
}

app.ScopedIBCKeeper = scopedIBCKeeper
app.ScopedTransferKeeper = scopedTransferKeeper

executor := cast.ToString(appOpts.Get(srvflags.EVMBlockExecutor))
switch executor {
case srvconfig.BlockExecutorBlockSTM:
Expand Down
6 changes: 2 additions & 4 deletions app/simulation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ import (
"github.com/cosmos/cosmos-sdk/x/simulation"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
ibctransfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types"
ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported"
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported"
"github.com/evmos/ethermint/app"
"github.com/evmos/ethermint/app/ante"
"github.com/evmos/ethermint/testutil"
Expand Down Expand Up @@ -243,7 +242,6 @@ func TestAppImportExport(t *testing.T) {
{simApp.GetKey(paramtypes.StoreKey), newApp.GetKey(paramtypes.StoreKey), [][]byte{}},
{simApp.GetKey(govtypes.StoreKey), newApp.GetKey(govtypes.StoreKey), [][]byte{}},
{simApp.GetKey(evidencetypes.StoreKey), newApp.GetKey(evidencetypes.StoreKey), [][]byte{}},
{simApp.GetKey(capabilitytypes.StoreKey), newApp.GetKey(capabilitytypes.StoreKey), [][]byte{}},
{simApp.GetKey(authzkeeper.StoreKey), newApp.GetKey(authzkeeper.StoreKey), [][]byte{authzkeeper.GrantKey, authzkeeper.GrantQueuePrefix}},
{simApp.GetKey(ibcexported.StoreKey), newApp.GetKey(ibcexported.StoreKey), [][]byte{}},
{simApp.GetKey(ibctransfertypes.StoreKey), newApp.GetKey(ibctransfertypes.StoreKey), [][]byte{}},
Expand Down
43 changes: 21 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/evmos/ethermint

go 1.23.3
go 1.23.6

require (
cosmossdk.io/api v0.7.6
Expand All @@ -9,27 +9,26 @@ require (
cosmossdk.io/core v0.11.1
cosmossdk.io/errors v1.0.1
cosmossdk.io/log v1.4.1
cosmossdk.io/math v1.3.0
cosmossdk.io/math v1.4.0
cosmossdk.io/store v1.1.1
cosmossdk.io/tools/confix v0.1.2
cosmossdk.io/x/evidence v0.1.1
cosmossdk.io/x/feegrant v0.1.1
cosmossdk.io/x/tx v0.13.6-0.20241003112805-ff8789a02871
cosmossdk.io/x/tx v0.13.6
cosmossdk.io/x/upgrade v0.1.4
github.com/btcsuite/btcd v0.24.2
github.com/btcsuite/btcd/btcutil v1.1.6
github.com/cometbft/cometbft v0.38.13-0.20240920204745-fdf90d16f608
github.com/cosmos/cosmos-db v1.0.3-0.20240408151834-e75f6e4b28d8
github.com/cometbft/cometbft v0.38.15
github.com/cosmos/cosmos-db v1.1.1
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.50.9
github.com/cosmos/cosmos-sdk v0.50.10
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/gogoproto v1.7.0
github.com/cosmos/ibc-go/modules/capability v1.0.1
github.com/cosmos/ibc-go/v9 v9.0.2
github.com/cosmos/ibc-go/v10 v10.0.0-beta.1
github.com/cosmos/rosetta v0.50.3-1
github.com/crypto-org-chain/go-block-stm v0.0.0-20241213061541-7afe924fb4a6
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/ethereum/go-ethereum v1.10.26
github.com/ethereum/go-ethereum v1.14.12
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.5.4
github.com/gorilla/mux v1.8.1
Expand All @@ -41,28 +40,28 @@ require (
github.com/onsi/gomega v1.26.0
github.com/pkg/errors v0.9.1
github.com/rs/cors v1.11.1
github.com/spf13/cast v1.6.0
github.com/spf13/cast v1.7.1
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/status-im/keycard-go v0.2.0
github.com/stretchr/testify v1.9.0
github.com/stretchr/testify v1.10.0
github.com/tidwall/gjson v1.14.4
github.com/tidwall/sjson v1.2.5
github.com/tyler-smith/go-bip39 v1.1.0
golang.org/x/net v0.30.0
golang.org/x/sync v0.8.0
golang.org/x/text v0.19.0
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142
google.golang.org/grpc v1.67.1
google.golang.org/protobuf v1.35.1
google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53
google.golang.org/grpc v1.69.0
google.golang.org/protobuf v1.36.5
sigs.k8s.io/yaml v1.4.0
)

require (
cloud.google.com/go v0.115.0 // indirect
cloud.google.com/go/auth v0.6.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
cloud.google.com/go/compute/metadata v0.5.0 // indirect
cloud.google.com/go/compute/metadata v0.5.2 // indirect
cloud.google.com/go/iam v1.1.9 // indirect
cloud.google.com/go/storage v1.41.0 // indirect
cosmossdk.io/depinject v1.0.0 // indirect
Expand All @@ -79,7 +78,7 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bgentry/speakeasy v0.2.0 // indirect
github.com/bits-and-blooms/bitset v1.8.0 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
Expand Down Expand Up @@ -122,7 +121,7 @@ require (
github.com/go-kit/kit v0.13.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect
Expand Down Expand Up @@ -157,7 +156,7 @@ require (
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/hdevalence/ed25519consensus v0.2.0 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c // indirect
github.com/holiman/uint256 v1.3.1 // indirect
github.com/huandu/skiplist v1.2.0 // indirect
github.com/huin/goupnp v1.0.3 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
Expand Down Expand Up @@ -218,9 +217,9 @@ require (
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.opentelemetry.io/otel v1.31.0 // indirect
go.opentelemetry.io/otel/metric v1.31.0 // indirect
go.opentelemetry.io/otel/trace v1.31.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
Expand All @@ -230,7 +229,7 @@ require (
golang.org/x/time v0.5.0 // indirect
google.golang.org/api v0.186.0 // indirect
google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading
Loading