diff --git a/arbos/block_processor.go b/arbos/block_processor.go index e239efa552..37877df64c 100644 --- a/arbos/block_processor.go +++ b/arbos/block_processor.go @@ -146,6 +146,7 @@ func ProduceBlock( chainContext core.ChainContext, chainConfig *params.ChainConfig, batchFetcher arbostypes.FallibleBatchFetcher, + isMsgForPrefetch bool, ) (*types.Block, types.Receipts, error) { var batchFetchErr error txes, err := ParseL2Transactions(message, chainConfig.ChainID, func(batchNum uint64, batchHash common.Hash) []byte { @@ -171,7 +172,7 @@ func ProduceBlock( hooks := NoopSequencingHooks() return ProduceBlockAdvanced( - message.Header, txes, delayedMessagesRead, lastBlockHeader, statedb, chainContext, chainConfig, hooks, + message.Header, txes, delayedMessagesRead, lastBlockHeader, statedb, chainContext, chainConfig, hooks, isMsgForPrefetch, ) } @@ -185,6 +186,7 @@ func ProduceBlockAdvanced( chainContext core.ChainContext, chainConfig *params.ChainConfig, sequencingHooks *SequencingHooks, + isMsgForPrefetch bool, ) (*types.Block, types.Receipts, error) { state, err := arbosState.OpenSystemArbosState(statedb, nil, true) @@ -374,7 +376,9 @@ func ProduceBlockAdvanced( if chainConfig.DebugMode() { logLevel = log.Warn } - logLevel("error applying transaction", "tx", printTxAsJson{tx}, "err", err) + if !isMsgForPrefetch { + logLevel("error applying transaction", "tx", printTxAsJson{tx}, "err", err) + } if !hooks.DiscardInvalidTxsEarly { // we'll still deduct a TxGas's worth from the block-local rate limiter even if the tx was invalid blockGasLeft = arbmath.SaturatingUSub(blockGasLeft, params.TxGas) diff --git a/cmd/replay/main.go b/cmd/replay/main.go index 7ab59fc513..5369495324 100644 --- a/cmd/replay/main.go +++ b/cmd/replay/main.go @@ -273,7 +273,7 @@ func main() { batchFetcher := func(batchNum uint64) ([]byte, error) { return wavmio.ReadInboxMessage(batchNum), nil } - newBlock, _, err = arbos.ProduceBlock(message.Message, message.DelayedMessagesRead, lastBlockHeader, statedb, chainContext, chainConfig, batchFetcher) + newBlock, _, err = arbos.ProduceBlock(message.Message, message.DelayedMessagesRead, lastBlockHeader, statedb, chainContext, chainConfig, batchFetcher, false) if err != nil { panic(err) } diff --git a/execution/gethexec/block_recorder.go b/execution/gethexec/block_recorder.go index 5e25e592be..ff22dcfd91 100644 --- a/execution/gethexec/block_recorder.go +++ b/execution/gethexec/block_recorder.go @@ -145,6 +145,7 @@ func (r *BlockRecorder) RecordBlockCreation( chaincontext, chainConfig, batchFetcher, + false, ) if err != nil { return nil, err diff --git a/execution/gethexec/executionengine.go b/execution/gethexec/executionengine.go index 00cc593de4..685870f257 100644 --- a/execution/gethexec/executionengine.go +++ b/execution/gethexec/executionengine.go @@ -328,6 +328,7 @@ func (s *ExecutionEngine) sequenceTransactionsWithBlockMutex(header *arbostypes. s.bc, s.bc.Config(), hooks, + false, ) if err != nil { return nil, err @@ -419,7 +420,7 @@ func (s *ExecutionEngine) sequenceDelayedMessageWithBlockMutex(message *arbostyp } startTime := time.Now() - block, statedb, receipts, err := s.createBlockFromNextMessage(&messageWithMeta) + block, statedb, receipts, err := s.createBlockFromNextMessage(&messageWithMeta, false) if err != nil { return nil, err } @@ -451,7 +452,7 @@ func (s *ExecutionEngine) MessageIndexToBlockNumber(messageNum arbutil.MessageIn } // must hold createBlockMutex -func (s *ExecutionEngine) createBlockFromNextMessage(msg *arbostypes.MessageWithMetadata) (*types.Block, *state.StateDB, types.Receipts, error) { +func (s *ExecutionEngine) createBlockFromNextMessage(msg *arbostypes.MessageWithMetadata, isMsgForPrefetch bool) (*types.Block, *state.StateDB, types.Receipts, error) { currentHeader := s.bc.CurrentBlock() if currentHeader == nil { return nil, nil, nil, errors.New("failed to get current block header") @@ -487,6 +488,7 @@ func (s *ExecutionEngine) createBlockFromNextMessage(msg *arbostypes.MessageWith s.bc, s.bc.Config(), batchFetcher, + isMsgForPrefetch, ) return block, statedb, receipts, err @@ -614,14 +616,14 @@ func (s *ExecutionEngine) digestMessageWithBlockMutex(num arbutil.MessageIndex, wg.Add(1) go func() { defer wg.Done() - _, _, _, err := s.createBlockFromNextMessage(msgForPrefetch) + _, _, _, err := s.createBlockFromNextMessage(msgForPrefetch, true) if err != nil { return } }() } - block, statedb, receipts, err := s.createBlockFromNextMessage(msg) + block, statedb, receipts, err := s.createBlockFromNextMessage(msg, false) if err != nil { return err } diff --git a/system_tests/state_fuzz_test.go b/system_tests/state_fuzz_test.go index 2c11435485..9c34a82553 100644 --- a/system_tests/state_fuzz_test.go +++ b/system_tests/state_fuzz_test.go @@ -56,7 +56,7 @@ func BuildBlock( return seqBatch, nil } block, _, err := arbos.ProduceBlock( - l1Message, delayedMessagesRead, lastBlockHeader, statedb, chainContext, chainConfig, batchFetcher, + l1Message, delayedMessagesRead, lastBlockHeader, statedb, chainContext, chainConfig, batchFetcher, false, ) return block, err }