Skip to content

Commit

Permalink
Merge pull request #1952 from OffchainLabs/forcedelayed_on_init
Browse files Browse the repository at this point in the history
sequence delayed initially when starting without coordinator
  • Loading branch information
joshuacolvin0 authored Nov 21, 2023
2 parents 22184f3 + c370622 commit c8972cf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
21 changes: 15 additions & 6 deletions arbnode/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,23 @@ func (n *Node) Start(ctx context.Context) error {
return fmt.Errorf("error starting inbox reader: %w", err)
}
}
// must init broadcast server before trying to sequence anything
if n.BroadcastServer != nil {
err = n.BroadcastServer.Start(ctx)
if err != nil {
return fmt.Errorf("error starting feed broadcast server: %w", err)
}
}
if n.SeqCoordinator != nil {
n.SeqCoordinator.Start(ctx)
} else {
if n.DelayedSequencer != nil {
err := n.DelayedSequencer.ForceSequenceDelayed(ctx)
if err != nil {
return fmt.Errorf("error initially sequencing delayed instructions: %w", err)
}
}
n.Execution.Activate()
}
if n.MaintenanceRunner != nil {
n.MaintenanceRunner.Start(ctx)
Expand Down Expand Up @@ -834,12 +849,6 @@ func (n *Node) Start(ctx context.Context) error {
if n.L1Reader != nil {
n.L1Reader.Start(ctx)
}
if n.BroadcastServer != nil {
err = n.BroadcastServer.Start(ctx)
if err != nil {
return fmt.Errorf("error starting feed broadcast server: %w", err)
}
}
if n.BroadcastClients != nil {
go func() {
if n.InboxReader != nil {
Expand Down
3 changes: 0 additions & 3 deletions arbnode/seq_coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ func NewSeqCoordinator(
config: config,
signer: signer,
}
if sequencer != nil {
sequencer.Pause()
}
streamer.SetSeqCoordinator(coordinator)
return coordinator, nil
}
Expand Down
1 change: 1 addition & 0 deletions execution/gethexec/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ func NewSequencer(execEngine *ExecutionEngine, l1Reader *headerreader.HeaderRead
containers.NewLruCacheWithOnEvict(config.NonceCacheSize, s.onNonceFailureEvict),
func() time.Duration { return configFetcher().NonceFailureCacheExpiry },
}
s.Pause()
execEngine.EnableReorgSequencing()
return s, nil
}
Expand Down

0 comments on commit c8972cf

Please sign in to comment.