Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,25 +711,7 @@ func (s *StateDB) getOrNewStateObject(addr common.Address) *stateObject {
// createObject creates a new state object. The assumption is held there is no
// existing account with the given address, otherwise it will be silently overwritten.
func (s *StateDB) createObject(addr common.Address) *stateObject {
var prevExist bool
if s.logger != nil && s.logger.OnNewAccount != nil {
prevExist = s.getStateObject(addr) != nil
if !prevExist {
if mutation := s.mutations[addr]; mutation != nil && mutation.isDelete() {
prevExist = true
}
}
}

obj := newObject(s, addr, nil)

if s.logger != nil && s.logger.OnNewAccount != nil && !prevExist {
// Firehose: Arbitrum Firehose tracer is created from a development version of Firehose 3.0
// and add the OnNewAccount implemented only on new account only while "stock" Firehose 2.3
// model actually has OnNewAccount implemented on every account even if a previous account existed.
s.logger.OnNewAccount(addr)
}

s.journal.createObject(addr)
s.setStateObject(obj)
return obj
Expand Down
10 changes: 0 additions & 10 deletions core/tracing/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,6 @@ type Hooks struct {
// Stylus: capture hostio invocation
CaptureStylusHostio CaptureStylusHostioHook

// Arbitrum Firehose
OnBlockUpdate func(b *types.Block, td *big.Int)

// Firehose backward compatibility
// This hook exist because some current Firehose supported chains requires it
// but this field is going to be deprecated and newer chains will not produced
// those events anymore. The hook is registered conditionally based on the
// tracer configuration.
OnNewAccount func(address common.Address)

// Temporary fix to try to align with older Arbitrum Firehose instrumentation until we understand why it creates
// differences in Arbitrum.
OnKeccakPreimage func(hash common.Hash, preimage []byte)
Expand Down
Loading