go-ethereum/cmd
Sina M 064f37d6f6
eth/tracers: live chain tracing with hooks (#29189)
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: Matthieu Vachon <matthieu.o.vachon@gmail.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: Martin HS <martin@swende.se>
2024-03-22 18:53:53 +01:00
..
abidump all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
abigen all: replace log15 with slog (#28187) 2023-11-29 08:33:50 +01:00
blsync beacon/blsync: support for deneb fork (#29180) 2024-03-20 19:22:44 +01:00
bootnode cmd/evm, cmd/clef, cmd/bootnode: fix / unify logging (#28696) 2023-12-18 14:11:27 +01:00
clef cmd/clef: add spaces in README.md table (#29077) 2024-02-26 11:03:59 +01:00
devp2p cmd/devp2p: fix decoding of raw RLP ENR attributes (#29257) 2024-03-14 10:32:49 +01:00
era cmd: use package filepath over path for file system operations (#29227) 2024-03-12 10:00:34 +01:00
ethkey cmd: run tests in parallel (#28546) 2023-11-20 10:52:14 +01:00
evm eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
geth eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
p2psim all: replace some cases of strings.SplitN with strings.Cut (#28446) 2023-11-15 14:42:33 +01:00
rlpdump cmd/rlpdump: add -pos flag, displaying byte positions (#28785) 2024-01-14 12:32:48 +01:00
utils eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00