Commit 95a0d803 authored by Mark Tyneway's avatar Mark Tyneway Committed by Kelvin Fichter

l2geth: no longer sync batches as sequencer

Previously the sequencer would call the `syncBatchesToTip` method
as part of its `sequence()` loop. This commit removes that as the
call to `syncBatchesToTip` does nothing for the sequencer currently.
Syncing the batches would be useful for triggering reorgs, but
that functionality does not currently exist. It would be better to
remove this functionality for now as it could potentially interfere
with the locking mechanism introduced in
dfaa8fc20f586265f0a5c07ca76c6c793ba49157.

This will also reduce the amount of time the `txLock` is held, meaning
that less transactions sent via RPC will be blocked and held in memory
while waiting to execute.
parent 970f421e
---
'@eth-optimism/l2geth': patch
---
Remove calls to `syncBatchesToTip` in the main `sequence()` loop
...@@ -412,14 +412,12 @@ func (s *SyncService) SequencerLoop() { ...@@ -412,14 +412,12 @@ func (s *SyncService) SequencerLoop() {
// compare against the transactions it has in its local state. The sequencer // compare against the transactions it has in its local state. The sequencer
// should reorg based on the transaction batches that are posted because // should reorg based on the transaction batches that are posted because
// L1 is the source of truth. The sequencer concurrently accepts user // L1 is the source of truth. The sequencer concurrently accepts user
// transactions via the RPC. // transactions via the RPC. When reorg logic is enabled, this should
// also call `syncBatchesToTip`
func (s *SyncService) sequence() error { func (s *SyncService) sequence() error {
if err := s.syncQueueToTip(); err != nil { if err := s.syncQueueToTip(); err != nil {
return fmt.Errorf("Sequencer cannot sequence queue: %w", err) return fmt.Errorf("Sequencer cannot sequence queue: %w", err)
} }
if err := s.syncBatchesToTip(); err != nil {
return fmt.Errorf("Sequencer cannot sync transaction batches: %w", err)
}
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment