From f64d4a2fd46f55496bd17e06406f94734597ac11 Mon Sep 17 00:00:00 2001 From: Tsahi Zidenberg Date: Tue, 31 Oct 2023 19:55:43 -0600 Subject: [PATCH] arbnode: init broadcast server before sequencing sequencing attempts to send broadcast messages this gets stuck if broadcast server isn't started and deadlocked in case of ForceSequenceDelayed --- arbnode/node.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arbnode/node.go b/arbnode/node.go index be3380954f..e671a191fb 100644 --- a/arbnode/node.go +++ b/arbnode/node.go @@ -1056,6 +1056,13 @@ func (n *Node) Start(ctx context.Context) error { return fmt.Errorf("error starting inbox reader: %w", err) } } + // broadcastServer must be started befopre sequencing any transactions + if n.BroadcastServer != nil { + err = n.BroadcastServer.Start(ctx) + if err != nil { + return fmt.Errorf("error starting feed broadcast server: %w", err) + } + } if n.DelayedSequencer != nil && n.SeqCoordinator == nil { err = n.DelayedSequencer.ForceSequenceDelayed(ctx) if err != nil { @@ -1114,12 +1121,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 {