go-ethereum/tests
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
..
fuzzers tests/fuzzers: added bn marshaling fuzzers #32053 (#1228) 2025-07-26 17:36:58 +08:00
block_test.go FIx Bad block error. 2021-09-17 17:59:06 +05:30
block_test_util.go all: update dead wiki links #32215 (#1409) 2025-09-03 15:41:48 +08:00
difficulty_test.go params: remove EIP150Hash from chainconfig (#27087) 2025-02-05 18:16:17 +08:00
difficulty_test_util.go all: simplify timestamps to uint64 #19372 (#1318) 2025-08-08 10:33:37 +08:00
gen_btheader.go all: simplify timestamps to uint64 #19372 (#1318) 2025-08-08 10:33:37 +08:00
gen_difficultytest.go all: simplify timestamps to uint64 #19372 (#1318) 2025-08-08 10:33:37 +08:00
gen_stenv.go tests: update for London (#22976) 2024-11-01 11:36:52 +08:00
gen_sttransaction.go tests: update for London (#22976) 2024-11-01 11:36:52 +08:00
gen_tttransaction.go all: update files by 'go generate ./...' 2025-01-22 15:10:52 +08:00
gen_vmexec.go Access list state test format (#22290) 2024-11-01 11:36:52 +08:00
init.go new EVM Upgrade 2021-09-21 16:53:46 +05:30
init_test.go core: check if sender is EOA (#23303) 2024-11-01 11:36:53 +08:00
rlp_test.go tests: update tests and implement general state tests (#14734) 2017-07-11 13:49:14 +02:00
rlp_test_util.go all: use errrors.New instead of empty fmt.Errorf 2024-06-14 19:19:21 +08:00
state_test.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
state_test_util.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
transaction_test.go new EVM Upgrade 2021-09-21 16:53:46 +05:30
transaction_test_util.go build: add imports for go generate tools (#24682) 2025-01-20 11:52:59 +08:00
vm_test.go new EVM Upgrade 2021-09-21 16:53:46 +05:30
vm_test_util.go core/vm: make time field use uint64 #26474 (#1319) 2025-08-20 15:22:06 +08:00