You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
eth/tracers: supply tracer counts the EIP-8246 selfdestruct as a burn #2832
The supply live tracer (--vmtrace supply) counts a selfdestruct-to-self as burn.misc whenever the SELFDESTRUCT hook fires with from == to and a
non-zero balance. Since EIP-8246 (Amsterdam) preserves that balance instead of
burning it, the tracer over-reports the burn on Amsterdam chains.
The check predates EIP-8246 and has no fork gate. The EIP-8246 state and hook
changes do not cover it: hookedStateDB.Finalise no longer emits BalanceDecreaseSelfdestructBurn on Amsterdam, and the EIP-7708 burn logs are
gone, but this path infers the burn from the OnEnter event instead of a
balance hook, so it still accounts the preserved balance as burnt.
Upstream
go-ethereum has the same code and the same latent bug. Its EIP-8246 commit
(go-ethereum ethereum#35219) does not touch eth/tracers/, and its selfdestruct supply
test runs with params.TestChainConfig, where Cancun and Amsterdam are unset,
so the path was never exercised under the new rules. There is no upstream fix
to port, but upstream's tracer already carries the plumbing needed to gate the
check: a chainConfig *params.ChainConfig field filled by the OnBlockchainInit hook (used there for blob fees). This repository dropped
both when the blob-fee code was removed.
Proposed fix
Restore chainConfig and the OnBlockchainInit hook in the supply tracer. core/blockchain.go already invokes OnBlockchainInit for every live tracer.
Cache IsAmsterdam(block.Number) in OnBlockStart and only record call.burn while it is false. This repository's forks are block-based, so
the fork check needs the block number only.
Treat a missing chain config as "not Amsterdam", keeping the current
behaviour instead of silently dropping burn accounting.
Add tests: Amsterdam active (no burn), fork block boundary, pre-Amsterdam
(burn still reported), and a reverted selfdestruct (never counted).
Impact
Observability only, no consensus change. Production XDC networks do not
schedule Amsterdam, so the affected set is an Amsterdam-enabled dev/test chain
with --vmtrace supply enabled.
Relation to other work
EIP-8246 itself is tracked in #2766. This issue only fixes the tracer; the
consensus change is independent of it.
Fixed by #2833, merged into dev-upgrade as c2725ee4de. The supply live tracer accounts the self-destruct burn from the BalanceDecreaseSelfdestructBurn event alone (eth/tracers/live/supply.go:183), so the EIP-8246 shape is no longer double counted. Closing manually: #2833 targets dev-upgrade, not the default branch, so its Closes #2832 keyword did not take effect.
Activity
fix(eth/tracers): skip the EIP-8246 selfdestruct burn ethereum#35219, c…
fix(eth/tracers): skip the EIP-8246 selfdestruct burn ethereum#35219, c…
fix(eth/tracers): skip the EIP-8246 selfdestruct burn ethereum#35219, c…
fix(eth/tracers): skip the EIP-8246 selfdestruct burn ethereum#35219, c…
fix(eth/tracers): skip the EIP-8246 selfdestruct burn ethereum#35219
fix(eth/tracers): skip the EIP-8246 selfdestruct burn ethereum#35219
fix(eth/tracers): skip the EIP-8246 selfdestruct burn ethereum#35219
fix(eth/tracers): skip the EIP-8246 selfdestruct burn ethereum#35219
fix(eth/tracers): skip the EIP-8246 selfdestruct burn ethereum#35219
fix(eth/tracers): skip the EIP-8246 selfdestruct burn ethereum#35219, c…
gzliudan commentedon Oct 28, 2026
Fixed by #2833, merged into
dev-upgradeasc2725ee4de. The supply live tracer accounts the self-destruct burn from theBalanceDecreaseSelfdestructBurnevent alone (eth/tracers/live/supply.go:183), so the EIP-8246 shape is no longer double counted. Closing manually: #2833 targetsdev-upgrade, not the default branch, so itsCloses #2832keyword did not take effect.