Skip to content

all: refactor new EVM live tracer struct #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: add-message-struct
Choose a base branch
from

Conversation

chiphamskymavis
Copy link
Contributor

@chiphamskymavis chiphamskymavis commented May 7, 2025

@trantienduchn
Copy link
Contributor

TODO: pickup hookedStateDB refactoring ethereum/go-ethereum#30569

chiphamskymavis and others added 13 commits July 1, 2025 10:40
* core/state: add tracing hook to state db

* core/state: add tracing hook to state object

* workflows: enable unit test
* core/state: add BalanceChangeReason to state object

* core/state: add BalanceChangeReason to StateDB.AddBalance

* core/state: add BalanceChangeReason to StateDB.SubBalance

* core/state: add BalanceChangeReason to StateDB.SetBalance
* core/vm: add VMError

* core/vm: use live tracer in EVMInterpreter.Run

* core: add live tracer to applyTransaction

* core: add live tracer to state transition flow

* core/vm: run precompiled contract with live tracer

* core/vm/runtime: add live tracer for runtime execution
* core/vm: remove usages of older tracer from interpreter

* core: remove usages of older tracer from state transition

* core/vm: remove usages of older tracer from evm

* core/vm: remove usages of older tracer from instructions

* all: replace the older tracer by live tracer

* eth/tracer/logger,internal/ethapi: update access list tracer

* all: replace LiveTracer by Tracer

* all: support calltracer2

* eth/tracer/internal/tracetest: fix test
…etest (#83)

* core: set logger for blockchain

* tests: state test supports live tracer
* eth/tracer/live: add supply live tracer

* eth/tracers: fix supply live tracer test

* core: Close all tracers when stop blockchain

* eth/tracers: fix supply live tracer test
* core, eth/tracers: move chainconfig to tracers

* eth/tracer/live: add noop live tracer

* core/tracers/live: rename supply to supplyTracer

* cmd/utils, eth/tracers: set default tracer config to empty object
* core/vm/runtime: call OnTxStart before prepare state DB in Call

* core/state: simplify state selfdestruct
sonhv0212 and others added 4 commits July 1, 2025 19:57
This PR extends the Hooks interface with a new method,
`OnSystemCallStartV2`, which takes `VMContext` as its parameter.

Motivation

By including `VMContext` as a parameter, the `OnSystemCallStartV2` hook
achieves parity with the `OnTxStart` hook in terms of provided insights.
This alignment simplifies the inner tracer logic, enabling consistent
handling of state changes and internal calls within the same framework.

---------

Co-authored-by: Sina Mahmoodi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants