Skip to content

Commit

Permalink
sequencer can also start syncing but not producing blocks till da is …
Browse files Browse the repository at this point in the history
…synced
  • Loading branch information
srene committed May 16, 2024
1 parent a880c7e commit 50950b9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions block/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,7 @@ func (m *Manager) Start(ctx context.Context) error {
}
}

if isSequencer {
// Sequencer must wait till DA is synced
<-m.DAClient.Synced()
} else {
if !isSequencer {
// Fullnode loop can start before syncing from DA
go uevent.MustSubscribe(ctx, m.Pubsub, "applyGossipedBlocksLoop", p2p.EventQueryNewNewGossipedBlock, m.onNewGossipedBlock, m.logger)
}
Expand All @@ -161,6 +158,8 @@ func (m *Manager) Start(ctx context.Context) error {

// Sequencer producer loop and full-node retrieve loop is started only when finished syncing from DA
if isSequencer {
// Sequencer must wait till DA is synced to start submitting blobs
<-m.DAClient.Synced()
go m.ProduceBlockLoop(ctx)
go m.SubmitLoop(ctx)
} else {
Expand Down

0 comments on commit 50950b9

Please sign in to comment.