From e58663743ccf090fb5c02de6ea598521ad9b17d2 Mon Sep 17 00:00:00 2001 From: Matt Curtis Date: Tue, 14 Jan 2025 11:32:41 +0000 Subject: [PATCH 1/2] backup sequencer: fix catchup issues --- go/host/enclave/guardian.go | 4 ++-- integration/simulation/devnetwork/dev_network.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go/host/enclave/guardian.go b/go/host/enclave/guardian.go index 18837ec2b..f13723cbc 100644 --- a/go/host/enclave/guardian.go +++ b/go/host/enclave/guardian.go @@ -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() diff --git a/integration/simulation/devnetwork/dev_network.go b/integration/simulation/devnetwork/dev_network.go index 2d5b5c62c..39d5cbdd1 100644 --- a/integration/simulation/devnetwork/dev_network.go +++ b/integration/simulation/devnetwork/dev_network.go @@ -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 { From e0467d23b2d948993d63bb279f6fae243ff8f902 Mon Sep 17 00:00:00 2001 From: Matt Curtis Date: Tue, 14 Jan 2025 11:54:25 +0000 Subject: [PATCH 2/2] gofumpt yourself --- tools/walletextension/rpcapi/utils.go | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/walletextension/rpcapi/utils.go b/tools/walletextension/rpcapi/utils.go index e453b96d3..2db656ab0 100644 --- a/tools/walletextension/rpcapi/utils.go +++ b/tools/walletextension/rpcapi/utils.go @@ -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