-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
verifiedIndex in rollup_getInfo always 0 #3974
Comments
Are you running a node syncing from L1 or from L2? I believe this always returns zero when syncing from L2. |
This is a result of the weird split we currently have between nodes that sync entirely from L1 and nodes that sync entirely from L2. At least with Bedrock nodes will sync from both at the same time and you'll be able to filter out L1 blocks by looking for the latest "safe" head. |
Sorry, but can you explain it like I'm 5 lol Under what circumstance is the value populated? No RPC provider seems to populate this field. |
Also I take it by the Bedrock comment that this is a "Bedrock Fixes This" issue? 🙂 |
Yeah this is definitely a "bedrock fixes this" issue but more in the sense that "bedrock makes this issue go away by removing that RPC endpoint entirely". Basically there are two types of Optimism nodes right now, nodes that sync from L1 and nodes that sync from L2 (directly from the sequencer). Nodes that sync from L2 will always return zero. Nodes that sync from L1 will return an increasing value as the node syncs. You always get zero from infra providers because they're running nodes that sync directly from the sequencer. They need to do this because otherwise they would have to wait for blocks to be published to L1 which means they would be behind the sequencer by quite a bit. In Bedrock we get rid of this distinction between L1 nodes and L2 nodes. Nodes will sync from both L1 and from L2 (via p2p network instead of directly from sequencer). Blocks that are confirmed on L1 will be marked as "safe". |
Is there a way to determine which L2 block number has been "finalized" on the L1 chain without this value being populated? In other words: If I call |
I don't know if nodes that sync from L2 currently have this ability. After Bedrock you will be able to use "safe" and "finalized" to accomplish this. |
Thanks, Matthew Slipper told me I could query getTotalElements in the L1 contract. Seems to give me what I want. You can close this if you want. |
Ok! Great. Glad you were able to figure this out. Closing. Feel free to open additional issues if you have any further questions. |
According to documentation:
https://community.optimism.io/docs/developers/build/json-rpc/#rollup-getinfo
As far as I can tell the
verifiedIndex
value is ALWAYS0
Why? What purpose does this value serve? What is the significance of it always being 0? When is it not 0?
The text was updated successfully, but these errors were encountered: