Skip to content

Commit

Permalink
Fix integration-tests CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-scherbina committed Apr 8, 2024
1 parent 2d1f014 commit 088661b
Show file tree
Hide file tree
Showing 18 changed files with 377 additions and 312 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
- uses: technote-space/[email protected]
id: git_diff
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
- name: "Checkout Repository"
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
- name: release dry run
run: make release-dry-run
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
# Required: setup-go, for all versions v3.0.0+ of golangci-lint
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/[email protected]
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/[email protected]
Expand All @@ -42,7 +42,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/[email protected]
Expand All @@ -63,7 +63,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/[email protected]
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
go.sum
- uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
check-latest: true

- uses: nixbuild/nix-quick-install-action@v26
Expand Down
15 changes: 12 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ var (
// and genesis verification.
ModuleBasics = module.NewBasicManager(
auth.AppModuleBasic{},
genutil.AppModuleBasic{},
genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator),
bank.AppModuleBasic{},
capability.AppModuleBasic{},
staking.AppModuleBasic{},
Expand Down Expand Up @@ -447,10 +447,19 @@ func NewEthermintApp(
govConfig.MaxMetadataLen = 10000
*/
govKeeper := govkeeper.NewKeeper(
appCodec, keys[govtypes.StoreKey], app.AccountKeeper, app.BankKeeper,
stakingKeeper, app.MsgServiceRouter(), govConfig, authAddr,
appCodec,
keys[govtypes.StoreKey],
app.AccountKeeper,
app.BankKeeper,
stakingKeeper,
app.MsgServiceRouter(),
govConfig,
authAddr,
)

// Set legacy router for backwards compatibility with gov v1beta1
govKeeper.SetLegacyRouter(govRouter)

app.StakingKeeper = *stakingKeeper

app.GovKeeper = *govKeeper.SetHooks(
Expand Down
18 changes: 16 additions & 2 deletions cmd/ethermintd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (

"cosmossdk.io/simapp/params"
rosettaCmd "cosmossdk.io/tools/rosetta/cmd"
tmtypes "github.com/cometbft/cometbft/types"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/config"
Expand Down Expand Up @@ -227,7 +228,8 @@ func (a appCreator) newApp(logger tmlog.Logger, db dbm.DB, traceStore io.Writer,
panic(err)
}

snapshotDir := filepath.Join(cast.ToString(appOpts.Get(flags.FlagHome)), "data", "snapshots")
homeDir := cast.ToString(appOpts.Get(flags.FlagHome))
snapshotDir := filepath.Join(homeDir, "data", "snapshots")
if err = os.MkdirAll(snapshotDir, os.ModePerm); err != nil {
panic(err)
}
Expand All @@ -246,9 +248,20 @@ func (a appCreator) newApp(logger tmlog.Logger, db dbm.DB, traceStore io.Writer,
cast.ToUint32(appOpts.Get(sdkserver.FlagStateSyncSnapshotKeepRecent)),
)

// Setup chainId
chainID := cast.ToString(appOpts.Get(flags.FlagChainID))
if len(chainID) == 0 {
// fallback to genesis chain-id
appGenesis, err := tmtypes.GenesisDocFromFile(filepath.Join(homeDir, "config", "genesis.json"))
if err != nil {
panic(err)
}
chainID = appGenesis.ChainID
}

ethermintApp := app.NewEthermintApp(
logger, db, traceStore, true, skipUpgradeHeights,
cast.ToString(appOpts.Get(flags.FlagHome)),
homeDir,
cast.ToUint(appOpts.Get(sdkserver.FlagInvCheckPeriod)),
a.encCfg,
appOpts,
Expand All @@ -263,6 +276,7 @@ func (a appCreator) newApp(logger tmlog.Logger, db dbm.DB, traceStore io.Writer,
baseapp.SetSnapshot(snapshotStore, snapshotOptions),
baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(sdkserver.FlagIAVLCacheSize))),
baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(sdkserver.FlagDisableIAVLFastNode))),
baseapp.SetChainID(chainID),
)

return ethermintApp
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/evmos/ethermint

go 1.21

toolchain go1.21.6
toolchain go1.21.0

require (
cosmossdk.io/errors v1.0.1
Expand Down
Loading

0 comments on commit 088661b

Please sign in to comment.