From 8cba58d9fe1003a194c6ade8e0a79eb275d667ba Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 4 Sep 2024 10:36:20 -0700 Subject: [PATCH] Disable lazy evaluation in zero tracer --- core/vm/evmtypes/evmtypes.go | 1 + eth/tracers/native/zero.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/core/vm/evmtypes/evmtypes.go b/core/vm/evmtypes/evmtypes.go index 1cd8a68e0b7..f4d10657fe3 100644 --- a/core/vm/evmtypes/evmtypes.go +++ b/core/vm/evmtypes/evmtypes.go @@ -115,4 +115,5 @@ type IntraBlockState interface { AddLog(*types.Log) GetLogs(hash common.Hash) []*types.Log + SetDisableBalanceInc(disable bool) } diff --git a/eth/tracers/native/zero.go b/eth/tracers/native/zero.go index 52274bdc0cb..3d4c05b51a6 100644 --- a/eth/tracers/native/zero.go +++ b/eth/tracers/native/zero.go @@ -54,6 +54,8 @@ func (t *zeroTracer) CaptureStart(env *vm.EVM, from libcommon.Address, to libcom t.to = &to t.env = env + t.env.IntraBlockState().SetDisableBalanceInc(true) + t.addAccountToTrace(from) t.addAccountToTrace(to) t.addAccountToTrace(env.Context.Coinbase)