go-ethereum/tests
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
..
evm-benchmarks@d8b88f4046 tests: update evm-benchmarks (#26255) 2022-11-28 11:13:41 +01:00
fuzzers all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
solidity all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
testdata@fa51c5c164 tests: update reference tests (#28778) 2024-01-15 09:15:40 +01:00
block_test_util.go eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
block_test.go tests, appveyor: only execute one in four permutations on CI (#29220) 2024-03-13 18:12:23 +01:00
difficulty_test_util.go all: add whitespace linter (#25312) 2022-07-25 13:14:03 +03:00
difficulty_test.go params: remove EIP150Hash from chainconfig (#27087) 2023-04-18 03:49:09 -04:00
gen_btheader.go build, tests: add execution-spec-tests (#26985) 2023-08-26 15:42:27 +02:00
gen_difficultytest.go all: simplify timestamps to uint64 (#19372) 2019-04-02 23:28:48 +03:00
gen_stenv.go tests: add currentExcessBlobGas to state tests (#28735) 2023-12-28 11:39:28 +01:00
gen_sttransaction.go tests: use 'sender' in state tests if present (#28023) 2023-08-29 04:36:10 +02:00
init_test.go tests: update execution spec tests + split statetest exec (#28993) 2024-02-15 13:30:11 +01:00
init.go build, tests: add execution-spec-tests (#26985) 2023-08-26 15:42:27 +02:00
rlp_test_util.go internal,tests: replace noarg fmt.Errorf with errors.New (#27335) 2023-05-25 02:54:28 -04:00
rlp_test.go tests: get test name from testing.T (#22941) 2021-05-25 22:47:14 +02:00
state_test_util.go eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
state_test.go tests, appveyor: only execute one in four permutations on CI (#29220) 2024-03-13 18:12:23 +01:00
transaction_test_util.go core/vm: implement EIP-3860: Limit and meter initcode (#23847) 2023-01-11 04:05:47 -05:00
transaction_test.go tests: get test name from testing.T (#22941) 2021-05-25 22:47:14 +02:00