Skip to content
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

Problem: currently used go-ethereum contains a known vulnerability #143

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if changelog should also comment on breaking changes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copied some ethermint changelog.

### Improvements
- [cronos#162](https://github.com/crypto-org-chain/cronos/pull/162) bump ibc-go to v1.2.1 with hooks support
- [cronos#143](https://github.com/crypto-org-chain/cronos/pull/143) update go-ethereum to 1.10.9 and add fee market
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe specify upgrade ethermint

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

module.

*October 4, 2021*
## v0.5.5
Expand Down
20 changes: 18 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ import (
evmrest "github.com/tharsis/ethermint/x/evm/client/rest"
evmkeeper "github.com/tharsis/ethermint/x/evm/keeper"
evmtypes "github.com/tharsis/ethermint/x/evm/types"
"github.com/tharsis/ethermint/x/feemarket"
feemarketkeeper "github.com/tharsis/ethermint/x/feemarket/keeper"
feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types"

"github.com/peggyjv/gravity-bridge/module/x/gravity"
gravitykeeper "github.com/peggyjv/gravity-bridge/module/x/gravity/keeper"
Expand Down Expand Up @@ -171,6 +174,7 @@ var (
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
evm.AppModuleBasic{},
feemarket.AppModuleBasic{},
gravity.AppModuleBasic{},
// this line is used by starport scaffolding # stargate/app/moduleBasic
cronos.AppModuleBasic{},
Expand Down Expand Up @@ -247,7 +251,8 @@ type App struct {
ScopedTransferKeeper capabilitykeeper.ScopedKeeper

// Ethermint keepers
EvmKeeper *evmkeeper.Keeper
EvmKeeper *evmkeeper.Keeper
FeeMarketKeeper feemarketkeeper.Keeper

// Gravity module
GravityKeeper gravitykeeper.Keeper
Expand Down Expand Up @@ -294,6 +299,7 @@ func New(
ibchost.StoreKey, ibctransfertypes.StoreKey,
// ethermint keys
evmtypes.StoreKey,
feemarkettypes.StoreKey,
gravitytypes.StoreKey,
// this line is used by starport scaffolding # stargate/app/storeKey
cronostypes.StoreKey,
Expand Down Expand Up @@ -382,9 +388,14 @@ func New(

// Create Ethermint keepers
tracer := cast.ToString(appOpts.Get(srvflags.EVMTracer))

// Create Ethermint keepers
app.FeeMarketKeeper = feemarketkeeper.NewKeeper(
appCodec, keys[feemarkettypes.StoreKey], app.GetSubspace(feemarkettypes.ModuleName),
)
app.EvmKeeper = evmkeeper.NewKeeper(
appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], app.GetSubspace(evmtypes.ModuleName),
app.AccountKeeper, app.BankKeeper, stakingKeeper,
app.AccountKeeper, app.BankKeeper, stakingKeeper, app.FeeMarketKeeper,
tracer, bApp.Trace(), // debug EVM based on Baseapp options
)

Expand Down Expand Up @@ -488,6 +499,7 @@ func New(

transferModule,
evm.NewAppModule(app.EvmKeeper, app.AccountKeeper),
feemarket.NewAppModule(app.FeeMarketKeeper),
gravity.NewAppModule(app.GravityKeeper, app.BankKeeper),
// this line is used by starport scaffolding # stargate/app/appModule
cronosModule,
Expand All @@ -509,6 +521,7 @@ func New(
app.mm.SetOrderEndBlockers(
crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName,
evmtypes.ModuleName,
feemarkettypes.ModuleName,
gravitytypes.ModuleName,
)

Expand All @@ -534,6 +547,7 @@ func New(
authz.ModuleName,
feegrant.ModuleName,
evmtypes.ModuleName,
feemarkettypes.ModuleName,
gravitytypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/initGenesis
cronostypes.ModuleName,
Expand Down Expand Up @@ -583,6 +597,7 @@ func New(
app.SetAnteHandler(
evmante.NewAnteHandler(
app.AccountKeeper, app.BankKeeper, app.EvmKeeper, app.FeeGrantKeeper, app.IBCKeeper.ChannelKeeper,
app.FeeMarketKeeper,
encodingConfig.TxConfig.SignModeHandler(),
),
)
Expand Down Expand Up @@ -763,6 +778,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(evmtypes.ModuleName)
paramsKeeper.Subspace(feemarkettypes.ModuleName)
paramsKeeper.Subspace(gravitytypes.ModuleName)
// this line is used by starport scaffolding # stargate/app/paramSubspace
paramsKeeper.Subspace(cronostypes.ModuleName)
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/armon/go-metrics v0.3.9
github.com/cosmos/cosmos-sdk v0.44.1
github.com/cosmos/ibc-go v1.2.1
github.com/ethereum/go-ethereum v1.10.3
github.com/ethereum/go-ethereum v1.10.9
github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.5.2
github.com/gorilla/mux v1.8.0
Expand All @@ -19,8 +19,8 @@ require (
github.com/stretchr/testify v1.7.0
github.com/tendermint/tendermint v0.34.13
github.com/tendermint/tm-db v0.6.4
github.com/tharsis/ethermint v0.4.2-0.20210927141513-04c2f05002f8
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af
github.com/tharsis/ethermint v0.6.1-0.20211008133842-e9ab6241db41
google.golang.org/genproto v0.0.0-20211007155348-82e027067bd4
google.golang.org/grpc v1.41.0
gopkg.in/yaml.v2 v2.4.0
)
Expand All @@ -41,5 +41,5 @@ replace github.com/peggyjv/gravity-bridge/module => github.com/crypto-org-chain/

replace github.com/cosmos/iavl => github.com/cosmos/iavl v0.17.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this IAVL line necessary? it should be by default in 0.44.1?

Copy link
Collaborator Author

@yihuang yihuang Oct 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/tendermint/tendermint/blob/v0.34.13/go.mod#L16

it seems still needed, tendermint still depends on the old iavl

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

submitted tendermint/tendermint#7089, I think it can be backported to v0.34.x.


// FIXME: https://github.com/crypto-org-chain/ethermint/tree/cronos2
replace github.com/tharsis/ethermint => github.com/crypto-org-chain/ethermint v0.4.2-0.20211004101819-7b5449f36cc8
// FIXME: https://github.com/crypto-org-chain/ethermint/tree/nil-tracer
replace github.com/tharsis/ethermint => github.com/crypto-org-chain/ethermint v0.4.2-0.20211012020956-6c537e87c727
yihuang marked this conversation as resolved.
Show resolved Hide resolved
Loading