ethereum-optimism / ethereum-optimism/optimism

op-node: SyncStatus resets L1 finalized block to 0

Open
#14,099 4 comments 0 reactions 0 assignees View on GitHub
A-op-node
Dominant language
Go
Stars
6.5k
Forks
4k
Avg merge
2d 15h
Merged PRs (30d)
145

Description

**Bug Description**
The op-node, `optimism_syncStatus` RPC response periodically resets all the finalized L1 related fields to 0. The L1 finalized block never goes backwards so op-node's view of it shouldn't be resetting to 0 - especially when it is simultaneously claiming that the L2 finalized block is non-zero. The logs show the node had not just restarted and don't show any errors. The pipeline had reset 5 minutes prior to the invalid response.

This causes failures in the `op-challenger run-trace` subcommand we use for the vm-runner as it tries to find the L1 head to use to test fault proof execution. It had been working very consistently until 15-30 days ago when we started fairly regularly seeing errors because "l1 head is 0".

Example response we're getting from op-node:

```
&{
CurrentL1:0xe63413a1e17517f362d37d36027d69a42cea72f8167e59435877325fd2fbc589:7610567
CurrentL1Finalized:0x0000000000000000000000000000000000000000000000000000000000000000:0 HeadL1:0x1c8b4cebfdb270f0e6ced9eee686eb5766594958d6ffe8ff294aee7ebc51c666:7610571
SafeL1:0x0000000000000000000000000000000000000000000000000000000000000000:0
FinalizedL1:0x0000000000000000000000000000000000000000000000000000000000000000:0
UnsafeL2:0xbed626891395e3e1a2e4de8993bf3c7a9bc39163c7e351cb48369daf25a39e3c:23263831
SafeL2:0x4d78744bafe7f48ce8d6ac663118f1b2f21e806710a81cf1b0993203fefe9ea9:23263683
FinalizedL2:0x319de3aee25450483f3303fdb78403a68ba7084e38ccbed6ebf8feb28becd409:23263108
PendingSafeL2:0x4d78744bafe7f48ce8d6ac663118f1b2f21e806710a81cf1b0993203fefe9ea9:23263683
CrossUnsafeL2:0xbed626891395e3e1a2e4de8993bf3c7a9bc39163c7e351cb48369daf25a39e3c:23263831
LocalSafeL2:0x4d78744bafe7f48ce8d6ac663118f1b2f21e806710a81cf1b0993203fefe9ea9:23263683
}
```

**Environment Information:**
Using https://mainnet-replica-0-op-node.primary.client.dev.oplabs.cloud and https://sepolia-replica-0-op-node.primary.client.dev.oplabs.cloud

Logs: https://optimistic.grafana.net/goto/6xuoeVFHg?orgId=1

Contributor guide

Open the contributing guide

Research direction

Start at the op-node optimism_syncStatus RPC entry point and inspect the pipeline reset that preceded the invalid response; compare the L1 finalized fields with the non-zero L2 finalized state. Use the provided Grafana logs and op-challenger run-trace behavior to investigate the failure. Done means the L1 finalized fields no longer reset to zero while the node remains running.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.