Skip to content

Conversation

@ElFantasma
Copy link
Contributor

Motivation

Node lookup interval is used to send FindNode and ENRRequest messages for discovery and to try initiate new RLPx connections and currently it uses only two values.

Description

  • This PR changes it for a variable interval according to the peer target completion.
  • Also it provides a CLI argument to set up the initial interval, to be able to set the node more or less eager on startup.

Closes #5149 (also addresses #5148, already closed)

@ElFantasma ElFantasma requested a review from a team as a code owner December 4, 2025 14:58
@github-actions github-actions bot added the L1 Ethereum client label Dec 4, 2025
@ElFantasma ElFantasma changed the title feat(l1): Improved lookup interval feat(l1): improved lookup interval Dec 4, 2025
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Lines of code report

Total lines added: 46
Total lines removed: 6
Total lines changed: 52

Detailed view
+---------------------------------------------------+-------+------+
| File                                              | Lines | Diff |
+---------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/cli.rs                          | 779   | +11  |
+---------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/initializers.rs                 | 454   | +1   |
+---------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/l2/initializers.rs              | 334   | +1   |
+---------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/discv4/peer_table.rs | 1049  | +11  |
+---------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/discv4/server.rs     | 652   | +17  |
+---------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/network.rs           | 367   | +4   |
+---------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/initiator.rs    | 105   | -6   |
+---------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/test_utils.rs        | 298   | +1   |
+---------------------------------------------------+-------+------+

@Oppen
Copy link
Contributor

Oppen commented Dec 4, 2025

LGTM, I'll test it at home and approve if able to sync.

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

Labels

L1 Ethereum client

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Make Discovery and Connection attempt Lookup interval automatically adjustable.

4 participants