go-ethereum/core/tracing
jwasinger 715bf8e81e
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
core: invoke selfdestruct tracer hooks during finalisation (#32919)
The core part of this PR that we need to adopt is to move the code and
nonce change hook invocations to occur at tx finalization, instead of
when the selfdestruct opcode is called.

Additionally:
* remove `SelfDestruct6780` now that it is essentially the same as
`SelfDestruct` just gated by `is new contract`
* don't duplicate `BalanceIncreaseSelfdestruct` (transfer to recipient
of selfdestruct) in the hooked statedb and in the opcode handler for the
selfdestruct opcode.
* balance is burned immediately when the beneficiary of the selfdestruct
is the sender, and the contract was created in the same transaction.
Previously we emit two balance increases to the recipient (see above
point), and a balance decrease from the sender.

---------

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
2026-01-16 15:10:08 -07:00
..
CHANGELOG.md core/tracing: update changelog (#32535) 2025-09-03 09:45:58 +02:00
gen_balance_change_reason_stringer.go core/tracing: stringer for gas and nonce change reasons (#31234) 2025-02-28 12:53:56 +01:00
gen_code_change_reason_stringer.go core/tracing: add code change reason (#32525) 2025-09-02 12:44:47 +02:00
gen_gas_change_reason_stringer.go core/tracing: stringer for gas and nonce change reasons (#31234) 2025-02-28 12:53:56 +01:00
gen_nonce_change_reason_stringer.go core: invoke selfdestruct tracer hooks during finalisation (#32919) 2026-01-16 15:10:08 -07:00
hooks.go core: invoke selfdestruct tracer hooks during finalisation (#32919) 2026-01-16 15:10:08 -07:00
journal.go core/tracing: add code change reason (#32525) 2025-09-02 12:44:47 +02:00
journal_test.go core/tracing: remove unnecessary 'copy' field skip in TestAllHooksCalled (#32622) 2025-09-16 19:58:37 +08:00