Skip to content

fix(l1): validate incoming payloads even when the node is syncing. #2426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Apr 23, 2025

Conversation

mpaulucci
Copy link
Collaborator

@mpaulucci mpaulucci commented Apr 8, 2025

Motivation
We should be able to do payload validations even when the node is in a sync process (except if it's snap sync).

Description

  • Refactored some code to make it flatter
  • Removed early return when the node is syncing
  • minor renames for clarity sake.

Copy link

github-actions bot commented Apr 8, 2025

Lines of code report

Total lines added: 2
Total lines removed: 3
Total lines changed: 5

Detailed view
+----------------------------------------------------+-------+------+
| File                                               | Lines | Diff |
+----------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/sync_manager.rs       | 130   | +1   |
+----------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/engine/fork_choice.rs | 387   | -3   |
+----------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/engine/payload.rs     | 699   | +1   |
+----------------------------------------------------+-------+------+

@mpaulucci mpaulucci marked this pull request as ready for review April 9, 2025 14:00
@mpaulucci mpaulucci requested a review from a team as a code owner April 9, 2025 14:00
@mpaulucci mpaulucci force-pushed the fix-invalid-payload-tests branch from e042c40 to 461efbf Compare April 21, 2025 18:01
@mpaulucci mpaulucci added this pull request to the merge queue Apr 23, 2025
Merged via the queue into main with commit 7c03219 Apr 23, 2025
19 checks passed
@mpaulucci mpaulucci deleted the fix-invalid-payload-tests branch April 23, 2025 15:21
avilagaston9 pushed a commit that referenced this pull request Apr 23, 2025
…2426)

**Motivation**
We should be able to do payload validations even when the node is in a
sync process (except if it's snap sync).

**Description**
- Refactored some code to make it flatter
- Removed early return when the node is syncing
- minor renames for clarity sake.
github-merge-queue bot pushed a commit that referenced this pull request Apr 25, 2025
…sync hive test (#2605)

**Motivation**
PR #2426 changed how fork choice & new payload interact with the syncer
and also introduced a bug. If snap sync is enabled, then fork choice
update will never attempt to trigger a sync, so the sync process never
gets started.
This PR fixes the bug and also refactors the sync manager api to better
suit the new use cases
<!-- Why does this pull request exist? What are its goals? -->
* Combine commonly used together `SyncManager` methods `set_head` &
`start_sync` into `sync_to_head`
* Remove unused `SyncManager` method `status` and associated struct
* Make sure sync is triggered during fcu when needed even if snap sync
is enabled
* Re-enable snap sync hive test suite
**Description**

<!-- A clear and concise general description of the changes this PR
introduces -->

<!-- Link to issues: Resolves #111, Resolves #222 -->

Closes #2521
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants