Commit Graph

32 Commits

Author SHA1 Message Date
Sina Mahmoodi a2ca5f81ff add desc for revert change reason 2024-10-10 12:47:37 +02:00
Sina Mahmoodi d2ba76f7a6 add license to journal_test 2024-10-10 12:44:13 +02:00
Sina Mahmoodi d9de74e983 refactor WrapWithJournal to use reflection 2024-10-09 17:33:04 +02:00
Sina Mahmoodi 6650000388 add note on balanceChangeRevert reason 2024-10-09 12:30:16 +02:00
Sina Mahmoodi 1862333296 fix journal cur rev Id 2024-10-08 20:09:28 +02:00
Sina Mahmoodi 1a64297b1d missed two hooks 2024-10-05 10:17:56 +02:00
Sina Mahmoodi 501f302b75 pass-through non-journaled hooks 2024-10-05 10:15:07 +02:00
Sina Mahmoodi 3c581556ab update test 2024-10-04 21:01:39 +02:00
Sina Mahmoodi 1cc58cf42e fix code and nonce param order 2024-10-04 20:54:32 +02:00
Sina Mahmoodi 838fc25dda resolve merge conflict 2024-10-04 18:06:07 +02:00
Sina Mahmoodi c915bed5e8 add block hash read hook 2024-10-03 14:07:30 +02:00
Karol Chojnowski 55ed8fef0b
core/tracing, core/vm: add ContractCode to the OpContext (#30466)
Extends the opcontext interface to include accessor for code being executed in current context. While it is possible to get the code via `statedb.GetCode`, that approach doesn't work for initcode.
2024-09-24 13:18:36 +02:00
Sina M 8032b63f16
core/tracing: add verkle gas change reasons to changelog (#30444)
Add changes from #30409 and #29338 to changelog.

---------

Co-authored-by: Martin HS <martin@swende.se>
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
2024-09-17 16:10:59 +02:00
Ikko Eltociear Ashimine 8dd296201d
core/tracing: fix typo in comment (#30443)
minor fix
2024-09-16 19:57:31 +02:00
Sina Mahmoodi 702a42feea fix indent 2024-09-16 13:29:10 +02:00
Sina Mahmoodi b87c4fe342 update changelog 2024-09-16 13:26:43 +02:00
Sina Mahmoodi dbe5f83b0a add tracing journal 2024-09-15 22:18:39 +02:00
Guillaume Ballet 07b5a04bd6
core/tracing: fix copy/paste error+comments in reason listing (#30431)
Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
2024-09-14 15:44:42 +02:00
Guillaume Ballet 9be2e010c1
core/state, core/vm: Nyota contract create init simplification (#30409)
Implementation of [this EIP-4762
update](https://github.com/ethereum/EIPs/pull/8867).

---------

Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
Co-authored-by: Tanishq Jasoria <jasoriatanishq@gmail.com>
2024-09-13 15:37:30 +02:00
Sina Mahmoodi aac40243b7 Add state read hooks 2024-09-02 10:08:09 +02:00
Sina Mahmoodi cf873c3767 core/tracing: add hook for reverted out blocks 2024-08-26 21:32:08 +02:00
Sina Mahmoodi f670a7fd93 core/tracing: emit state change events for journal reverts 2024-08-26 20:59:59 +02:00
Sina Mahmoodi b4e01743ea core/tracing: add GetCodeHash to statedb interface 2024-08-26 15:47:21 +02:00
Sina Mahmoodi 8659e68ad5 core/tracing: add vm context to system call hook 2024-08-26 15:45:56 +02:00
Sina M 7026bae17c
core/tracing: update latest release version (#30211) 2024-07-23 14:05:46 +02:00
jwasinger 41abab9e39
build: add check for stale generated files (#30037)
Co-authored-by: Felix Lange <fjl@twurst.com>
2024-07-01 17:16:15 +02:00
Chris Ziogas c9e0b3105b
Supply delta live tracer (#29347)
Introduces the first built-in live tracer. The supply tracer tracks ETH supply changes across blocks
and writes the output to disk. This will need to be enabled through CLI using the `--vmtrace supply` flag.

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2024-06-03 12:30:27 +02:00
Guillaume Ballet 44a50c9f96
cmd, core, params, trie: add verkle access witness gas charging (#29338)
Implements some of the changes required to charge and do gas accounting in verkle testnet.
2024-05-10 20:13:11 +02:00
Matthieu Vachon a09a610384
core/tracing: add system call callback when performing `ProcessBeaconBlockRoot` (#29355)
Added a start/end system where tracer can be notified that processing of some Ethereum system calls is starting processing and also notifies it when the processing has completed.

Doing a start/end for system call will enable tracers to "route" incoming next tracing events to go to a separate bucket than other EVM calls. Those not interested by this fact can simply avoid registering the hooks.

The EVM call is going to be traced normally afterward between the signals provided by those 2 new hooks but outside of a transaction context OnTxStart/End. That something implementors of live tracers will need to be aware of (since only "trx tracers" are not concerned by ProcessBeaconRoot).

---------

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2024-05-06 13:21:55 +02:00
Chris Ziogas fb08fd334a
core/tracing: Add OnClose Trace Hook (#29629)
The OnClose trace hook is being triggered on blockchain Stop, so as tracers can release any resources.
2024-04-24 07:54:59 +02:00
Sina M f202dfdd47
core/tracing: add changelog (#29388)
Co-authored-by: Matthieu Vachon <matthieu.o.vachon@gmail.com>
2024-04-09 12:12:02 +02: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