diff --git a/arbnode/inbox_tracker.go b/arbnode/inbox_tracker.go index 0fc5b11486..09aee52d0a 100644 --- a/arbnode/inbox_tracker.go +++ b/arbnode/inbox_tracker.go @@ -218,7 +218,7 @@ func (t *InboxTracker) GetBatchCount() (uint64, error) { return count, nil } -func (t *InboxTracker) FindL1BatchForMessage(pos arbutil.MessageIndex) (uint64, error) { +func (t *InboxTracker) FindInboxBatchContainingMessage(pos arbutil.MessageIndex) (uint64, error) { batchCount, err := t.GetBatchCount() if err != nil { return 0, err diff --git a/arbnode/node.go b/arbnode/node.go index 98200163d8..1410ff1adc 100644 --- a/arbnode/node.go +++ b/arbnode/node.go @@ -1115,8 +1115,8 @@ func (n *Node) FetchBatch(ctx context.Context, batchNum uint64) ([]byte, error) return n.InboxReader.GetSequencerMessageBytes(ctx, batchNum) } -func (n *Node) FindL1BatchForMessage(message arbutil.MessageIndex) (uint64, error) { - return n.InboxTracker.FindL1BatchForMessage(message) +func (n *Node) FindInboxBatchContainingMessage(message arbutil.MessageIndex) (uint64, error) { + return n.InboxTracker.FindInboxBatchContainingMessage(message) } func (n *Node) GetBatchParentChainBlock(seqNum uint64) (uint64, error) { diff --git a/execution/gethexec/executionengine.go b/execution/gethexec/executionengine.go index 3cbc64bbdb..239f15ec9b 100644 --- a/execution/gethexec/executionengine.go +++ b/execution/gethexec/executionengine.go @@ -71,7 +71,7 @@ func (s *ExecutionEngine) EnableReorgSequencing() { s.reorgSequencing = true } -func (s *ExecutionEngine) SetTransactionStreamer(consensus execution.FullConsensusClient) { +func (s *ExecutionEngine) SetConsensus(consensus execution.FullConsensusClient) { if s.Started() { panic("trying to set transaction consensus after start") } diff --git a/execution/gethexec/node.go b/execution/gethexec/node.go index 49956ae418..94fd6d01e3 100644 --- a/execution/gethexec/node.go +++ b/execution/gethexec/node.go @@ -158,7 +158,7 @@ func CreateExecutionNode( if err != nil { return nil, err } - } else { + } else if config.Sequencer.Enable { log.Warn("sequencer enabled without l1 client") } @@ -198,14 +198,15 @@ func CreateExecutionNode( syncMon := NewSyncMonitor(execEngine) var classicOutbox *ClassicOutboxRetriever - classicMsgDb, err := stack.OpenDatabase("classic-msg", 0, 0, "", true) - if err != nil { - if l2BlockChain.Config().ArbitrumChainParams.GenesisBlockNum > 0 { + + if l2BlockChain.Config().ArbitrumChainParams.GenesisBlockNum > 0 { + classicMsgDb, err := stack.OpenDatabase("classic-msg", 0, 0, "", true) + if err != nil { log.Warn("Classic Msg Database not found", "err", err) + classicOutbox = nil + } else { + classicOutbox = NewClassicOutboxRetriever(classicMsgDb) } - classicOutbox = nil - } else { - classicOutbox = NewClassicOutboxRetriever(classicMsgDb) } apis := []rpc.API{{ @@ -379,7 +380,7 @@ func (n *ExecutionNode) ForwardTo(url string) error { } func (n *ExecutionNode) SetConsensusClient(consensus execution.FullConsensusClient) { - n.ExecEngine.SetTransactionStreamer(consensus) + n.ExecEngine.SetConsensus(consensus) n.SyncMonitor.SetConsensusInfo(consensus) } diff --git a/execution/interface.go b/execution/interface.go index c1674f0a6e..5fc5f1ddfe 100644 --- a/execution/interface.go +++ b/execution/interface.go @@ -71,7 +71,7 @@ type FullExecutionClient interface { // BatchFetcher is required for any execution node type BatchFetcher interface { FetchBatch(ctx context.Context, batchNum uint64) ([]byte, error) - FindL1BatchForMessage(message arbutil.MessageIndex) (uint64, error) + FindInboxBatchContainingMessage(message arbutil.MessageIndex) (uint64, error) GetBatchParentChainBlock(seqNum uint64) (uint64, error) } diff --git a/execution/nodeInterface/NodeInterface.go b/execution/nodeInterface/NodeInterface.go index 96989f4408..f85865f170 100644 --- a/execution/nodeInterface/NodeInterface.go +++ b/execution/nodeInterface/NodeInterface.go @@ -65,7 +65,7 @@ func (n NodeInterface) FindBatchContainingBlock(c ctx, evm mech, blockNum uint64 if fetcher == nil { return 0, errors.New("batch fetcher not set") } - batch, err := fetcher.FindL1BatchForMessage(msgIndex) + batch, err := fetcher.FindInboxBatchContainingMessage(msgIndex) return batch, err } diff --git a/staker/l1_validator.go b/staker/l1_validator.go index d2b6f57d80..ee24fc49d5 100644 --- a/staker/l1_validator.go +++ b/staker/l1_validator.go @@ -336,7 +336,7 @@ func (v *L1Validator) generateNodeAction( batchNum = localBatchCount - 1 validatedCount = messageCount } else { - batchNum, err = v.inboxTracker.FindL1BatchForMessage(validatedCount - 1) + batchNum, err = v.inboxTracker.FindInboxBatchContainingMessage(validatedCount - 1) if err != nil { return nil, false, err } diff --git a/staker/stateless_block_validator.go b/staker/stateless_block_validator.go index 26a79f067f..2c7046effb 100644 --- a/staker/stateless_block_validator.go +++ b/staker/stateless_block_validator.go @@ -56,7 +56,7 @@ type InboxTrackerInterface interface { GetBatchMessageCount(seqNum uint64) (arbutil.MessageIndex, error) GetBatchAcc(seqNum uint64) (common.Hash, error) GetBatchCount() (uint64, error) - FindL1BatchForMessage(pos arbutil.MessageIndex) (uint64, error) + FindInboxBatchContainingMessage(pos arbutil.MessageIndex) (uint64, error) } type TransactionStreamerInterface interface { @@ -297,7 +297,7 @@ func (v *StatelessBlockValidator) GlobalStatePositionsAtCount(count arbutil.Mess if count == 1 { return GlobalStatePosition{}, GlobalStatePosition{1, 0}, nil } - batch, err := v.inboxTracker.FindL1BatchForMessage(count - 1) + batch, err := v.inboxTracker.FindInboxBatchContainingMessage(count - 1) if err != nil { return GlobalStatePosition{}, GlobalStatePosition{}, err }