Skip to content

Commit

Permalink
fix: non-deterministic evm execution result
Browse files Browse the repository at this point in the history
When there's extra-eips, concurrent query could cause non-deterministic evm execution result.
It could affect even if exists in historical states.

Ref: ethereum/go-ethereum#26137
  • Loading branch information
yihuang committed Nov 8, 2022
1 parent 5ee7bd1 commit 25660b8
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 50 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (state) [#1320](https://github.com/evmos/ethermint/pull/1320) Fix codehash check mismatch when the code has been deleted in the evm state.
* (rpc) [#1392](https://github.com/evmos/ethermint/pull/1392) Allow fill the proposer address in json-rpc through tendermint api, and pass explicitly to grpc query handler.
* (rpc) [#1405](https://github.com/evmos/ethermint/pull/1405) Fix uninitialized chain ID field in gRPC requests.
* (evm) [#]() Fix non-deterministic evm execution when enable-eips is not empty.

## [v0.19.3] - 2022-10-14

Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ require (
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect
github.com/holiman/big v0.0.0-20221017200358-a027dc42d04e // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/huin/goupnp v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
Expand Down Expand Up @@ -194,6 +195,7 @@ replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76
// ics23 patch for dragonberry
github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0
github.com/ethereum/go-ethereum => github.com/yihuang/go-ethereum v1.10.21-0.20221108063121-b71d1bb5c8ab
// Fix upstream GHSA-h395-qcrw-5vmq vulnerability.
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0
Expand Down
75 changes: 32 additions & 43 deletions go.sum

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@ schema = 3
version = "v1.0.0"
hash = "sha256-k1DYvCqO3BKNcGEve/nMW0RxzMkK2tGfXbUbycqcVSo="
[mod."github.com/ethereum/go-ethereum"]
version = "v1.10.19"
hash = "sha256-7FPnTGcCb8Xd1QVR+6PmGTaHdTY1mm/8osFTW1JLuG8="
version = "v1.10.21-0.20221108063121-b71d1bb5c8ab"
hash = "sha256-R9O3tcdf9PXs/4/Xz65V6PwxuX1eYnuPQkJGK5r5Jhk="
replaced = "github.com/yihuang/go-ethereum"
[mod."github.com/felixge/httpsnoop"]
version = "v1.0.1"
hash = "sha256-TNXnnC/ZGNY9lInAcES1cBGqIdEljKuh5LH/khVFjVk="
Expand Down Expand Up @@ -280,6 +281,9 @@ schema = 3
[mod."github.com/hdevalence/ed25519consensus"]
version = "v0.0.0-20220222234857-c00d1f31bab3"
hash = "sha256-1ec2xc7l9oNtWJwVtx14HnozMZCe2DpfXmu1xI1Z/yo="
[mod."github.com/holiman/big"]
version = "v0.0.0-20221017200358-a027dc42d04e"
hash = "sha256-BPYwQRH3ckgrA7DhEsWkXiIbKmYcBlUT0wqEPiFpRIc="
[mod."github.com/holiman/bloomfilter/v2"]
version = "v2.0.3"
hash = "sha256-5VsJMQzJSNd4F7yAl3iF/q6JodWOlE4dUvTQ0UGPe+k="
Expand Down
2 changes: 1 addition & 1 deletion x/evm/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ func (k *Keeper) traceTx(
}

if traceConfig.Tracer != "" {
if tracer, err = tracers.New(traceConfig.Tracer, tCtx); err != nil {
if tracer, err = tracers.New(traceConfig.Tracer, tCtx, nil); err != nil {
return nil, 0, status.Error(codes.Internal, err.Error())
}
}
Expand Down
4 changes: 2 additions & 2 deletions x/feemarket/migrations/v010/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func NewParams(noBaseFee bool, baseFeeChangeDenom, elasticityMultiplier uint32,
func DefaultParams() Params {
return Params{
NoBaseFee: false,
BaseFeeChangeDenominator: params.BaseFeeChangeDenominator,
ElasticityMultiplier: params.ElasticityMultiplier,
BaseFeeChangeDenominator: params.DefaultBaseFeeChangeDenominator,
ElasticityMultiplier: params.DefaultElasticityMultiplier,
BaseFee: sdkmath.NewIntFromUint64(params.InitialBaseFee),
EnableHeight: 0,
}
Expand Down
4 changes: 2 additions & 2 deletions x/feemarket/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ func NewParams(
func DefaultParams() Params {
return Params{
NoBaseFee: false,
BaseFeeChangeDenominator: params.BaseFeeChangeDenominator,
ElasticityMultiplier: params.ElasticityMultiplier,
BaseFeeChangeDenominator: params.DefaultBaseFeeChangeDenominator,
ElasticityMultiplier: params.DefaultElasticityMultiplier,
BaseFee: sdkmath.NewIntFromUint64(params.InitialBaseFee),
EnableHeight: 0,
MinGasPrice: DefaultMinGasPrice,
Expand Down

0 comments on commit 25660b8

Please sign in to comment.