EVM: Set FinalizedHash correctly in `forkChoiceUpdatedV3` call in ExecuteTxs
- 主要語言
- Go
- 星號
- 361
- 分支
- 280
- 平均合併
- 2 天 14 小時
- 30 天內合併 PR
- 10
描述
In https://github.com/rollkit/rollkit/pull/2394, in order to have sequencer restarts work well, we modified the first call to `forkChoiceUpdatedV3` in the `ExecuteTxs` EVM implementation to assign the previous block hash to HeadBlockHash, SafeBlockHash, and FinalizedBlockHash.
We should revisit this and take one or more of the following approaches:
1. Set the FinalizedBlockHash based on the DA Included Height from the Rollkit Store. For the Head and Safe block hashes, use the Rollkit height which should be the same as the reth block height but it might be good to actually sanity check that on startup and set them in engineClient correctly on start.
2. Persist the current versions of head, safe, and finalizedBlockHashes somewhere so on restarts they can be loaded back easily.
The concrete consequences of setting finalizedHash incorrectly are unknown currently but it'll likely be at least an issue in indexers and block explorers showing inconsistent finalized block hashes for a small period of time.
貢獻指南
研究方向
從 ExecuteTxs 的 EVM 實作中的第一次 forkChoiceUpdatedV3 呼叫開始,接著閱讀 issue 中提到的 PR 2394,以及 Rollkit Store 和 engineClient 的啟動路徑。判斷 finalized state 應該來自 DA Included Height 還是持久化的雜湊,並定義啟動時對 head、safe 和 finalized 雜湊的 sanity checks。完成標準是重新啟動和索引器都能收到一致的區塊雜湊。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- go
- 領域
- blockchain
- Issue 類型
- 缺陷
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100