go-ethereum/core/vm
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
..
privacy all: use big.Sign to compare with zero #29490 (#1387) 2025-08-28 18:56:39 +08:00
runtime eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
testdata core/vm, protocol_params: implement eip-2565 modexp repricing (#21607) 2024-10-17 10:36:53 +08:00
analysis.go core/vm: clarify comment (#27045) 2025-02-05 18:16:17 +08:00
analysis_test.go core/vm: use clear from go v1.21 #29307 (#1246) 2025-08-04 11:54:49 +08:00
common.go all: get rid of custom MaxUint64 and MaxUint64 (#30636) 2024-12-28 09:06:31 +08:00
contract.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
contracts.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
contracts_fuzz_test.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
contracts_test.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
doc.go core/vm: remove JIT VM codes (#16362) 2018-03-26 13:48:04 +03:00
eips.go core/vm: BLOBHASH opcode 0x49 (#27356) 2025-02-11 18:31:30 +08:00
errors.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
evm.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
gas.go core/vm: use uint256 in EVM implementation (#20787) 2024-03-01 14:13:23 +08:00
gas_table.go core: fix typos (#1237) 2025-07-26 17:42:50 +08:00
gas_table_test.go all: new empty trie with types.EmptyRootHash instead of null (#27230) 2025-02-07 13:04:45 +08:00
instructions.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
instructions_test.go core/vm: BLOBHASH opcode 0x49 (#27356) 2025-02-11 18:31:30 +08:00
interface.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
interpreter.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
jump_table.go core/vm: enable cancun instruction set 2025-02-19 14:20:45 +08:00
jump_table_export.go core: fix typos (#1237) 2025-07-26 17:42:50 +08:00
jump_table_test.go core: fix typos (#1237) 2025-07-26 17:42:50 +08:00
memory.go core/vm, go.mod: update uint256 to v1.3.2 and use faster method #30868 (#1241) 2025-07-17 17:56:53 +08:00
memory_table.go core/vm: implement EIP-5656, mcopy instruction (#26181) 2025-02-06 16:54:19 +08:00
memory_test.go core/vm: implement EIP-5656, mcopy instruction (#26181) 2025-02-06 16:54:19 +08:00
opcodes.go core/vm: BLOBHASH opcode 0x49 (#27356) 2025-02-11 18:31:30 +08:00
operations_acl.go eth/tracers: live chain tracing with hooks #29189 (#1352) 2025-09-09 17:30:56 +08:00
stack.go core/vm: less allocations for various call variants (#21222) 2024-09-22 18:42:11 +08:00
stack_table.go new EVM Upgrade 2021-09-21 16:53:46 +05:30
XDCx_price.go new EVM Upgrade 2021-09-21 16:53:46 +05:30