Skip to content

Commit

Permalink
Backup sequencer: fix catchup issues (#2247)
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel authored Jan 14, 2025
1 parent c7e8f8a commit fb1e6c9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions go/host/enclave/guardian.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@ func (g *Guardian) catchupWithL1() error {
func (g *Guardian) catchupWithL2() error {
// while we are behind the L2 head and still running:
for g.running.Load() && g.state.GetStatus() == L2Catchup {
if g.hostData.IsSequencer {
return errors.New("l2 catchup is not supported for sequencer")
if g.hostData.IsSequencer && g.isActiveSequencer {
return errors.New("l2 catchup is not supported for active sequencer")
}
// request the next batch by sequence number (based on what the enclave has been fed so far)
prevHead := g.state.GetEnclaveL2Head()
Expand Down
2 changes: 1 addition & 1 deletion integration/simulation/devnetwork/dev_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (s *InMemDevNetwork) Start() {
s.startNodes()

// sleep to allow the nodes to start
time.Sleep(15 * time.Second)
time.Sleep(30 * time.Second) // it takes a while for the secret exchanges etc. to sort themselves out

seqClient, err := obsclient.Dial(s.SequencerRPCAddress())
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion tools/walletextension/rpcapi/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func UnauthenticatedTenRPCCall[R any](ctx context.Context, w *services.Services,
return resp, err
})
})

if err != nil {
audit(w, "RPC call failed. method=%s args=%v error=%+v time=%d", method, args, err, time.Since(requestStartTime).Milliseconds())
return nil, err
Expand Down

0 comments on commit fb1e6c9

Please sign in to comment.