Skip to content

Commit

Permalink
Add tracing support for daemon:
Browse files Browse the repository at this point in the history
- If ``trace`` is passed in the POST, turn on full trace in the T8N tool.

- Validate that ``output-basedir`` is also specified as EEST relies on a
  known location for the trace files. Raise a clarifying error if it is not
  specified.
  • Loading branch information
fselmo committed Feb 4, 2025
1 parent 9923823 commit 404435b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/ethereum_spec_tools/evm_tools/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,23 @@ def do_POST(self) -> None:
f"--state.reward={content['state']['reward']}",
]

trace = content.get("trace", False)
output_basedir = content.get("output-basedir", None)
if trace:
if not output_basedir:
raise ValueError(
"`output-basedir` should be provided when `--trace` is enabled."
)
# send full trace output if ``trace`` is ``True``
args.extend(
[
"--trace",
"--trace.memory",
"--trace.returndata",
f"--output.basedir={output_basedir}",
]
)

query_string = urlparse(self.path).query
if query_string:
query = parse_qs(
Expand Down

0 comments on commit 404435b

Please sign in to comment.