go-ethereum/cmd/geth
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
..
testdata consensus, cmd, core, eth: remove support for non-merge mode of operation (#29169) 2024-03-05 16:13:28 +02:00
accountcmd_test.go cmd: run tests in parallel (#28546) 2023-11-20 10:52:14 +01:00
accountcmd.go cmd/geth: make account commands not require datadir lock (#27084) 2023-04-27 06:57:29 -04:00
attach_test.go cmd/geth: atomic types used (#27756) 2023-07-24 13:22:54 +03:00
chaincmd.go eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
config.go eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
consolecmd_test.go miner: refactor the miner, make the pending block on demand (#28623) 2024-03-06 14:45:03 +02:00
consolecmd.go node: remove unused error return from Attach (#27450) 2023-06-14 08:24:47 -04:00
dbcmd.go cmd, triedb: implement history inspection (#29267) 2024-03-22 20:12:10 +08:00
exportcmd_test.go cmd: run tests in parallel (#28546) 2023-11-20 10:52:14 +01:00
genesis_test.go cmd/geth: fix failing test (#28322) 2023-10-12 09:54:00 +02:00
logging_test.go core/txpool : small cleanup refactors (#28654) 2023-12-12 17:23:36 +02:00
logtestcmd_active.go cmd/geth, internal/debug: get rid of by-default log config (#28801) 2024-01-12 15:59:03 +02:00
logtestcmd_inactive.go cmd/geth: test for logging-output (#28373) 2023-10-25 17:57:12 +02:00
main.go eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
misccmd.go all: remove ethash pow, only retain shims needed for consensus and tests (#27178) 2023-05-03 12:58:39 +03:00
run_test.go cmd, les, tests: remove light client code (#28586) 2023-11-23 16:28:26 +02:00
snapshot.go all: remove redundant import aliases (#29144) 2024-03-02 22:42:50 +02:00
verkle.go all: remove redundant import aliases (#29144) 2024-03-02 22:42:50 +02:00
version_check_test.go cmd: run tests in parallel (#28546) 2023-11-20 10:52:14 +01:00
version_check.go cmd: migrate to urfave/cli/v2 (#24751) 2022-06-27 18:22:36 +02:00