Matthieu Vachon
bb041978a7
Added back OnSystemCallStart/End that were lost in update to latest Geth version
2024-04-29 10:37:32 -04:00
Matthieu Vachon
a4e3ab8818
Merge tag 'v1.14.0' into firehose-fh3.0
2024-04-24 09:02:12 -04:00
Matthieu Vachon
ade7515c81
eth, eth/tracers: process beacon root before transactions ( #29402 )
...
The beacon root when applied in `state_processor.go` is performed right before executing transaction. That means that contract reliying on this value would query the same value found in the block header.
In that spirit, it means that any tracing/operation relying on state data which touches transaction must have updated the beacon root before any transaction processing.
2024-04-24 07:58:05 +02:00
Matthieu Vachon
a64a69dbfc
Merge remote-tracking branch 'origin/master' into firehose-fh3.0
...
# Conflicts:
# go.mod
2024-04-23 15:40:14 -04:00
Matthieu Vachon
7ae7701b37
Added further tracing on config and apply backward compatibility value
2024-04-22 14:22:14 -04:00
Matthieu Vachon
2108b9d42a
Fixed a few linting errors
2024-04-22 14:22:03 -04:00
Matthieu Vachon
ad7fdb83cc
Ported various improvements done in the Firehose tracer in other supported chains
2024-04-17 16:15:59 -04:00
Martin HS
7aafad2233
core/vm: better error-info for vm errors ( #29354 )
2024-04-06 12:22:55 +02:00
Aaron Chen
ccb76c01d7
eth/tracers: use slices.Contains ( #29461 )
2024-04-06 12:16:25 +02:00
Delweng
8c5576b1ac
eth/tracers: fix base fee and set blob fee in tests ( #29376 )
...
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2024-04-01 14:53:56 +02:00
Brandon Liu
a3829178af
eth/tracers/js: consistent name for method receivers ( #29375 )
2024-03-28 17:35:40 +01:00
cui
0183c7ad82
eth/tracers/logger: using maps.Equal ( #29384 )
...
Co-authored-by: Felix Lange <fjl@twurst.com>
2024-03-28 14:09:21 +01:00
Sina M
767b00b0b5
t8ntool: add optional call frames to json logger ( #29353 )
...
Adds a flag `--trace.callframes` to t8n which will log info when entering or exiting a call frame in addition to the execution steps.
---------
Co-authored-by: Mario Vega <marioevz@gmail.com>
2024-03-27 16:12:57 +01:00
Aaron Chen
723b1e36ad
all: fix mismatched names in comments ( #29348 )
...
* all: fix mismatched names in comments
* metrics: fix mismatched name in UpdateIfGt
2024-03-26 21:01:28 +01:00
Matthieu Vachon
262c3117f6
Merge remote-tracking branch 'origin/master' into firehose-fh3.0
...
# Conflicts:
# cmd/evm/internal/t8ntool/execution.go
# cmd/evm/internal/t8ntool/transition.go
# cmd/utils/flags.go
# consensus/beacon/consensus.go
# core/blockchain.go
# core/state_processor.go
# core/tracing/hooks.go
# core/vm/runtime/runtime.go
# eth/backend.go
# eth/tracers/api.go
# eth/tracers/dir.go
# eth/tracers/directory/tracers.go
# eth/tracers/internal/tracetest/calltrace_test.go
# eth/tracers/internal/tracetest/flat_calltrace_test.go
# eth/tracers/js/goja.go
# eth/tracers/js/tracer_test.go
# eth/tracers/live/noop.go
# eth/tracers/logger/logger.go
# eth/tracers/native/4byte.go
# eth/tracers/native/call.go
# eth/tracers/native/call_flat.go
# eth/tracers/native/mux.go
# eth/tracers/native/noop.go
# eth/tracers/native/prestate.go
# eth/tracers/tracers.go
# go.mod
2024-03-25 14:45:08 -04:00
Martin HS
14cc967d19
all: remove dependency on golang.org/exp ( #29314 )
...
This change includes a leftovers from https://github.com/ethereum/go-ethereum/pull/29307
- using the [new `slices` package](https://go.dev/doc/go1.21#slices ) and
- using the [new `cmp.Ordered`](https://go.dev/doc/go1.21#cmp ) instead of exp `constraints.Ordered`
2024-03-25 07:50:18 +01:00
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
Matthieu Vachon
ecc78f5dd0
Merge branch 'extended-tracer-struct' into firehose-fh3.0
2024-03-18 15:46:07 -04:00
Martin Holst Swende
4f87f174b3
eth/tracers, cmd/evm: unexport JSONlogger
2024-03-18 17:33:55 +01:00
Matthieu Vachon
b1d1d36dc4
Merge branch 'firehose-fh3.0-backport-1.13.5' into firehose-fh3.0
...
# Conflicts:
# accounts/abi/bind/backends/simulated.go
# cmd/evm/internal/t8ntool/execution.go
# cmd/evm/internal/t8ntool/flags.go
# cmd/evm/internal/t8ntool/transition.go
# cmd/geth/snapshot.go
# consensus/beacon/consensus.go
# consensus/ethash/consensus.go
# consensus/misc/dao.go
# core/blockchain.go
# core/chain_makers.go
# core/evm.go
# core/genesis.go
# core/genesis_test.go
# core/state/dump.go
# core/state/state_object.go
# core/state/state_test.go
# core/state/statedb.go
# core/state/statedb_fuzz_test.go
# core/state/statedb_test.go
# core/state/sync_test.go
# core/state/trie_prefetcher_test.go
# core/state_transition.go
# core/tracing/hooks.go
# core/txpool/blobpool/blobpool_test.go
# core/txpool/legacypool/legacypool2_test.go
# core/txpool/legacypool/legacypool_test.go
# core/types/account.go
# core/vm/errors.go
# core/vm/evm.go
# core/vm/instructions.go
# core/vm/interface.go
# core/vm/interpreter.go
# eth/api_debug_test.go
# eth/tracers/api.go
# eth/tracers/directory/util_test.go
# eth/tracers/firehose.go
# eth/tracers/internal/tracetest/calltrace_test.go
# eth/tracers/internal/tracetest/flat_calltrace_test.go
# eth/tracers/internal/tracetest/prestate_test.go
# eth/tracers/js/goja.go
# eth/tracers/js/tracer_test.go
# eth/tracers/logger/logger.go
# eth/tracers/logger/logger_test.go
# eth/tracers/native/call_flat.go
# eth/tracers/native/prestate.go
# eth/tracers/tracers_test.go
# go.mod
# internal/ethapi/api.go
# light/odr_test.go
# miner/worker.go
# params/version.go
# tests/block_test_util.go
# tests/state_test_util.go
2024-03-15 12:48:29 -04:00
Matthieu Vachon
5cf6340406
Fixed new keccak256 implementation that wasn't working properly
2024-03-15 10:57:39 -04:00
Matthieu Vachon
d673f1927c
Added Firehose 3.0 backport tracer
2024-03-15 10:56:57 -04:00
Matthieu Vachon
3834f135a9
Series of changes to get backport to 1.13.5 working
2024-03-14 16:53:22 -04:00
Sina Mahmoodi
77486e91fb
fix lint issue
2024-03-14 16:23:56 -04:00
Sina Mahmoodi
d0a86c45b5
rm canceler
2024-03-14 16:23:56 -04:00
Sina Mahmoodi
94fc0b4a9e
replace opcode with byte
...
# Conflicts:
# core/tracing/hooks.go
# core/vm/evm.go
# core/vm/instructions.go
# eth/tracers/js/tracer_test.go
2024-03-14 16:23:54 -04:00
Sina Mahmoodi
5c6fb316b7
rm OnKeccakPreimage
...
# Conflicts:
# core/tracing/hooks.go
2024-03-14 16:16:43 -04:00
Sina Mahmoodi
7190602bd2
rm embedding of noop tracer
2024-03-14 16:16:20 -04:00
Sina Mahmoodi
03e48ee451
rename tracer methods to On pattern
...
# Conflicts
# core/vm/interpreter.go
# eth/tracers/directory/noop.go
# eth/tracers/js/goja.go
# eth/tracers/live/noop.go
# eth/tracers/logger/logger.go
# eth/tracers/logger/logger_json.go
# eth/tracers/native/4byte.go
# eth/tracers/native/call.go
# eth/tracers/native/call_flat.go
# eth/tracers/native/mux.go
2024-03-14 16:16:18 -04:00
Sina Mahmoodi
25a3a744c3
rename Capture hooks to On
...
# Conflicts:
# cmd/evm/internal/t8ntool/execution.go
# core/vm/instructions.go
# eth/tracers/directory/noop.go
# eth/tracers/internal/tracetest/calltrace_test.go
# eth/tracers/internal/tracetest/flat_calltrace_test.go
# eth/tracers/internal/tracetest/prestate_test.go
# eth/tracers/js/goja.go
# eth/tracers/js/tracer_test.go
# eth/tracers/live/noop.go
# eth/tracers/native/4byte.go
# eth/tracers/native/call.go
# eth/tracers/native/call_flat.go
# eth/tracers/native/mux.go
# eth/tracers/native/prestate.go
2024-03-14 16:07:18 -04:00
Sina Mahmoodi
688f0b9654
rename scopeContext to opContext
2024-03-14 16:03:07 -04:00
Sina Mahmoodi
d4ec634c05
rename GetLogger to Hooks
...
# Conflicts:
# eth/tracers/logger/access_list_tracer.go
# eth/tracers/logger/logger.go
# eth/tracers/logger/logger_json.go
# eth/tracers/logger/logger_test.go
# eth/tracers/tracers_test.go
# internal/ethapi/api.go
2024-03-14 16:03:05 -04:00
Sina Mahmoodi
39fc9dcafb
move logger interface to core/tracing
...
# Conflicts:
# cmd/evm/internal/t8ntool/execution.go
# consensus/beacon/consensus.go
# consensus/ethash/consensus.go
# consensus/misc/dao.go
# core/evm.go
# core/genesis.go
# core/state/state_object.go
# core/state/state_test.go
# core/state/statedb.go
# core/state/statedb_fuzz_test.go
# core/state/statedb_test.go
# core/state/sync_test.go
# core/state/trie_prefetcher_test.go
# core/state_transition.go
# core/txpool/blobpool/blobpool_test.go
# core/txpool/legacypool/legacypool2_test.go
# core/txpool/legacypool/legacypool_test.go
# core/vm/evm.go
# core/vm/instructions.go
# core/vm/interface.go
# eth/api_debug_test.go
# internal/ethapi/api.go
# tests/block_test_util.go
# tests/state_test_util.go
2024-03-14 15:59:21 -04:00
Sina Mahmoodi
b202e8ab74
renaming GetLogger
...
# Conflicts:
# cmd/evm/internal/t8ntool/transition.go
# eth/tracers/logger/logger_test.go
# eth/tracers/tracers_test.go
2024-03-14 13:58:26 -04:00
Sina Mahmoodi
e1c669b3aa
moaar fixes
...
# Conflicts:
# core/state/state_test.go
# core/state/statedb_fuzz_test.go
# core/state/statedb_test.go
# core/state/sync_test.go
# core/state/trie_prefetcher_test.go
# core/txpool/blobpool/blobpool_test.go
# core/txpool/legacypool/legacypool2_test.go
# core/txpool/legacypool/legacypool_test.go
# eth/api_debug_test.go
2024-03-14 13:56:15 -04:00
Sina Mahmoodi
29ebfb30c3
fixes, rm t8ntool tracewriter
...
# Conflicts:
# cmd/evm/internal/t8ntool/execution.go
# cmd/evm/internal/t8ntool/transition.go
# core/vm/instructions.go
# eth/tracers/internal/tracetest/calltrace_test.go
# eth/tracers/internal/tracetest/flat_calltrace_test.go
# eth/tracers/internal/tracetest/prestate_test.go
# eth/tracers/js/tracer_test.go
# eth/tracers/logger/logger_test.go
# eth/tracers/tracers_test.go
# tests/block_test_util.go
# tests/state_test_util.go
2024-03-14 13:51:16 -04:00
Sina Mahmoodi
f1027b7c0a
fix goja scope object wrappers
2024-03-14 13:42:40 -04:00
Sina Mahmoodi
6013241175
fix memory copy util func
2024-03-14 13:42:40 -04:00
Sina Mahmoodi
e0b96540b7
Add canceler interface
2024-03-14 13:42:40 -04:00
Sina Mahmoodi
4e43718bd0
full struct-based tracing infra
...
# Conflicts:
# consensus/beacon/consensus.go
# consensus/ethash/consensus.go
# consensus/misc/dao.go
# core/blockchain.go
# core/evm.go
# core/genesis.go
# core/state/dump.go
# core/state/state_object.go
# core/state/statedb.go
# core/state_transition.go
# core/vm/evm.go
# core/vm/instructions.go
# core/vm/interface.go
# internal/ethapi/api.go
2024-03-14 12:09:18 -04:00
Sina Mahmoodi
4df6904051
use struct for tracing events
...
# Conflicts:
# core/blockchain.go
# core/state/state_object.go
# core/state/statedb.go
2024-03-14 11:57:58 -04:00
Sina Mahmoodi
8ec4560e17
refactor onBlockStart params, new skip method
2024-03-14 11:54:59 -04:00
Sina Mahmoodi
b210cc761d
remove onBeaconBlockRoot events
2024-03-14 11:54:59 -04:00
Sina Mahmoodi
d17940d2e7
minor fix
2024-03-14 11:54:59 -04:00
Sina Mahmoodi
318dc84314
add config for tracers
2024-03-14 11:54:59 -04:00
Matthieu Vachon
7b77261b7c
Added back OnNewAccount which is Firehose concept so I left it out of the merge commit just before this one
2024-03-13 16:24:14 -04:00
Matthieu Vachon
f47d2fc315
Merge branch 'extended-tracer-struct' into firehose-fh3.0
...
# Conflicts:
# core/blockchain.go
# core/state/statedb.go
# eth/backend.go
# eth/tracers/live/printer.go
# go.mod
# go.sum
2024-03-13 16:23:13 -04:00
Sina Mahmoodi
0b5975fee3
fix merge conflict
2024-03-13 12:48:34 +01:00
Sina Mahmoodi
65bdbc175f
fix lint issue
2024-03-13 12:45:22 +01:00
Sina M
eff424cc30
eth/tracers: fix concurrency issue for JS-tracing a block ( #29238 )
...
This change fixes a concurrency-issue where JS-tracers were accessing the block-ctx GetHash function in a in parallel, which is not safe.
2024-03-13 07:40:02 +01:00