Skip to content

Conversation

@avilagaston9
Copy link
Contributor

@avilagaston9 avilagaston9 commented Nov 6, 2025

Motivation

In #5004 , the PeerHandler was modified to receive the Initiator GenServer handle. As a result, our L2 initializer was updated to spawn the Initiator GenServer, which led to the following log being repeatedly printed in our L2 node:

2025-11-06T14:57:09.120191Z  INFO ethrex_p2p::discv4::peer_table: Resetting list of tried peers.

Description

  • Since we don't have P2P in L2, this PR updates the L2 initializer to use the PeerHandler::dummy() method instead.
  • Even though this works for now, we should review our init_rpc_api, as we should be able to start the RPC API without using a PeerHandler at all. L2: review P2P initialization #5222 was created to review this.

Closes None

@github-actions github-actions bot added the L2 Rollup client label Nov 6, 2025
@avilagaston9 avilagaston9 marked this pull request as ready for review November 6, 2025 20:18
@avilagaston9 avilagaston9 requested a review from a team as a code owner November 6, 2025 20:18
Copilot AI review requested due to automatic review settings November 6, 2025 20:18
@avilagaston9 avilagaston9 moved this to In Review in ethrex_l2 Nov 6, 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 enables the use of dummy test methods for the L2 feature by adding feature = "l2" to the conditional compilation attributes and simplifies L2 initialization by using PeerHandler::dummy() instead of creating a full peer handler with initiator.

Key Changes:

  • Extended #[cfg] attributes to include the "l2" feature for RLPxInitiator::dummy() and PeerHandler::dummy() methods
  • Simplified L2 initialization to use PeerHandler::dummy() directly instead of creating a full RLPxInitiator and PeerHandler
  • Removed unused RLPxInitiator import from L2 initializers

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
crates/networking/p2p/rlpx/initiator.rs Added "l2" feature to cfg attribute and updated documentation for the dummy method
crates/networking/p2p/peer_handler.rs Added "l2" feature to cfg attribute and updated documentation for the dummy method
cmd/ethrex/l2/initializers.rs Removed RLPxInitiator import and replaced peer handler initialization with dummy call

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

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

Lines of code report

Total lines added: 0
Total lines removed: 1
Total lines changed: 1

Detailed view
+--------------------------------------+-------+------+
| File                                 | Lines | Diff |
+--------------------------------------+-------+------+
| ethrex/cmd/ethrex/l2/initializers.rs | 303   | -1   |
+--------------------------------------+-------+------+

@avilagaston9
Copy link
Contributor Author

Addressed in #5253

@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l2 Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L2 Rollup client

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants