babylonchain / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
1 stars 0 forks source link

feat: add Babylon Finality Gadget For OP Stack #7

Open bap2pecs opened 1 month ago

bap2pecs commented 1 month ago

Summary

context: https://github.com/ethereum-optimism/specs/discussions/218

an L2 block has 3 status:

now we are changing it to

After studying the OP codebase, we think the only place we need to change is in the EngineQueue::Step() function

It's worth noting we don't need to worry about EngineQueue::Reset() where sync.FindL2Heads() is called. Digging into the code, this calls into op-geth to get the current L2 forkchoice state including the finalized head. Since the data there was also from the derivation pipeline, it should return the correct block.