go-ethereum/eth/tracers/native
Daniel Liu ad9003c41e
eth/tracers: live chain tracing with hooks #29189 (#1352)
Here we add a Go API for running tracing plugins within the main block import process.

As an advanced user of geth, you can now create a Go file in eth/tracers/live/, and within
that file register your custom tracer implementation. Then recompile geth and select your tracer
on the command line. Hooks defined in the tracer will run whenever a block is processed.

The hook system is defined in package core/tracing. It uses a struct with callbacks, instead of
requiring an interface, for several reasons:

- We plan to keep this API stable long-term. The core/tracing hook API does not depend on
  on deep geth internals.
- There are a lot of hooks, and tracers will only need some of them. Using a struct allows you
   to implement only the hooks you want to actually use.

All existing tracers in eth/tracers/native have been rewritten to use the new hook system.

This change breaks compatibility with the vm.EVMLogger interface that we used to have.
If you are a user of vm.EVMLogger, please migrate to core/tracing, and sorry for breaking
your stuff. But we just couldn't have both the old and new tracing APIs coexist in the EVM.

---------

Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
Co-authored-by: Matthieu Vachon <matthieu.o.vachon@gmail.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: Martin HS <martin@swende.se>
2025-09-09 17:30:56 +08:00
..
4byte.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
call.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
call_flat.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
contract.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
gen_account_json.go eth/tracers: simplify test framework #25973 (#1304) 2025-09-09 07:46:56 +08:00
gen_callframe_json.go eth/tracers/native: set created address to nil in case of failure #26779 (#1321) 2025-09-09 11:17:01 +08:00
gen_flatcallaction_json.go eth/tracers: add native flatCallTracer (aka parity style tracer) #26377 (#1320) 2025-09-09 11:03:38 +08:00
gen_flatcallresult_json.go eth/tracers: add native flatCallTracer (aka parity style tracer) #26377 (#1320) 2025-09-09 11:03:38 +08:00
mux.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
noop.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
prestate.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00