From 448b405d83493e80072ba34de51dfbaf51467126 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Mon, 4 Mar 2024 09:29:38 -0300 Subject: [PATCH] Truncate BALANCE opcode parameter for witness recording Signed-off-by: Ignacio Hagopian --- core/vm/instructions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 095846feff..177e882879 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -265,7 +265,7 @@ func opBalance(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([] slot := scope.Stack.peek() address := common.Address(slot.Bytes20()) if interpreter.evm.chainRules.IsPrague { - statelessGas := interpreter.evm.Accesses.TouchAddressOnReadAndComputeGas(slot.Bytes(), uint256.Int{}, utils.BalanceLeafKey) + statelessGas := interpreter.evm.Accesses.TouchAddressOnReadAndComputeGas(address[:], uint256.Int{}, utils.BalanceLeafKey) if !scope.Contract.UseGas(statelessGas) { scope.Contract.Gas = 0 return nil, ErrOutOfGas