Skip to content

Commit

Permalink
Merge2 (#3)
Browse files Browse the repository at this point in the history
* eth/tracers: expose contextual infos (block hash, tx hash, tx index)

* eth/tracers: convert int/hash values from context into js object (ethereum#23108)

* Convert int/hash values from context into js object

* Use js fixed buffer

Co-authored-by: William <william.berman@coinbase.com>

* cmd/geth: fix IPC probe in les test (ethereum#23094)

Previously, the test waited a second and then failed if geth had not
started. This caused the test to fail intermittently. This change checks
whether the IPC is open 10 times over a 5 second period and then fails
if geth is still not available.

* eth/gasprice: fix typo in comment (ethereum#22998)

* core/state: remove unused methods ReturnGas, GetStorageProofByHash (ethereum#23092)

Co-authored-by: lidongwei <lidongwei@huobi.com>

* eth/downloader: increase downloader block body allowance (ethereum#23074)

This change increases the cache size from 64 to 256 Mb for block bodies.
Benchmarks have shown this to be one bottleneck when trying to achieve
higher download speeds.

The commit also includes a minor optimization for header inserts in package
core: previously, the presence of headers in the database was checked for
every header before writing it. With the change, if one header fails the
presence check, all subsequent headers are also assumed to be missing.
This is an improvement because in practice, the headers are almost always
missing during sync.

* p2p/enode: fix method doc (ethereum#23115)

This is an obvious spelling error

Co-authored-by: liuyaxiong <liuyaxiong@inspur.com>

* core, eth: fix precompile addresses for tracers (ethereum#23097)

* core,eth/tracers: make isPrecompiled dependent on HF

* eth/tracers: use keys when constructing chain config struct

* eth/tracers: dont initialize activePrecompiles with random value

* eth/gasprice: implement feeHistory API (ethereum#23033)

* eth/gasprice: implement feeHistory API

* eth/gasprice: factored out resolveBlockRange

* eth/gasprice: add sanity check for missing block

* eth/gasprice: fetch actual gas used from receipts

* miner, eth/gasprice: add PendingBlockAndReceipts

* internal/ethapi: use hexutil.Big

* eth/gasprice: return error when requesting beyond head block

* eth/gasprice: fixed tests and return errors correctly

* eth/gasprice: rename receiver name

* eth/gasprice: return directly if blockCount == 0

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

* accounts/abi/bind: fix gas price suggestion with pre EIP-1559 clients (ethereum#23102)

This fixes transaction sending in the case where an app using go-ethereum v1.10.4
is talking to a pre-EIP-1559 RPC node. In this case, the eth_maxPriorityFeePerGas
endpoint is not available and we can only rely on eth_gasPrice.

* p2p/server: fix method name in comment (ethereum#23123)

* ethclient/gethclient: RPC client wrapper for geth-specific API (ethereum#22977)

This commit adds the package gethclient which is similar to the ethclient
and implements some geth specific functionality.

Co-authored-by: Edgar Aroutiounian <edgar.factorial@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>

* cmd/geth: dont fail on deprecated toml config fields (ethereum#23118)

* internal/ethapi: fix panic in access list creation (ethereum#23133)

Fixes test failure in the last commit.

* all: removed blockhash from statedb (ethereum#23126)

This PR removes the blockhash from the statedb

* eth/fetcher, trie: unit test reliability fixes (ethereum#23020)

Some tests take quite some time during exit, which I think causes
some appveyor fails like this:

    https://ci.appveyor.com/project/ethereum/go-ethereum/builds/39511210/job/xhom84eg2e4uulq3

One of the things that seem to take time during exit is waiting
(up to 100ms) for the syncbloom to close. This PR changes it to use
a channel, instead of looping with a 100ms wait.

This also includes some unrelated changes improving the reliability of
eth/fetcher tests, which fail a lot because they are time-dependent.

* crypto: gofuzz build directives (ethereum#23137)

* eth/tracers: improve tracing performance (ethereum#23016)

Improves the performance of debug.traceTransaction

* go.mod: update UPNP dependency (ethereum#23116)

* les: avoid shutdown hang (ethereum#23139)

* consensus/clique: avoid a copy in clique (ethereum#23149)

* consensus/clique:optimize to avoid a copy in clique

* consensus/clique: test for sealhash

Co-authored-by: Martin Holst Swende <martin@swende.se>

* cmd/evm, eth/ethconfig: regenerate struct codecs (ethereum#23140)

* ethstats: fix full node interface post 1559

* dockerfile: get rid of make and env, see if that fixes builds

* cmd/puppeth: fix dashboard crash caused by updated base image

* core: fix bad parent hash when jumping to genesis in setHead (ethereum#23162)

* p2p: fix array out of bounds issue (ethereum#23165)

* fuzzing: fix typo in fuzzer definitions (ethereum#23169)

* eth, miner: add RPC method to modify miner gaslimit (pre london: ceiling) (ethereum#23134)

* core/types: sanity check the basefee length inside a header (ethereum#23171)

* all: remove noop vm config flags (ethereum#23111)

* all: rm external interpreter and ewasm config

* core/vm: rm Interpreter interface

* cmd/geth: deprecate interpreter config fields

* cmd/devp2p: fixes for eth and discv4 tests (ethereum#23155)

This PR fixes a false positive PONG 'to' endpoint mismatch seen in hive tests:

    got {IP:172.17.0.7 UDP:44025 TCP:44025}, want {IP:172.17.0.7 UDP:44025 TCP:0}

Co-authored-by: Felix Lange <fjl@twurst.com>

* core/types: remove LogForStorage type (ethereum#23173)

The encoding of Log and LogForStorage is exactly the same
now. After tracking it down it seems like ethereum#17106 changed the
storage schema of logs to be the same as the consensus
encoding.

Support for the legacy format was dropped in ethereum#22852 and if
I'm not wrong there's no reason anymore to have these two
equivalent types.

Since the RLP encoding simply contains the first three fields
of Log, we can also avoid creating a temporary struct for
encoding/decoding, and use the rlp:"-" tag in Log instead.

Note: this is an API change in core/types. We decided it's OK
to make this change because LogForStorage is an implementation
detail of go-ethereum and the type has zero uses outside of
package core/types.

Co-authored-by: Felix Lange <fjl@twurst.com>

* core/types: go generate (ethereum#23177)

* core, params: define london block at 12965000 (ethereum#23176)

* core, params: define london block at 12965000

* core/forkid: fix test

* eth/gasprice, internal/ethapi, miner: minor feehistory fixes

* params: update CHTs for the 1.10.5 release

* core/state: avoid unnecessary alloc in trie prefetcher (ethereum#23198)

* internal/ethapi: fix transaction APIs (ethereum#23179)

* internal/ethapi: fix transaction APIs

* internal/ethapi: fix typo

* internal/ethapi: address comments

* internal/ethapi: address comment from Peter

* internal: get pending and queued transaction by address (ethereum#22992)

* core, eth, internal, les, light: get pending and queued transaction by address

* core: tiny nitpick fixes

* light: tiny nitpick

Co-authored-by: mark <mark@amis.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>

* consensus/clique: implement getSigner API method (ethereum#22987)

* clique: implement getSignerForBlock

* consensus/clique: use blockNrOrHash in getSignerForBlock

* consensus/clique: implement getSigner

* consensus/clique: fixed rlp decoding

* consensus/clique: use Author instead of getSigner

* consensus/clique: nit nit nit

* consensus/clique: nit nit nit

* feat: merged changes from head

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
Co-authored-by: williamberman <wlbberman@gmail.com>
Co-authored-by: William <william.berman@coinbase.com>
Co-authored-by: piersy <pierspowlesland@gmail.com>
Co-authored-by: haryu703 <34744512+haryu703@users.noreply.github.com>
Co-authored-by: Li Dongwei <lidw1988@126.com>
Co-authored-by: lidongwei <lidongwei@huobi.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: ForLina <471133417@qq.com>
Co-authored-by: liuyaxiong <liuyaxiong@inspur.com>
Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>
Co-authored-by: Felföldi Zsolt <zsfelfoldi@gmail.com>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: Pierre R <p.rousset@gmail.com>
Co-authored-by: Ahyun <urbanart2251@gmail.com>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Edgar Aroutiounian <edgar.factorial@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: ucwong <ucwong@126.com>
Co-authored-by: Evolution404 <35091674+Evolution404@users.noreply.github.com>
Co-authored-by: Mark <markya0616@gmail.com>
Co-authored-by: mark <mark@amis.com>
Co-authored-by: Raymond Yeh <ray@geek.sg>
  • Loading branch information
24 people committed Jul 13, 2021
1 parent f41721f commit e376a4e
Show file tree
Hide file tree
Showing 84 changed files with 1,813 additions and 619 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ ARG BUILDNUM=""
# Build Geth in a stock Go builder container
FROM golang:1.16-alpine as builder

RUN apk add --no-cache make gcc musl-dev linux-headers git
RUN apk add --no-cache gcc musl-dev linux-headers git

ADD . /go-ethereum
RUN cd /go-ethereum && make geth
RUN cd /go-ethereum && go run build/ci.go install ./cmd/geth

# Pull Geth into a second stage deploy alpine container
FROM alpine:latest
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.alltools
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ ARG BUILDNUM=""
# Build Geth in a stock Go builder container
FROM golang:1.16-alpine as builder

RUN apk add --no-cache make gcc musl-dev linux-headers git
RUN apk add --no-cache gcc musl-dev linux-headers git

ADD . /go-ethereum
RUN cd /go-ethereum && make all
RUN cd /go-ethereum && go run build/ci.go install

# Pull all binaries into a second stage deploy alpine container
FROM alpine:latest
Expand Down
5 changes: 1 addition & 4 deletions accounts/abi/bind/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,10 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i
return nil, errors.New("maxFeePerGas or maxPriorityFeePerGas specified but london is not active yet")
}
if opts.GasPrice == nil {
price, err := c.transactor.SuggestGasTipCap(ensureContext(opts.Context))
price, err := c.transactor.SuggestGasPrice(ensureContext(opts.Context))
if err != nil {
return nil, err
}
if head.BaseFee != nil {
price.Add(price, head.BaseFee)
}
opts.GasPrice = price
}
}
Expand Down
81 changes: 46 additions & 35 deletions cmd/devp2p/internal/ethtest/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"time"

"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/eth/protocols/eth"
Expand Down Expand Up @@ -649,58 +650,68 @@ func (s *Suite) hashAnnounce(isEth66 bool) error {
return fmt.Errorf("peering failed: %v", err)
}
// create NewBlockHashes announcement
nextBlock := s.fullChain.blocks[s.chain.Len()]
newBlockHash := &NewBlockHashes{
{Hash: nextBlock.Hash(), Number: nextBlock.Number().Uint64()},
type anno struct {
Hash common.Hash // Hash of one particular block being announced
Number uint64 // Number of one particular block being announced
}

nextBlock := s.fullChain.blocks[s.chain.Len()]
announcement := anno{Hash: nextBlock.Hash(), Number: nextBlock.Number().Uint64()}
newBlockHash := &NewBlockHashes{announcement}
if err := sendConn.Write(newBlockHash); err != nil {
return fmt.Errorf("failed to write to connection: %v", err)
}
// Announcement sent, now wait for a header request
var (
id uint64
msg Message
blockHeaderReq GetBlockHeaders
)
if isEth66 {
// expect GetBlockHeaders request, and respond
id, msg := sendConn.Read66()
id, msg = sendConn.Read66()
switch msg := msg.(type) {
case GetBlockHeaders:
blockHeaderReq := msg
if blockHeaderReq.Amount != 1 {
return fmt.Errorf("unexpected number of block headers requested: %v", blockHeaderReq.Amount)
}
if blockHeaderReq.Origin.Hash != nextBlock.Hash() {
return fmt.Errorf("unexpected block header requested: %v", pretty.Sdump(blockHeaderReq))
}
resp := &eth.BlockHeadersPacket66{
RequestId: id,
BlockHeadersPacket: eth.BlockHeadersPacket{
nextBlock.Header(),
},
}
if err := sendConn.Write66(resp, BlockHeaders{}.Code()); err != nil {
return fmt.Errorf("failed to write to connection: %v", err)
}
blockHeaderReq = msg
default:
return fmt.Errorf("unexpected %s", pretty.Sdump(msg))
}
if blockHeaderReq.Amount != 1 {
return fmt.Errorf("unexpected number of block headers requested: %v", blockHeaderReq.Amount)
}
if blockHeaderReq.Origin.Hash != announcement.Hash {
return fmt.Errorf("unexpected block header requested. Announced:\n %v\n Remote request:\n%v",
pretty.Sdump(announcement),
pretty.Sdump(blockHeaderReq))
}
if err := sendConn.Write66(&eth.BlockHeadersPacket66{
RequestId: id,
BlockHeadersPacket: eth.BlockHeadersPacket{
nextBlock.Header(),
},
}, BlockHeaders{}.Code()); err != nil {
return fmt.Errorf("failed to write to connection: %v", err)
}
} else {
// expect GetBlockHeaders request, and respond
switch msg := sendConn.Read().(type) {
msg = sendConn.Read()
switch msg := msg.(type) {
case *GetBlockHeaders:
blockHeaderReq := *msg
if blockHeaderReq.Amount != 1 {
return fmt.Errorf("unexpected number of block headers requested: %v", blockHeaderReq.Amount)
}
if blockHeaderReq.Origin.Hash != nextBlock.Hash() {
return fmt.Errorf("unexpected block header requested: %v", pretty.Sdump(blockHeaderReq))
}
if err := sendConn.Write(&BlockHeaders{nextBlock.Header()}); err != nil {
return fmt.Errorf("failed to write to connection: %v", err)
}
blockHeaderReq = *msg
default:
return fmt.Errorf("unexpected %s", pretty.Sdump(msg))
}
if blockHeaderReq.Amount != 1 {
return fmt.Errorf("unexpected number of block headers requested: %v", blockHeaderReq.Amount)
}
if blockHeaderReq.Origin.Hash != announcement.Hash {
return fmt.Errorf("unexpected block header requested. Announced:\n %v\n Remote request:\n%v",
pretty.Sdump(announcement),
pretty.Sdump(blockHeaderReq))
}
if err := sendConn.Write(&BlockHeaders{nextBlock.Header()}); err != nil {
return fmt.Errorf("failed to write to connection: %v", err)
}
}
// wait for block announcement
msg := recvConn.readAndServe(s.chain, timeout)
msg = recvConn.readAndServe(s.chain, timeout)
switch msg := msg.(type) {
case *NewBlockHashes:
hashes := *msg
Expand Down
13 changes: 7 additions & 6 deletions cmd/devp2p/internal/v4test/discv4tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"crypto/rand"
"fmt"
"net"
"reflect"
"time"

"github.com/ethereum/go-ethereum/crypto"
Expand Down Expand Up @@ -89,16 +88,18 @@ func BasicPing(t *utesting.T) {

// checkPong verifies that reply is a valid PONG matching the given ping hash.
func (te *testenv) checkPong(reply v4wire.Packet, pingHash []byte) error {
if reply == nil || reply.Kind() != v4wire.PongPacket {
return fmt.Errorf("expected PONG reply, got %v", reply)
if reply == nil {
return fmt.Errorf("expected PONG reply, got nil")
}
if reply.Kind() != v4wire.PongPacket {
return fmt.Errorf("expected PONG reply, got %v %v", reply.Name(), reply)
}
pong := reply.(*v4wire.Pong)
if !bytes.Equal(pong.ReplyTok, pingHash) {
return fmt.Errorf("PONG reply token mismatch: got %x, want %x", pong.ReplyTok, pingHash)
}
wantEndpoint := te.localEndpoint(te.l1)
if !reflect.DeepEqual(pong.To, wantEndpoint) {
return fmt.Errorf("PONG 'to' endpoint mismatch: got %+v, want %+v", pong.To, wantEndpoint)
if want := te.localEndpoint(te.l1); !want.IP.Equal(pong.To.IP) || want.UDP != pong.To.UDP {
return fmt.Errorf("PONG 'to' endpoint mismatch: got %+v, want %+v", pong.To, want)
}
if v4wire.Expired(pong.Expiration) {
return fmt.Errorf("PONG is expired (%v)", pong.Expiration)
Expand Down
4 changes: 2 additions & 2 deletions cmd/evm/internal/t8ntool/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
}
vmConfig.Tracer = tracer
vmConfig.Debug = (tracer != nil)
statedb.Prepare(tx.Hash(), blockHash, txIndex)
statedb.Prepare(tx.Hash(), txIndex)
txContext := core.NewEVMTxContext(msg)
snapshot := statedb.Snapshot()
evm := vm.NewEVM(vmContext, txContext, statedb, chainConfig, vmConfig)
Expand Down Expand Up @@ -197,7 +197,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
}

// Set the receipt logs and create the bloom filter.
receipt.Logs = statedb.GetLogs(tx.Hash())
receipt.Logs = statedb.GetLogs(tx.Hash(), blockHash)
receipt.Bloom = types.CreateBloom(types.Receipts{receipt})
// These three are non-consensus fields:
//receipt.BlockHash
Expand Down
16 changes: 8 additions & 8 deletions cmd/evm/internal/t8ntool/gen_stenv.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions cmd/evm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ var (
Name: "noreturndata",
Usage: "disable return data output",
}
EVMInterpreterFlag = cli.StringFlag{
Name: "vm.evm",
Usage: "External EVM configuration (default = built-in interpreter)",
Value: "",
}
)

var stateTransitionCommand = cli.Command{
Expand Down Expand Up @@ -185,7 +180,6 @@ func init() {
DisableStackFlag,
DisableStorageFlag,
DisableReturnDataFlag,
EVMInterpreterFlag,
}
app.Commands = []cli.Command{
compileCommand,
Expand Down
5 changes: 2 additions & 3 deletions cmd/evm/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,8 @@ func runCmd(ctx *cli.Context) error {
Coinbase: genesisConfig.Coinbase,
BlockNumber: new(big.Int).SetUint64(genesisConfig.Number),
EVMConfig: vm.Config{
Tracer: tracer,
Debug: ctx.GlobalBool(DebugFlag.Name) || ctx.GlobalBool(MachineFlag.Name),
EVMInterpreter: ctx.GlobalString(EVMInterpreterFlag.Name),
Tracer: tracer,
Debug: ctx.GlobalBool(DebugFlag.Name) || ctx.GlobalBool(MachineFlag.Name),
},
}

Expand Down
19 changes: 18 additions & 1 deletion cmd/geth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"github.com/ethereum/go-ethereum/eth/catalyst"
"github.com/ethereum/go-ethereum/eth/ethconfig"
"github.com/ethereum/go-ethereum/internal/ethapi"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/params"
Expand Down Expand Up @@ -63,7 +64,12 @@ var tomlSettings = toml.Config{
return field
},
MissingField: func(rt reflect.Type, field string) error {
link := ""
id := fmt.Sprintf("%s.%s", rt.String(), field)
if deprecated(id) {
log.Warn("Config field is deprecated and won't have an effect", "name", id)
return nil
}
var link string
if unicode.IsUpper(rune(rt.Name()[0])) && rt.PkgPath() != "main" {
link = fmt.Sprintf(", see https://godoc.org/%s#%s for available fields", rt.PkgPath(), rt.Name())
}
Expand Down Expand Up @@ -228,3 +234,14 @@ func applyMetricConfig(ctx *cli.Context, cfg *gethConfig) {
cfg.Metrics.InfluxDBTags = ctx.GlobalString(utils.MetricsInfluxDBTagsFlag.Name)
}
}

func deprecated(field string) bool {
switch field {
case "ethconfig.Config.EVMInterpreter":
return true
case "ethconfig.Config.EWASMInterpreter":
return true
default:
return false
}
}
16 changes: 10 additions & 6 deletions cmd/geth/les_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,18 @@ func startGethWithIpc(t *testing.T, name string, args ...string) *gethrpc {
name: name,
geth: runGeth(t, args...),
}
// wait before we can attach to it. TODO: probe for it properly
time.Sleep(1 * time.Second)
var err error
ipcpath := ipcEndpoint(ipcName, g.geth.Datadir)
if g.rpc, err = rpc.Dial(ipcpath); err != nil {
t.Fatalf("%v rpc connect to %v: %v", name, ipcpath, err)
// We can't know exactly how long geth will take to start, so we try 10
// times over a 5 second period.
var err error
for i := 0; i < 10; i++ {
time.Sleep(500 * time.Millisecond)
if g.rpc, err = rpc.Dial(ipcpath); err == nil {
return g
}
}
return g
t.Fatalf("%v rpc connect to %v: %v", name, ipcpath, err)
return nil
}

func initGeth(t *testing.T) string {
Expand Down
2 changes: 0 additions & 2 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ var (
utils.GpoPercentileFlag,
utils.GpoMaxGasPriceFlag,
utils.GpoIgnoreGasPriceFlag,
utils.EWASMInterpreterFlag,
utils.EVMInterpreterFlag,
utils.MinerNotifyFullFlag,
configFileFlag,
utils.CatalystFlag,
Expand Down
2 changes: 0 additions & 2 deletions cmd/geth/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ var AppHelpFlagGroups = []flags.FlagGroup{
Name: "VIRTUAL MACHINE",
Flags: []cli.Flag{
utils.VMEnableDebugFlag,
utils.EVMInterpreterFlag,
utils.EWASMInterpreterFlag,
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion cmd/puppeth/module_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ ADD puppeth.png /dashboard/puppeth.png
EXPOSE 80
CMD ["node", "/server.js"]
CMD ["node", "./server.js"]
`

// dashboardComposefile is the docker-compose.yml file required to deploy and
Expand Down
20 changes: 1 addition & 19 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -760,16 +760,6 @@ var (
Usage: "Comma-separated InfluxDB tags (key/values) attached to all measurements",
Value: metrics.DefaultConfig.InfluxDBTags,
}
EWASMInterpreterFlag = cli.StringFlag{
Name: "vm.ewasm",
Usage: "External ewasm configuration (default = built-in interpreter)",
Value: "",
}
EVMInterpreterFlag = cli.StringFlag{
Name: "vm.evm",
Usage: "External EVM configuration (default = built-in interpreter)",
Value: "",
}

CatalystFlag = cli.BoolFlag{
Name: "catalyst",
Expand Down Expand Up @@ -1302,8 +1292,7 @@ func setGPO(ctx *cli.Context, cfg *gasprice.Config, light bool) {
// If we are running the light client, apply another group
// settings for gas oracle.
if light {
cfg.Blocks = ethconfig.LightClientGPO.Blocks
cfg.Percentile = ethconfig.LightClientGPO.Percentile
*cfg = ethconfig.LightClientGPO
}
if ctx.GlobalIsSet(GpoBlocksFlag.Name) {
cfg.Blocks = ctx.GlobalInt(GpoBlocksFlag.Name)
Expand Down Expand Up @@ -1587,13 +1576,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
cfg.EnablePreimageRecording = ctx.GlobalBool(VMEnableDebugFlag.Name)
}

if ctx.GlobalIsSet(EWASMInterpreterFlag.Name) {
cfg.EWASMInterpreter = ctx.GlobalString(EWASMInterpreterFlag.Name)
}

if ctx.GlobalIsSet(EVMInterpreterFlag.Name) {
cfg.EVMInterpreter = ctx.GlobalString(EVMInterpreterFlag.Name)
}
if ctx.GlobalIsSet(RPCGlobalGasCapFlag.Name) {
cfg.RPCGasCap = ctx.GlobalUint64(RPCGlobalGasCapFlag.Name)
}
Expand Down

0 comments on commit e376a4e

Please sign in to comment.