-
Notifications
You must be signed in to change notification settings - Fork 131
feat(l1): add CLI flag to specify P2P listening address #5297
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
Conversation
Lines of code reportTotal lines added: Detailed view |
There was a problem hiding this 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 adds a new CLI flag --p2p.addr to allow users to specify the P2P listening address for the node, providing more control over network configuration. When not specified, the node continues to auto-detect the local IP address as before.
Key changes:
- Added optional
--p2p.addrCLI parameter for specifying the P2P listening address - Refactored P2P node initialization to use the provided address or fall back to auto-detection
- Updated help text for consistency across P2P-related options
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cmd/ethrex/cli.rs | Adds new optional p2p_addr field to Options struct with CLI argument definition |
| cmd/ethrex/initializers.rs | Updates get_local_p2p_node to use the new CLI option, simplifying socket address parsing |
| docs/CLI.md | Documents the new --p2p.addr option in the CLI reference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [default: INFO] | ||
| --aligned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option was moved, but wasn't removed from here.
| [env: ETHREX_BLOCK_PRODUCER_OPERATOR_FEE_PER_GAS=] | ||
| --block-producer.l1-fee-vault-address <ADDRESS> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some options weren't updated since they're not checked in the CI
Co-authored-by: Copilot <[email protected]>
|
I'm getting some errors:
Let's address this in another PR, but I think the main problem is bootnodes use IPv4 addresses (the ones in the error messages), so we need some way to translate those. |
…5297) **Motivation** <!-- Why does this pull request exist? What are its goals? --> **Description** This PR adds a flag to set the listening address for P2P. --------- Co-authored-by: Copilot <[email protected]>
Motivation
Description
This PR adds a flag to set the listening address for P2P.