From 9b527a80337845133052c6208aaa6b134935069d Mon Sep 17 00:00:00 2001 From: protolambda Date: Thu, 8 Aug 2024 16:55:54 -0600 Subject: [PATCH] eth/tracers/live: update supply tracer to track deposits --- eth/tracers/live/supply.go | 3 +++ fork.yaml | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/eth/tracers/live/supply.go b/eth/tracers/live/supply.go index 96f7059454..cfa4843bfe 100644 --- a/eth/tracers/live/supply.go +++ b/eth/tracers/live/supply.go @@ -188,6 +188,9 @@ func (s *supply) OnBalanceChange(a common.Address, prevBalance, newBalance *big. // BalanceDecreaseSelfdestructBurn is non-reversible as it happens // at the end of the transaction. s.delta.Burn.Misc.Sub(s.delta.Burn.Misc, diff) + // Technically an OP-Stack deposit mint is a "withdrawal" from L1, taking funds into L2. + case tracing.BalanceMint: + s.delta.Issuance.Withdrawals.Add(s.delta.Issuance.Withdrawals, diff) default: return } diff --git a/fork.yaml b/fork.yaml index 67253fcf18..63801ca37f 100644 --- a/fork.yaml +++ b/fork.yaml @@ -259,6 +259,13 @@ def: globs: - "accounts/abi/bind/backends/simulated.go" - "ethclient/simulated/backend.go" + - title: Live tracer update + description: | + Track L1-deposited native currency that is coming into the L2 supply. + The balance delta is considered to be a "withdrawal" from L1, + similar to a withdrawal of the Beacon-chain into the Ethereum L1 execution chain. + globs: + - "eth/tracers/live/supply.go" - title: "Hardware wallet support" description: Extend Ledger wallet support for newer devices on Macos sub: