Skip to content

Commit 52eb1bb

Browse files
fselmomarioevz
andauthored
feat(clis): Turn on evm tracing for EELS (#1174)
* Turn on evm tracing for EELS: - Always send ``trace``, and if it's set to ``True``, send a known temp ``output-basedir`` to the EELS server / daemon. The server will include the full trace, using the ``output-basedir`` to store the trace ``.jsonl`` files to be collected as expected by EEST. * chore(tox,ci,uv.lock): Update EELS reference commit to support tracing --------- Co-authored-by: Mario Vega <[email protected]>
1 parent 7cbf9fb commit 52eb1bb

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

.github/workflows/tox_verify.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
uses: actions/checkout@v4
103103
with:
104104
repository: ethereum/execution-specs
105-
ref: 9923823367b5586228e590537d47aa9cc4c6a206
105+
ref: 78fb726158c69d8fa164e28f195fabf6ab59b915
106106
path: execution-specs
107107
sparse-checkout: |
108108
src/ethereum
@@ -139,7 +139,7 @@ jobs:
139139
uses: actions/checkout@v4
140140
with:
141141
repository: ethereum/execution-specs
142-
ref: 9923823367b5586228e590537d47aa9cc4c6a206
142+
ref: 78fb726158c69d8fa164e28f195fabf6ab59b915
143143
path: execution-specs
144144
sparse-checkout: |
145145
src/ethereum

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ Release tarball changes:
9797
- ✨ Fill test fixtures using EELS by default. EEST now uses the [`ethereum-specs-evm-resolver`](https://github.com/petertdavies/ethereum-spec-evm-resolver) with the EELS daemon ([#792](https://github.com/ethereum/execution-spec-tests/pull/792)).
9898
- 🔀 Move the `evm_transition_tool` package to `ethereum_clis` and derive the transition tool CL interfaces from a shared `EthereumCLI` class that can be reused for other sub-commands ([#894](https://github.com/ethereum/execution-spec-tests/pull/894)).
9999
- ✨ Pass `state_test` property to T8N tools that support it (Only EELS at the time of merge) ([#943](https://github.com/ethereum/execution-spec-tests/pull/943)).
100+
- ✨ Turn on `--traces` for EELS + `ethereum-specs-evm-resolver` ([#1174](https://github.com/ethereum/execution-spec-tests/pull/1174)).
100101

101102
### 📋 Misc
102103

eels_resolutions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"EELSMaster": {
33
"git_url": "https://github.com/ethereum/execution-specs.git",
44
"branch": "master",
5-
"commit": "9923823367b5586228e590537d47aa9cc4c6a206"
5+
"commit": "78fb726158c69d8fa164e28f195fabf6ab59b915"
66
},
77
"Frontier": {
88
"same_as": "EELSMaster"

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ classifiers = [
1616
]
1717
dependencies = [
1818
"click>=8.1.0,<9",
19-
"ethereum @ git+https://github.com/ethereum/execution-specs@9923823367b5586228e590537d47aa9cc4c6a206",
19+
"ethereum @ git+https://github.com/ethereum/execution-specs@78fb726158c69d8fa164e28f195fabf6ab59b915",
2020
"hive.py @ git+https://github.com/marioevz/hive.py",
2121
"ethereum-spec-evm-resolver @ git+https://github.com/petertdavies/ethereum-spec-evm-resolver",
2222
"setuptools",
@@ -123,4 +123,4 @@ mypy_path = ["src", "$MYPY_CONFIG_FILE_DIR/stubs"]
123123
plugins = ["pydantic.mypy"]
124124

125125
[tool.uv.sources]
126-
ethereum = { git = "https://github.com/ethereum/execution-specs", rev = "9923823367b5586228e590537d47aa9cc4c6a206" }
126+
ethereum = { git = "https://github.com/ethereum/execution-specs", rev = "78fb726158c69d8fa164e28f195fabf6ab59b915" }

src/ethereum_clis/transition_tool.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,11 @@ def _evaluate_server(
322322
request_data = t8n_data.get_request_data()
323323
request_data_json = request_data.model_dump(mode="json", **model_dump_config)
324324

325+
temp_dir = tempfile.TemporaryDirectory()
326+
request_data_json["trace"] = self.trace
327+
if self.trace:
328+
request_data_json["output-basedir"] = temp_dir.name
329+
325330
if debug_output_path:
326331
request_info = (
327332
f"Server URL: {self.server_url}\n\n"
@@ -350,6 +355,10 @@ def _evaluate_server(
350355

351356
output: TransitionToolOutput = TransitionToolOutput.model_validate(response_json)
352357

358+
if self.trace:
359+
self.collect_traces(output.result.receipts, temp_dir, debug_output_path)
360+
temp_dir.cleanup()
361+
353362
if debug_output_path:
354363
response_info = (
355364
f"Status Code: {response.status_code}\n\n"

uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)