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

use eels forks/prague branch #196

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

danceratopz
Copy link
Contributor

The EELS Prague implementation isn't merged into execution-specs master yet.

@holiman
Copy link
Owner

holiman commented Mar 7, 2025

Sweet, thanks!

@holiman holiman merged commit c1b8e31 into holiman:master Mar 7, 2025
1 check passed
@holiman
Copy link
Owner

holiman commented Mar 7, 2025

This doesn't quite work

# generic-fuzzer --outdir=/fuzztmp  --fork=Prague --geth=/gethvm --eels=/ethereum-spec-evm --engine bls 
INFO [03-07|16:17:41.182] Set loglevel                             level=INFO
INFO [03-07|16:17:41.182] Fuzzing started                          threads=6
INFO [03-07|16:17:41.182] Test factory thread started
INFO [03-07|16:17:41.183] Test factory thread started
INFO [03-07|16:17:41.183] Test factory thread started
eels error: invalid character 'T' looking for beginning of value
  | Traceback (most recent call last):
  |   File "/ethereum-spec-evm", line 8, in <module>
  |     sys.exit(main())
  |              ~~~~^^
  |   File "/opt/pipx/venvs/ethereum-execution/lib/python3.13/site-packages/ethereum_spec_tools/evm_tools/__init__.py", line 118, in main
  |     return state_test.run()
  |            ~~~~~~~~~~~~~~^^
  |   File "/opt/pipx/venvs/ethereum-execution/lib/python3.13/site-packages/ethereum_spec_tools/evm_tools/statetest/__init__.py", line 217, in run
  |     return self.run_one(self.file)
  |            ~~~~~~~~~~~~^^^^^^^^^^^
  |   File "/opt/pipx/venvs/ethereum-execution/lib/python3.13/site-packages/ethereum_spec_tools/evm_tools/statetest/__init__.py", line 246, in run_one
  |     result = run_test_case(
  |         test_case,
  |         t8n_extra=t8n_extra,
  |         output_basedir=sys.stderr,
  |     )
  |   File "/opt/pipx/venvs/ethereum-execution/lib/python3.13/site-packages/ethereum_spec_tools/evm_tools/statetest/__init__.py", line 148, in run_test_case
  |     t8n = T8N(t8n_options, out_stream, in_stream)
  |   File "/opt/pipx/venvs/ethereum-execution/lib/python3.13/site-packages/ethereum_spec_tools/evm_tools/t8n/__init__.py", line 122, in __init__
  |     self.env = Env(self, stdin)
  |                ~~~^^^^^^^^^^^^^
  |   File "/opt/pipx/venvs/ethereum-execution/lib/python3.13/site-packages/ethereum_spec_tools/evm_tools/t8n/env.py", line 74, in __init__
  |     self.read_block_hashes(data, t8n)
  |     ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  |   File "/opt/pipx/venvs/ethereum-execution/lib/python3.13/site-packages/ethereum_spec_tools/evm_tools/t8n/env.py", line 246, in read_block_hashes
  |     self.parent_hash = Hash32(hex_to_bytes(data["parentHash"]))
  |                                            ~~~~^^^^^^^^^^^^^^
  | KeyError: 'parentHash'

@holiman
Copy link
Owner

holiman commented Mar 7, 2025

