Optimism finality #2018
Replies: 7 comments 2 replies
-
@hendrikhofstadt What do you think? |
Beta Was this translation helpful? Give feedback.
-
Good catch that they are deprecating the old method! Does syncing from the L2 involve more trust into the sequencer or the node you are syncing from? |
Beta Was this translation helpful? Give feedback.
-
I read through the Optimism documentation and here is an attempt of a summary of the relevant pieces that are applicable to the Wormhole integration, as well as some options for doing the integration with different trade-offs: Background on OptimismOptimism is an Ethereum scalability project. Meaning that it is designed to run alongside Ethereum, called the L1, and has some native interactions with Ethereum. The next big release will be “Bedrock”, announced for Q1 2023, which will change quite a few things. L1 interactions
Block production
Full nodes
Docs: https://community.optimism.io/docs/developers/build/run-a-node/#hardware-requirements Trust model of Wormhole Integration
Wormhole IntegrationSenders of Wormhole messages should be able to specify whether messages should be relayed instantly (consistency_level=200), or wait for finality. But that feature doesn’t necessarily be supported on day one. Option 1) Guardians sync from L1 until Optimism Bedrock release. After Bedrock, guardians sync from L2 and utilize a new API to get the finalization status from the Optimism node.
Option 2) Guardians run two Optimism nodes: One syncing from L1 and one syncing from L2
Option 3) Guardians sync from L2 and separately check L1 for finality status.
|
Beta Was this translation helpful? Give feedback.
-
Option 1 seems like the best choice. It appears to provide most flexibility and strongest safety guarantees in the long run. Also the short-term solution can be implemented with minimal changes to the existing codebase. It essentially looks like Option 3 but instead of reimplementing the logic in the guardian Wormhole relies on the reference implementation. Given Option 1 puts full trust into the Optimism node, we should make sure there is full coverage of their bug bounty program on the parts of the code we're exercising and it's sufficient in size. |
Beta Was this translation helpful? Give feedback.
-
Conclusion: Going with Option 1. The Guardians will sync from L1. This will be re-evaluated after Bedrock is released. |
Beta Was this translation helpful? Give feedback.
-
This discussion addresses issue #2163 and should be considered closed. But, since there is no way to close a discussion in GH, here we are. |
Beta Was this translation helpful? Give feedback.
-
now there is a way! |
Beta Was this translation helpful? Give feedback.
-
Optimism nodes run in one of two different modes:
In mode 1), one can use the rollup_getInfo() RPC call to obtain the latest L2 block number and the related L1 block number. This allows one to observe the stream of finalized L1 blocks and when a particular L1 block is finalized, then the related L2 block(s) are, also, finalized.
In mode 2), one needs to call getTotalElements on the ctc smart contract to request the latest finalized L2 block number.
The current implementation uses mode 1.
When the Bedrock release of Optimism comes out in Q1 2023, the rollup_getInfo() RPC call will no longer be available. Also, this issue sheds some light on why all current node providers sync from L2: (ethereum-optimism/optimism#3974)
The proposal is to scrap the current implementation and use the call to getTotalElements.
Beta Was this translation helpful? Give feedback.
All reactions