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

Merge/foundation release/1.10.26 #510

Merged
Show file tree
Hide file tree
Changes from 92 commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
21b557f
cmd/geth: fix on darwin, where long test names fail
ziogaschr Aug 25, 2022
b62c2b9
go.mod,go.sum: update dependency for etclabscore/go-openrpc-reflect@f…
ziogaschr Aug 25, 2022
f67dd63
cmd/geth: fix lint issue (G401: Use of weak cryptographic primitive (…
ziogaschr Aug 25, 2022
3d75380
cmd/geth: fixup subtest names, logging, and datadir paths
meowsbits Aug 29, 2022
9002f71
go.mod,go.sum: bump etclabscore/go-openrpc-reflect to v0.0.37
meowsbits Aug 29, 2022
10d5f56
Merge pull request #498 from etclabscore/fix/tests-mac
ziogaschr Aug 31, 2022
310ca59
consensus/ethash: apply new cache file naming pattern to full dataset…
meowsbits Sep 1, 2022
88aedee
Merge pull request #491 from etclabscore/merge/foundation-release/1.1…
meowsbits Sep 5, 2022
84be258
Merge pull request #496 from etclabscore/merge/foundation-release/1.1…
meowsbits Sep 5, 2022
0b2ba69
Merge pull request #499 from etclabscore/merge/foundation-release/1.1…
meowsbits Sep 5, 2022
d0dc349
graphql: return correct logs for tx (#25612)
s1na Aug 31, 2022
3b41be6
graphql: fixes missing tx logs (#25745)
s1na Sep 13, 2022
972007a
Release Geth v1.10.24
karalabe Sep 14, 2022
8f61fc8
params: set TerminalTotalDifficultyPassed to true (#25769)
MariusVanDerWijden Sep 15, 2022
69568c5
params: release Geth v1.10.25
karalabe Sep 15, 2022
d2be567
build(deps): bump joblib from 1.0.0 to 1.2.0
dependabot[bot] Sep 30, 2022
550af1e
Merge pull request #503 from etclabscore/dependabot/pip/joblib-1.2.0
meowsbits Oct 5, 2022
7497d46
:hammer:
meowsbits Oct 24, 2022
d390462
tests: change ETC test fork configs to chainid=61 (not =1)
meowsbits Oct 25, 2022
701eeb8
tests: generated state tests
meowsbits Oct 28, 2022
85e469f
eth/protocols/snap: fix problems due to idle-but-busy peers (#25651)
holiman Aug 31, 2022
937ea49
eth/protocols/snap: throttle trie heal requests when peers DoS us (#2…
karalabe Sep 9, 2022
a32e69a
trie: check childrens' existence concurrently for snap heal (#25694)
karalabe Sep 6, 2022
99bbb33
eth: fix a rare datarace on CHT challenge reply / shutdown (#25831)
karalabe Sep 20, 2022
27600a5
eth/filters: change filter block to be by-ref (#26054)
holiman Oct 27, 2022
211dbb7
rpc: handle wrong HTTP batch response length (#26064)
jmank88 Nov 2, 2022
e5eb32a
params: release geth v1.10.26 stable
fjl Nov 3, 2022
bf0a7d7
add custom interpreter to t8n evm config
theshoe1029 Nov 6, 2022
7aa2b85
cmd/evm: use utils.EVMInterpreterFlag for all evm tool apps
meowsbits Nov 7, 2022
2d01869
cmd/evm/internal/t8ntool,cmd/evm: make sure the vm inits the external…
meowsbits Nov 7, 2022
ad28143
cmd/utils: initialize external evms if configured for geth
meowsbits Nov 7, 2022
429275b
core/vm,go.mod,go.sum: bump ethereum/evmc version: v7.5.0 -> v10.0.0
meowsbits Nov 7, 2022
191325a
core/vm: implement hostContext.AccessAccount,.AccessStorage
meowsbits Nov 7, 2022
1f6cc75
core/vm: update evmc.Storage* vars to new counterparts
meowsbits Nov 7, 2022
57109a9
core/vm: evmc.TxContext no longer has Difficulty field
meowsbits Nov 7, 2022
097e0ef
core/vm: return evmc.Berlin in case EIP2565 (as feature indicator) is…
meowsbits Nov 7, 2022
eddf072
core/vm: another syntax improvement for a comment
meowsbits Nov 7, 2022
ea4f934
core/vm: update hostContext.Selfdestruct to return bool
meowsbits Nov 7, 2022
3835269
core/vm: add gasRefund return value to hostContext.Call signature
meowsbits Nov 7, 2022
b2c886b
core/vm: bump getRevision switch to support London
meowsbits Nov 7, 2022
d42b9b2
core/vm: implement codeAddress argument for hostContext.Call sig
meowsbits Nov 7, 2022
c051c24
build: bump evmone version: v0.5.0 -> v0.9.1
meowsbits Nov 7, 2022
2a9508c
Makefile,build: remove SSVM interpreter; project no longer exists
meowsbits Nov 7, 2022
273a566
build: bump hera version: v0.3.2 -> v0.6.0
meowsbits Nov 7, 2022
7d9c444
Makefile,build: remove aleth interpreter
meowsbits Nov 7, 2022
194f06f
.github/workflows: fixing c++/cmake issues w/r/t evmone, evmc tests
meowsbits Nov 8, 2022
9363a2a
core/vm: use evmc.Revision values for logical conditions
meowsbits Nov 9, 2022
95daecd
Merge branch 'evmc-v10-fix-cmake' into evmc-v10-isaac
meowsbits Nov 9, 2022
6e1a0dd
.github/workflows: rename actions job to reflect not-just-EWASM
meowsbits Nov 9, 2022
c67278b
core/vm: fixup comment
meowsbits Nov 9, 2022
98e2d49
core/vm: remove extra condition EIP2200 for Istanbul revision
meowsbits Nov 9, 2022
c984765
core/vm: implement tx BaseFee and PrevRandao in case London enabled
meowsbits Nov 9, 2022
475e1e4
core/vm: assign the refund value based on London rules... ?
meowsbits Nov 9, 2022
a66e4ce
.github/workflows: fix directory path for git safe config for submodules
meowsbits Nov 9, 2022
1eec2d8
cmake.sh: remove anachronstic development cmake.sh installation scrip…
meowsbits Nov 9, 2022
d7c936d
Merge branch 'evmc-v10-fix-cmake' into evmc-v10-isaac
meowsbits Nov 10, 2022
8272cb8
Merge branch 'evmc-v10-isaac' into merge/foundation-release/1.10.23-t…
meowsbits Nov 10, 2022
3588f61
eth/ethconfig: run 'go generate ./...'
meowsbits Nov 11, 2022
098e8f0
core,params/types/genesisT: move 'go generate' decl to appropriate pa…
meowsbits Nov 11, 2022
2373279
params/types/genesisT: go generate, change is inoperative except deps…
meowsbits Nov 11, 2022
03efbe9
cmd/evm/internal/t8ntool: add missing BaseFee field to ExecutionResul…
meowsbits Nov 11, 2022
1306be8
cmd/evm/internal/t8ntool,cmd/evm: add missing EWASM interpreter flag …
meowsbits Nov 11, 2022
51fc880
cmd/evm/internal/t8ntool: add missing BaseFee field to ExecutionResul…
meowsbits Nov 11, 2022
f686f2f
cmd/evm/internal/t8ntool,cmd/evm: add missing EWASM interpreter flag …
meowsbits Nov 11, 2022
4a4a307
tests: DO NOT SKIP tests for Berlin,London when using -evmc.vm/wasm
meowsbits Nov 11, 2022
75da3ca
core/vm: reimplement evmc.Storage* assignment matrix
meowsbits Nov 11, 2022
88307b1
Merge branch 'evmc-v10-isaac' into merge/foundation-release/1.10.23-t…
meowsbits Nov 11, 2022
fbef1fb
core/vm: still-failing attempt to install EVMC with revisions
meowsbits Nov 11, 2022
e11ae45
core/vm: refactor/rewrite sstore handler for evmc host
meowsbits Nov 11, 2022
9d3899a
cmd/echainspec,cmd/faucet,cmd/geth,eth/tracers/internal/tracetest,eth…
meowsbits Nov 11, 2022
b909e85
Merge pull request #509 from etclabscore/io-deprecated-go1.16
meowsbits Dec 6, 2022
c1a614e
Merge branch 'master' into merge/foundation-release/1.10.23-tests-gen…
meowsbits Dec 6, 2022
dcc3ef2
tests: [fixup/post-merge] s/ioutil.WriteFile/os.WriteFile/g
meowsbits Dec 6, 2022
77496f0
params: ExampleAllocPrint_Mainnet refers to unknown identifier: Alloc…
meowsbits Dec 6, 2022
6604b71
tests: (was empty-branch) enable skip evmc tests at Berlin,London
meowsbits Dec 6, 2022
f443631
tests: [lint/deadcode] test dirs defined but unused
meowsbits Dec 6, 2022
7ce7c47
tests: [lint] achieve perfection
meowsbits Dec 6, 2022
12f3472
cmd/evm/testdata/13,cmd/evm/testdata/14,cmd/evm/testdata/19,cmd/evm/t…
meowsbits Dec 6, 2022
86fc9cc
cmd/geth: bump geth console test timeout to 20s
meowsbits Dec 6, 2022
5e3c673
tests: re-enable legacyStateTestDir
meowsbits Dec 6, 2022
14b5a21
.gitmodules,tests: move ETC testdata submodule to winsvega's ETC tests
meowsbits Dec 9, 2022
79d4135
tests: ensure context.Difficulty is assigned
meowsbits Dec 12, 2022
0c9830a
eth/filters,eth,eth/protocols/snap,graphql,params,rpc,trie: Merge bra…
ziogaschr Dec 12, 2022
4f4ab7f
graphql: graphql: s/params.vars for InitialBaseFee
ziogaschr Dec 12, 2022
44581a0
cmd/geth: cmd/geth: geth-test ipc was using a too-long (>108 char) pa…
ziogaschr Dec 12, 2022
012aafa
tests: update tests (incl. s/Merge/Merged/g fix), skip EOF1 tests
meowsbits Dec 12, 2022
2e13b82
tests: re-enable ETC legacy tests
meowsbits Dec 12, 2022
cfed3ef
tests: .github/workflows,.gitmodules,Makefile,build,cmd/echainspec,cm…
ziogaschr Dec 14, 2022
cc2883f
params/types/coregeth,tests: fix GrayGlacier difficulty test
meowsbits Dec 19, 2022
ca284eb
Makefile: problem: tests are timing out on Github CI
meowsbits Dec 19, 2022
2ba4218
build: problem: lint step timed out on Github CI
meowsbits Dec 19, 2022
5150515
.gitmodules: move ETH xclient tests submodule back to ethereum/tests
meowsbits Dec 19, 2022
460091f
.gitmodules: .gitmodules: set shallow mode for tests-etc submodule
ziogaschr Dec 20, 2022
ca5dd04
core/state: core/state: remove comment
ziogaschr Dec 20, 2022
7c9fc18
core/vm: core/vm: remove comment
ziogaschr Dec 20, 2022
fda1e51
tests: remove dead code (state,diff mgen artifacts)
meowsbits Dec 20, 2022
cc9b4ee
.github/workflows: add check for “go generate” diff
ziogaschr Dec 20, 2022
fb25c30
.github/workflows: .github/workflows: no need for submodules for go:g…
ziogaschr Dec 20, 2022
abc814b
.github/workflows: .github/workflows: install devtools for “go:genera…
ziogaschr Dec 20, 2022
20bbcab
.github/workflows: use solc version “0.6.12”
ziogaschr Dec 20, 2022
6e567fa
.github/workflows: use solc version 0.6.12
ziogaschr Dec 20, 2022
df01b67
.github/workflows: remove go-generate-check unneeded rm
ziogaschr Dec 20, 2022
5161c8d
contracts/checkpointoracle,contracts/checkpointoracle/contract,params…
meowsbits Dec 21, 2022
4b2cf83
params/types/genesisT: edit the document which shall not be edited (a…
meowsbits Jan 10, 2023
8675b2a
cmd/devp2p/internal/ethtest: these tests fails spuriously; solve with…
meowsbits Jan 10, 2023
3539eb3
core/vm: checkout master@b909e85
meowsbits Jan 10, 2023
e8d7f23
tests: skip fork Merged for EVMC test suites
meowsbits Jan 10, 2023
be95e71
core/vm,go.mod,go.sum: revert ethereum/evmc v10 -> v7
meowsbits Jan 10, 2023
7273876
cmd/devp2p/internal/ethtest: register runGeth fn as a t.Helper
meowsbits Jan 10, 2023
4d572a8
.github/workflows: .github/workflows: add whitelisted generated files…
ziogaschr Jan 10, 2023
0e79bc9
.github/workflows: .github/workflows: fix go-generate-check issues
ziogaschr Jan 11, 2023
c4b7520
.github/workflows: .github/workflows: .github/workflows: fix emitting…
ziogaschr Jan 11, 2023
94ee05f
.github/workflows: .github/workflows: use [email protected] in go-generate-c…
ziogaschr Jan 11, 2023
2697490
.github/workflows: refactor exceptions and ignores to env vars
meowsbits Jan 11, 2023
6b9997e
Merge branch 'merge/foundation-release/1.10.26' of meowsbits.github.c…
whilei Jan 11, 2023
f195f35
.github/workflows: .github/workflows: fix env vars list parsing in go…
ziogaschr Jan 12, 2023
633eae8
Merge pull request #512 from etclabscore/merge/foundation-release/1.1…
meowsbits Jan 12, 2023
9a48b9c
.github/workflows: .github/workflows: .github/workflows: .github/work…
ziogaschr Jan 13, 2023
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
26 changes: 24 additions & 2 deletions .github/workflows/evmc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:

jobs:

build-ewasm:
name: EWASM State Tests
build-evmc:
name: EVMC/EVM+EWASM State Tests
runs-on: ubuntu-latest
steps:

Expand All @@ -22,9 +22,31 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Install cmake
run: |
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y cmake
cmake --version

- name: Install necessary GLIBCXX version
run: |
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y
sudo apt-get install -y gcc-9 g++-9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
g++ --version
gcc --version
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX

- name: Get dependencies
run: |
go get -v -t -d ./...
git config --global --add safe.directory $(pwd)/tests/evm-benchmarks
git config --global --add safe.directory $(pwd)/tests/testdata
git config --global --add safe.directory $(pwd)/tests/testdata/LegacyTests
git submodule update --init --recursive
export GOBIN=${HOME}/go/bin
mkdir -p "${GOBIN}"
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[submodule "tests"]
path = tests/testdata
url = https://github.com/etclabscore/tests
url = https://github.com/ethereum/tests
shallow = true
[submodule "evm-benchmarks"]
path = tests/evm-benchmarks
url = https://github.com/ipsilon/evm-benchmarks
shallow = true
[submodule "tests-etc"]
path = tests/testdata-etc
url = https://github.com/etclabscore/tests-etc
url = https://github.com/etclabscore/tests
ziogaschr marked this conversation as resolved.
Show resolved Hide resolved
14 changes: 3 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ios:
@echo "Import \"$(GOBIN)/Geth.framework\" to use the library."

test:
$(GORUN) build/ci.go test
$(GORUN) build/ci.go test -timeout 20m

# DEPRECATED.
# No attempt will be made after the Istanbul fork to maintain
Expand All @@ -48,24 +48,16 @@ test-coregeth: \
hera:
./build/hera.sh

ssvm:
./build/ssvm.sh

evmone:
./build/evmone.sh

aleth-interpreter:
./build/aleth-interpreter.sh

# Test EVMC support against various external interpreters.
test-evmc: hera ssvm evmone aleth-interpreter
test-evmc: hera evmone
Copy link
Member

Choose a reason for hiding this comment

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

📓 EVMC support/development tooling for aleth and ssvm is dropped because they don't have an EVMCv10 version yet.

Copy link
Member Author

Choose a reason for hiding this comment

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

So you say that we can bring them soon with #507?

go test -count 1 ./tests -run TestState -evmc.ewasm=$(ROOT_DIR)/build/_workspace/hera/build/src/libhera.so
go test -count 1 ./tests -run TestState -evmc.ewasm=$(ROOT_DIR)/build/_workspace/SSVM/build/tools/ssvm-evmc/libssvmEVMC.so
go test -count 1 ./tests -run TestState -evmc.evm=$(ROOT_DIR)/build/_workspace/evmone/lib/libevmone.so
go test -count 1 ./tests -run TestState -evmc.evm=$(ROOT_DIR)/build/_workspace/aleth/lib/libaleth-interpreter.so

clean-evmc:
rm -rf ./build/_workspace/hera ./build/_workspace/SSVM ./build/_workspace/evmone ./build/_workspace/aleth
rm -rf ./build/_workspace/hera ./build/_workspace/evmone

test-coregeth-features: \
test-coregeth-features-coregeth \
Expand Down
14 changes: 0 additions & 14 deletions build/aleth-interpreter.sh

This file was deleted.

4 changes: 2 additions & 2 deletions build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ var (
"focal": "golang-go", // EOL: 04/2030
"impish": "golang-go", // EOL: 07/2022
"jammy": "golang-go", // EOL: 04/2032
//"kinetic": "golang-go", // EOL: 07/2023
// "kinetic": "golang-go", // EOL: 07/2023
}

debGoBootPaths = map[string]string{
Expand Down Expand Up @@ -349,7 +349,7 @@ func doLint(cmdline []string) {
}

linter := downloadLinter(*cachedir)
lflags := []string{"run", "--timeout", "3m0s", "--config", ".golangci.yml"}
lflags := []string{"run", "--timeout", "5m0s", "--config", ".golangci.yml"}
build.MustRunCommand(linter, append(lflags, packages...)...)
fmt.Println("You have achieved perfection.")
}
Expand Down
6 changes: 3 additions & 3 deletions build/evmone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ if [[ "$OSTYPE" != "linux"* ]]; then
fi

mkdir -p build/_workspace/evmone
[[ -f build/_workspace/evmone/evmone-0.5.0-linux-x86_64.tar.gz ]] && exit 0
wget -O build/_workspace/evmone/evmone-0.5.0-linux-x86_64.tar.gz https://github.com/ethereum/evmone/releases/download/v0.5.0/evmone-0.5.0-linux-x86_64.tar.gz
tar xzvf build/_workspace/evmone/evmone-0.5.0-linux-x86_64.tar.gz -C build/_workspace/evmone/
[[ -f build/_workspace/evmone/evmone-0.9.1-linux-x86_64.tar.gz ]] && exit 0
wget -O build/_workspace/evmone/evmone-0.9.1-linux-x86_64.tar.gz https://github.com/ethereum/evmone/releases/download/v0.9.1/evmone-0.9.1-linux-x86_64.tar.gz
tar xzvf build/_workspace/evmone/evmone-0.9.1-linux-x86_64.tar.gz -C build/_workspace/evmone/
2 changes: 1 addition & 1 deletion build/hera.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ main() {
mkdir -p build/_workspace
[ ! -d build/_workspace/hera ] && git clone https://github.com/ewasm/hera build/_workspace/hera || echo "Hera exists."
cd build/_workspace/hera
git checkout v0.3.2
git checkout v0.6.0
git submodule update --init
mkdir -p build
cd build
Expand Down
13 changes: 0 additions & 13 deletions build/ssvm.sh

This file was deleted.

6 changes: 3 additions & 3 deletions cmd/echainspec/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"os"
"strings"

Expand All @@ -15,9 +15,9 @@ import (

func readInputData(ctx *cli.Context) ([]byte, error) {
if !ctx.GlobalIsSet(fileInFlag.Name) {
return ioutil.ReadAll(os.Stdin)
return io.ReadAll(os.Stdin)
}
return ioutil.ReadFile(ctx.GlobalString(fileInFlag.Name))
return os.ReadFile(ctx.GlobalString(fileInFlag.Name))
}

func unmarshalChainSpec(format string, data []byte) (conf ctypes.Configurator, err error) {
Expand Down
2 changes: 2 additions & 0 deletions cmd/evm/internal/t8ntool/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ type ExecutionResult struct {
Rejected []*rejectedTx `json:"rejected,omitempty"`
Difficulty *math.HexOrDecimal256 `json:"currentDifficulty" gencodec:"required"`
GasUsed math.HexOrDecimal64 `json:"gasUsed"`
BaseFee *math.HexOrDecimal256 `json:"currentBaseFee,omitempty"`
}

type ommer struct {
Expand Down Expand Up @@ -273,6 +274,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig ctypes.ChainConfigura
Rejected: rejectedTxs,
Difficulty: (*math.HexOrDecimal256)(vmContext.Difficulty),
GasUsed: (math.HexOrDecimal64)(gasUsed),
BaseFee: (*math.HexOrDecimal256)(vmContext.BaseFee),
}
return statedb, execRs, nil
}
Expand Down
16 changes: 14 additions & 2 deletions cmd/evm/internal/t8ntool/transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"path"
"strings"

"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/state"
Expand Down Expand Up @@ -178,9 +179,20 @@ func Transition(ctx *cli.Context) error {
prestate.Env = *inputData.Env

vmConfig := vm.Config{
Tracer: tracer,
Debug: (tracer != nil),
Tracer: tracer,
Debug: (tracer != nil),
EVMInterpreter: ctx.String(utils.EVMInterpreterFlag.Name),
EWASMInterpreter: ctx.String(utils.EWASMInterpreterFlag.Name),
}

if vmConfig.EVMInterpreter != "" {
vm.InitEVMCEVM(vmConfig.EVMInterpreter)
}

if vmConfig.EWASMInterpreter != "" {
vm.InitEVMCEwasm(vmConfig.EWASMInterpreter)
}

Copy link
Member

@meowsbits meowsbits Dec 19, 2022

Choose a reason for hiding this comment

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

📓 Support for EVMC is added to t8ntool (used normally by retesteth for filling xclient tests). So retesteth can fill tests with moar EVMs.

// Construct the chainconfig
var chainConfig ctypes.ChainConfigurator
if cConf, extraEips, err := tests.GetChainConfig(ctx.String(ForknameFlag.Name)); err != nil {
Expand Down
10 changes: 4 additions & 6 deletions cmd/evm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"os"

"github.com/ethereum/go-ethereum/cmd/evm/internal/t8ntool"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/internal/flags"
"github.com/urfave/cli/v2"
)
Expand Down Expand Up @@ -132,11 +133,6 @@ var (
Value: true,
Usage: "enable return data output",
}
EVMInterpreterFlag = &cli.StringFlag{
Name: "vm.evm",
Usage: "External EVM configuration (default = built-in interpreter)",
Value: "",
}
)

var stateTransitionCommand = &cli.Command{
Expand All @@ -162,6 +158,8 @@ var stateTransitionCommand = &cli.Command{
t8ntool.ChainIDFlag,
t8ntool.RewardFlag,
t8ntool.VerbosityFlag,
utils.EVMInterpreterFlag,
utils.EWASMInterpreterFlag,
},
}

Expand Down Expand Up @@ -222,7 +220,7 @@ func init() {
DisableStackFlag,
DisableStorageFlag,
DisableReturnDataFlag,
EVMInterpreterFlag,
utils.EVMInterpreterFlag,
}
app.Commands = []*cli.Command{
compileCommand,
Expand Down
2 changes: 1 addition & 1 deletion cmd/evm/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func runCmd(ctx *cli.Context) error {
EVMConfig: vm.Config{
Tracer: tracer,
Debug: ctx.Bool(DebugFlag.Name) || ctx.Bool(MachineFlag.Name),
EVMInterpreter: ctx.String(EVMInterpreterFlag.Name),
EVMInterpreter: ctx.String(utils.EVMInterpreterFlag.Name),
},
}

Expand Down
18 changes: 16 additions & 2 deletions cmd/evm/staterunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"fmt"
"os"

"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/eth/tracers/logger"
Expand All @@ -37,8 +38,12 @@ var stateTestCommand = &cli.Command{
Name: "statetest",
Usage: "executes the given state tests",
ArgsUsage: "<file>",
Flags: []cli.Flag{stateTestEVMCEWASMFlag, stateTestForkFlag},
Category: flags.DevCategory,
Flags: []cli.Flag{
stateTestForkFlag,
stateTestEVMCEWASMFlag,
utils.EVMInterpreterFlag,
},
Category: flags.DevCategory,
}

var stateTestEVMCEWASMFlag = &cli.StringFlag{
Expand Down Expand Up @@ -113,7 +118,16 @@ func stateTestCmd(ctx *cli.Context) error {
Tracer: tracer,
Debug: ctx.Bool(DebugFlag.Name) || ctx.Bool(MachineFlag.Name),
EWASMInterpreter: ctx.String(stateTestEVMCEWASMFlag.Name),
EVMInterpreter: ctx.String(utils.EVMInterpreterFlag.Name),
}

if cfg.EVMInterpreter != "" {
vm.InitEVMCEVM(cfg.EVMInterpreter)
}
if cfg.EWASMInterpreter != "" {
vm.InitEVMCEwasm(cfg.EWASMInterpreter)
}

Copy link
Member

@meowsbits meowsbits Dec 19, 2022

Choose a reason for hiding this comment

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

📓 xclient state tests can also be run with external EVMs.

results := make([]StatetestResult, 0, len(tests))
for key, test := range tests {
for _, st := range test.Subtests(nil) {
Expand Down
3 changes: 2 additions & 1 deletion cmd/evm/testdata/13/exp2.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
}
],
"currentDifficulty": "0x20000",
"gasUsed": "0x109a0"
"gasUsed": "0x109a0",
"currentBaseFee": "0x36b"
}
}
3 changes: 2 additions & 1 deletion cmd/evm/testdata/14/exp.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"currentDifficulty": "0x2000020000000",
"receipts": [],
"gasUsed": "0x0"
"gasUsed": "0x0",
"currentBaseFee": "0x500"
}
}
3 changes: 2 additions & 1 deletion cmd/evm/testdata/14/exp2.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"receipts": [],
"currentDifficulty": "0x1ff8020000000",
"gasUsed": "0x0"
"gasUsed": "0x0",
"currentBaseFee": "0x500"
}
}
3 changes: 2 additions & 1 deletion cmd/evm/testdata/14/exp_berlin.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"receipts": [],
"currentDifficulty": "0x1ff9000000000",
"gasUsed": "0x0"
"gasUsed": "0x0",
"currentBaseFee": "0x500"
}
}
3 changes: 2 additions & 1 deletion cmd/evm/testdata/19/exp_arrowglacier.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"currentDifficulty": "0x2000000200000",
"receipts": [],
"gasUsed": "0x0"
"gasUsed": "0x0",
"currentBaseFee": "0x500"
}
}
3 changes: 2 additions & 1 deletion cmd/evm/testdata/19/exp_grayglacier.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"receipts": [],
"currentDifficulty": "0x2000000004000",
"gasUsed": "0x0"
"gasUsed": "0x0",
"currentBaseFee": "0x500"
}
}
3 changes: 2 additions & 1 deletion cmd/evm/testdata/19/exp_london.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"currentDifficulty": "0x2000080000000",
"receipts": [],
"gasUsed": "0x0"
"gasUsed": "0x0",
"currentBaseFee": "0x500"
}
}
3 changes: 2 additions & 1 deletion cmd/evm/testdata/24/exp.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
}
],
"currentDifficulty": null,
"gasUsed": "0x10306"
"gasUsed": "0x10306",
"currentBaseFee": "0x500"
}
}
8 changes: 8 additions & 0 deletions cmd/evm/testdata/25/alloc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
"balance": "0x5ffd4878be161d74",
"code": "0x",
"nonce": "0xac",
"storage": {}
}
}
Loading