Skip to content

Conversation

@MegaRedHand
Copy link
Collaborator

Motivation

We recently found some errors due to payloads being marked as invalid when FCU is triggered during a snap-sync.

Description

This PR uncomments an early return that handles these cases.

Closes #5547

@github-actions github-actions bot added the L1 Ethereum client label Dec 7, 2025
@github-actions
Copy link

github-actions bot commented Dec 7, 2025

Lines of code report

Total lines added: 12
Total lines removed: 0
Total lines changed: 12

Detailed view
+----------------------------------------------------+-------+------+
| File                                               | Lines | Diff |
+----------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/engine/fork_choice.rs | 371   | +12  |
+----------------------------------------------------+-------+------+

@MegaRedHand MegaRedHand requested a review from fedacking December 7, 2025 03:07
@MegaRedHand MegaRedHand marked this pull request as ready for review December 7, 2025 03:31
Copilot AI review requested due to automatic review settings December 7, 2025 03:31
@MegaRedHand MegaRedHand requested a review from a team as a code owner December 7, 2025 03:31
@ethrex-project-sync ethrex-project-sync bot moved this to In Review in ethrex_l1 Dec 7, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where payloads were incorrectly marked as invalid during snap-sync by uncommenting a guard clause that handles fork-choice updates during snap-sync operations.

Key changes:

  • Uncommented the snap-sync check in handle_forkchoice function that skips fork-choice processing during snap-sync
  • Added import for SyncMode from ethrex_p2p::sync
  • Fixed reference from context.syncer to syncer to match the function's local variable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Avoid applying fork choice during snap-sync

2 participants