Skip to content

Conversation

MegaRedHand
Copy link
Collaborator

Motivation

We want users to be able to run the binary without needing to have a file of known bootnodes for each public network.

Description

This PR embeds the bootnode files inside the binary.

Closes #3966

@Copilot Copilot AI review requested due to automatic review settings August 6, 2025 14:30
@MegaRedHand MegaRedHand requested a review from a team as a code owner August 6, 2025 14:30
@MegaRedHand MegaRedHand changed the title feat: embed bootnodes for public networks inside binary feat(l1): embed bootnodes for public networks inside binary Aug 6, 2025
@github-actions github-actions bot added the L1 Ethereum client label Aug 6, 2025
Copy link
Contributor

@Copilot 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 embeds bootnode configuration files directly into the binary instead of reading them from the filesystem at runtime. This enables users to run the binary without needing external bootnode files for public networks (Holesky, Sepolia, Hoodi, and Mainnet).

Key Changes:

  • Replaced lazy_static declarations with embedded string constants using include_str!
  • Added a new get_bootnodes() method to the Network enum for parsing embedded bootnode data
  • Simplified the bootnode loading logic in the initializers module

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
cmd/ethrex/networks.rs Replaced lazy_static bootnode loading with embedded strings and added get_bootnodes() method
cmd/ethrex/initializers.rs Simplified bootnode loading to use the new get_bootnodes() method

Copy link

github-actions bot commented Aug 6, 2025

Lines of code report

Total lines added: 0
Total lines removed: 20
Total lines changed: 20

Detailed view
+-----------------------------------+-------+------+
| File                              | Lines | Diff |
+-----------------------------------+-------+------+
| ethrex/cmd/ethrex/initializers.rs | 370   | -18  |
+-----------------------------------+-------+------+
| ethrex/cmd/ethrex/networks.rs     | 160   | -2   |
+-----------------------------------+-------+------+

@MegaRedHand MegaRedHand moved this to In Review in ethrex_l1 Aug 6, 2025
@MegaRedHand MegaRedHand self-assigned this Aug 6, 2025
Copy link
Contributor

@ricomateo ricomateo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MegaRedHand MegaRedHand added this pull request to the merge queue Aug 6, 2025
Merged via the queue into main with commit 6a511ff Aug 6, 2025
39 of 42 checks passed
@MegaRedHand MegaRedHand deleted the embed-bootnodes branch August 6, 2025 19:29
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Aug 6, 2025
@MegaRedHand MegaRedHand mentioned this pull request Aug 6, 2025
LeanSerra pushed a commit that referenced this pull request Aug 12, 2025
**Motivation**

We want users to be able to run the binary without needing to have a
file of known bootnodes for each public network.

**Description**

This PR embeds the bootnode files inside the binary.

Closes #3966
pedrobergamini pushed a commit to pedrobergamini/ethrex that referenced this pull request Aug 24, 2025
…ass#3967)

**Motivation**

We want users to be able to run the binary without needing to have a
file of known bootnodes for each public network.

**Description**

This PR embeds the bootnode files inside the binary.

Closes lambdaclass#3966
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L1 Ethereum client
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Embed bootnode list for public networks inside binary
3 participants