go-ethereum/cmd
Martin HS 2bf4a8ff73
cmd/evm: refactor handling output-files for `t8n` (#30854)
As part of trying to make the inputs and outputs of the evm subcommands
more streamlined and aligned, this PR modifies how `evm t8n` manages
output-files.

Previously, we do a kind of wonky thing where between each transaction,
we invoke a `getTracer` closure. In that closure, we create a new
output-file, a tracer, and then make the tracer stream output to the
file. We also fiddle a bit to ensure that the file becomes properly
closed.

It is a kind of hacky solution we have in place. This PR changes it, so
that from the execution-pipeline point of view, we have just a regular
tracer. No fiddling with re-setting it or closing files.

That particular tracer, however, is a bit special: it takes care of
creating new files per transaction (in the tx-start-hook) and closing
(on tx-end-hook). Also instantiating the right type of underlying
tracer, which can be a json-logger or a custom tracer.

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-01-21 15:35:03 +08:00
..
abidump all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
abigen cmd/abigen: require either `--abi` or `--combined-json` (#31045) 2025-01-20 08:39:55 +01:00
blsync beacon/blsync: remove cli dependencies (#30720) 2024-11-08 15:21:00 +01:00
clef cmd/clef: fix JS issues in documentation (#30980) 2025-01-07 10:31:10 +01:00
devp2p all: fix some typos in comments and names (#31023) 2025-01-14 14:16:15 +01:00
era cmd: use package filepath over path for file system operations (#29227) 2024-03-12 10:00:34 +01:00
ethkey cmd: fix some typos in readmes (#29405) 2024-04-11 14:06:49 +03:00
evm cmd/evm: refactor handling output-files for `t8n` (#30854) 2025-01-21 15:35:03 +08:00
geth all: implement state history v2 (#30107) 2025-01-17 02:59:02 +01:00
rlpdump build: update to golangci-lint 1.61.0 (#30587) 2024-10-14 19:25:22 +02:00
utils cmd, core, miner: rework genesis setup (#30907) 2025-01-14 11:49:30 +01:00