Skip to content

Conversation

@ElFantasma
Copy link
Contributor

@ElFantasma ElFantasma commented Jan 9, 2026

Motivation
We can validate the fork_id from the ENR when adding the contact since discv5 Nodes messages provide ENRs.

Description

  • Reduce code duplication moving the validation to a single place in code.
  • Discovery Lookup no longer filter nodes with invalid fork_ids
  • Initiator tires connections with valid fork_ids
  • Fixed this for discv4 too. (I'll be testing if this affects peer finding performance)

Depends on #5773

Closes #5776

@ElFantasma ElFantasma requested a review from a team as a code owner January 9, 2026 18:14
@github-actions github-actions bot added the L1 Ethereum client label Jan 9, 2026
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Lines of code report

Total lines added: 116
Total lines removed: 8
Total lines changed: 124

Detailed view
+---------------------------------------------------+-------+------+
| File                                              | Lines | Diff |
+---------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/backend.rs           | 103   | +103 |
+---------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/discv4/peer_table.rs | 1066  | -2   |
+---------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/discv4/server.rs     | 673   | -5   |
+---------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/discv5/peer_table.rs | 1151  | +12  |
+---------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/p2p.rs               | 24    | +1   |
+---------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/eth/mod.rs      | 7     | -1   |
+---------------------------------------------------+-------+------+

@github-project-automation github-project-automation bot moved this to In Review in ethrex_l1 Jan 13, 2026
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.

3 participants