From 777179ef7fe69db2adfe7091019fae63e292c5a2 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 13 Jan 2023 21:32:51 +0800 Subject: [PATCH 1/2] fix(proposer): fix an issue in `L2ExecutionEngineSyncProgress` --- pkg/rpc/methods.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/rpc/methods.go b/pkg/rpc/methods.go index 148cccfe9..0a9f62830 100644 --- a/pkg/rpc/methods.go +++ b/pkg/rpc/methods.go @@ -259,7 +259,14 @@ func (c *Client) L2ExecutionEngineSyncProgress(ctx context.Context) (*L2SyncProg g.Go(func() error { headL1Origin, err := c.L2.HeadL1Origin(ctx) if err != nil { - return err + switch err.Error() { + case ethereum.NotFound.Error(): + // There is only genesis block in the L2 execution engine. + progress.CurrentBlockID = common.Big0 + return nil + default: + return err + } } progress.CurrentBlockID = headL1Origin.BlockID return nil From e7db578a7b11086402827e6a03b61734fa013035 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 13 Jan 2023 21:43:57 +0800 Subject: [PATCH 2/2] docs: update comments --- pkg/rpc/methods.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/rpc/methods.go b/pkg/rpc/methods.go index 0a9f62830..3b1f61249 100644 --- a/pkg/rpc/methods.go +++ b/pkg/rpc/methods.go @@ -261,7 +261,8 @@ func (c *Client) L2ExecutionEngineSyncProgress(ctx context.Context) (*L2SyncProg if err != nil { switch err.Error() { case ethereum.NotFound.Error(): - // There is only genesis block in the L2 execution engine. + // There is only genesis block in the L2 execution engine, or it has not started + // syncing the pending blocks yet. progress.CurrentBlockID = common.Big0 return nil default: