fix(alpen-ee): avoid invalid finalized forkchoice updates#1883
fix(alpen-ee): avoid invalid finalized forkchoice updates#1883peter941221 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5914edb14c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Re-ran the engine-side validation after the final test-only follow-up commit. Environment
Commands
Results
The follow-up test change does not touch production logic. It only tightens the retry assertion from a sleep-and-abort shape to a bounded fail-once-then-succeed path with an exact attempt count. |
|
Addressed the finalized-handling bug on fork switches. Problem
Change
Validation
Results
This required adding alloy-consensus as a direct dependency for alpen-ee-engine so the header trait used by the provider-backed parent walk is in scope in this crate. |
|
This branch is unchanged since the last test-only follow-up and the earlier review thread is resolved. If someone wants another look, the latest head already includes the finalized fork follow-up and the package test rerun. |
Description
Fixes
forkchoiceUpdatedhandling when OL reports a finalized EE hash that this Reth node still sees as non-canonical.Before this change,
crates/alpen-ee/engine/src/control.rscanonical-checkedconfirmed/ safe but forwardedfinalizedunchanged. During sync or fork-switch windows, that could send a non-canonical finalized hash intoforkchoiceUpdated, which Reth rejects asinvalid forkchoice state.This patch canonical-checks
finalized_block_hash, clears it toB256::ZEROwhen it is inconsistent with the chosen fork, and keeps finalized when the update is switching to OL's fork and the finalized block is an ancestor of the new target head. On the engine side it also stops retrying deterministic forkchoice validation failures while still retrying communication-style failures.Type of Change
Notes to Reviewers
The serialized interface is unchanged.
The key behavioral boundaries are:
ExecutionEngineError::ForkChoiceUpdate(...)no longer goes through the retry loopAI was used to assist in this PR.
Is this PR addressing any specification, design doc or external reference document?
If yes, please add relevant links:
Checklist
Related Issues