{
  "00000000-mixed-1": {
    "env": {
      "currentCoinbase": "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
      "currentDifficulty": "0x200000",
      "currentRandom": "0x0000000000000000000000000000000000000000000000000000000000200000",
      "currentGasLimit": "0x26e1f476fe1e22",
      "currentNumber": "0x1",
      "currentTimestamp": "0x3e8",
      "previousHash": "0x044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d",
      "currentBaseFee": "0x10"
    },

The env does have a previousHash -- but eels wants a parentHash all of a sudden?

@holiman
Copy link
Owner

holiman commented Mar 7, 2025

Another diff

diff --git a/evms/testdata/traces/eofcode.json.eels.stderr.txt b/evms/testdata/traces/eofcode.json.eels.stderr.txt
index d5123da..5769c50 100644
--- a/evms/testdata/traces/eofcode.json.eels.stderr.txt
+++ b/evms/testdata/traces/eofcode.json.eels.stderr.txt
@@ -1,2 +1,25 @@
-# WARNING:T8N:Transaction 0 failed: InvalidBlock()
-{"stateRoot": "0x53f6733a696cb3bbf77b635d96ace97f25ffee2d08d3e3d4ae1e566bfc060d6f"}
+Traceback (most recent call last):
+  File "/ethereum-spec-evm", line 8, in <module>
+    sys.exit(main())
+             ~~~~^^
+  File "/opt/pipx/venvs/ethereum-execution/lib/python3.13/site-packages/ethereum_spec_tools/evm_tools/__init__.py", line 118, in main
+    return state_test.run()
+           ~~~~~~~~~~~~~~^^
+  File "/opt/pipx/venvs/ethereum-execution/lib/python3.13/site-packages/ethereum_spec_tools/evm_tools/statetest/__init__.py", line 217, in run
+    return self.run_one(self.file)
+           ~~~~~~~~~~~~^^^^^^^^^^^
+  File "/opt/pipx/venvs/ethereum-execution/lib/python3.13/site-packages/ethereum_spec_tools/evm_tools/statetest/__init__.py", line 246, in run_one
+    result = run_test_case(
+        test_case,
+        t8n_extra=t8n_extra,
+        output_basedir=sys.stderr,
+    )
+  File "/opt/pipx/venvs/ethereum-execution/lib/python3.13/site-packages/ethereum_spec_tools/evm_tools/statetest/__init__.py", line 148, in run_test_case
+    t8n = T8N(t8n_options, out_stream, in_stream)
+  File "/opt/pipx/venvs/ethereum-execution/lib/python3.13/site-packages/ethereum_spec_tools/evm_tools/t8n/__init__.py", line 122, in __init__
+    self.env = Env(self, stdin)
+               ~~~^^^^^^^^^^^^^
+  File "/opt/pipx/venvs/ethereum-execution/lib/python3.13/site-packages/ethereum_spec_tools/evm_tools/t8n/env.py", line 81, in __init__
+    parent_beacon_block_root_hex = data["parentBeaconBlockRoot"]
+                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^

Also, it doesn't emit jsonl ops any longer (traces)

user@debian-work:~/workspace/goevmlab$ git diff evms/testdata/traces/stackUnderflow_nonzeroMem.json.eels.stderr.txt 
diff --git a/evms/testdata/traces/stackUnderflow_nonzeroMem.json.eels.stderr.txt b/evms/testdata/traces/stackUnderflow_nonzeroMem.json.eels.stderr.txt
index d39cb6f..0f56912 100644
--- a/evms/testdata/traces/stackUnderflow_nonzeroMem.json.eels.stderr.txt
+++ b/evms/testdata/traces/stackUnderflow_nonzeroMem.json.eels.stderr.txt
@@ -1,13 +1 @@
-{"pc":0,"op":96,"gas":"0x79bee4","gasCost":"0x3","memSize":0,"stack":[],"depth":1,"refund":0,"opName":"PUSH1"}
-{"pc":2,"op":96,"gas":"0x79bee1","gasCost":"0x3","memSize":0,"stack":["0x0"],"depth":1,"refund":0,"opName":"PUSH1"}
-{"pc":4,"op":96,"gas":"0x79bede","gasCost":"0x3","memSize":0,"stack":["0x0","0x1"],"depth":1,"refund":0,"opName":"PUSH1"}
-{"pc":6,"op":96,"gas":"0x79bedb","gasCost":"0x3","memSize":0,"stack":["0x0","0x1","0x1"],"depth":1,"refund":0,"opName":"PUSH1"}
-{"pc":8,"op":96,"gas":"0x79bed8","gasCost":"0x3","memSize":0,"stack":["0x0","0x1","0x1","0x2"],"depth":1,"refund":0,"opName":"PUSH1"}
-{"pc":10,"op":97,"gas":"0x79bed5","gasCost":"0x3","memSize":0,"stack":["0x0","0x1","0x1","0x2","0x2"],"depth":1,"refund":0,"opName":"PUSH2"}
-{"pc":13,"op":97,"gas":"0x79bed2","gasCost":"0x3","memSize":0,"stack":["0x0","0x1","0x1","0x2","0x2","0x1f4"],"depth":1,"refund":0,"opName":"PUSH2"}
-{"pc":16,"op":244,"gas":"0x79becf","gasCost":"0x10a2a","memSize":0,"stack":["0x0","0x1","0x1","0x2","0x2","0x1f4","0xffff"],"depth":1,"refund":0,"opName":"DELEGATECALL"}
-{"pc":17,"op":54,"gas":"0x79b4a4","gasCost":"0x2","memSize":32,"stack":["0x0","0x1"],"depth":1,"refund":0,"opName":"CALLDATASIZE"}
-{"pc":18,"op":145,"gas":"0x79b4a2","gasCost":"0x3","memSize":32,"stack":["0x0","0x1","0x12"],"depth":1,"refund":0,"opName":"SWAP2"}
-{"pc":19,"op":142,"gas":"0x79b49f","gasCost":"0x3","memSize":32,"stack":["0x12","0x1","0x0"],"depth":1,"refund":0,"opName":"DUP15","error":"StackUnderflowError"}
-{"output":"","gasUsed":"0x79bee4","error":"StackUnderflowError"}
 {"stateRoot": "0x1f07fb182fd18ad9b11f8ef6cf369981e87e9f8514c803a1f2df145724f62fa4"}

Seems gone:

root@1953a6ac70c1:/testdata/cases# $eels statetest --json stackUnderflow_nonzeroMem.json 
{"stateRoot": "0x1f07fb182fd18ad9b11f8ef6cf369981e87e9f8514c803a1f2df145724f62fa4"}
[
    {
        "stateRoot": "0x1f07fb182fd18ad9b11f8ef6cf369981e87e9f8514c803a1f2df145724f62fa4",
        "fork": "London",
        "name": "00000000-mixed-0",
        "pass": false,
        "error": "post state root mismatch: got 1f07fb182fd18ad9b11f8ef6cf369981e87e9f8514c803a1f2df145724f62fa4, want 0000000000000000000000000000000000000000000000000000000000000000"
    }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants