Skip to content

Commit

Permalink
firehose dependency fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhyaniarun1993 committed Dec 12, 2024
1 parent 0509bfc commit bdb4a80
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions eth/tracers/live/firehose.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ import (
"time"

"github.com/erigontech/erigon-lib/chain"
"github.com/erigontech/erigon-lib/common"
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/common/math"
"github.com/erigontech/erigon-lib/crypto"
"github.com/erigontech/erigon-lib/log/v3"
"github.com/erigontech/erigon/common"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/core/tracing"
"github.com/erigontech/erigon/core/types"
"github.com/erigontech/erigon/core/vm"
"github.com/erigontech/erigon/eth/tracers"
"github.com/erigontech/erigon/params"
pbeth "github.com/erigontech/erigon/pb/sf/ethereum/type/v2"
"github.com/erigontech/erigon/rlp"

"github.com/holiman/uint256"
"golang.org/x/exp/maps"
Expand Down Expand Up @@ -522,9 +522,10 @@ func (f *Firehose) OnTxStart(evm *tracing.VMContext, tx types.Transaction, from
f.ensureInBlockAndNotInTrxAndNotInCall()

f.evm = evm
nounce, _ := evm.IntraBlockState.GetNonce(from)
var to libcommon.Address
if tx.GetTo() == nil {
to = crypto.CreateAddress(from, evm.IntraBlockState.GetNonce(from))
to = crypto.CreateAddress(from, nounce)
} else {
to = *tx.GetTo()
}
Expand Down Expand Up @@ -968,7 +969,8 @@ func (f *Firehose) getExecutedCode(evm *tracing.VMContext, call *pbeth.Call, cod
precompile := f.blockIsPrecompiledAddr(libcommon.BytesToAddress(call.Address))

if evm != nil && call.CallType == pbeth.CallType_CALL {
if !evm.IntraBlockState.Exist(libcommon.BytesToAddress(call.Address)) &&
exists, _ := evm.IntraBlockState.Exist(libcommon.BytesToAddress(call.Address))
if !exists &&
!precompile && f.blockRules.IsSpuriousDragon &&
(call.Value == nil || call.Value.Native().Sign() == 0) {
firehoseTrace("executed code IsSpuriousDragon callTyp=%s inputLength=%d", call.CallType.String(), len(call.Input) > 0)
Expand Down

0 comments on commit bdb4a80

Please sign in to comment.