8000 Allow --bootnodes to read enode URLs from file or remote URL by gap-editor · Pull Request #8579 · hyperledger/besu · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Allow --bootnodes to read enode URLs from file or remote URL #8579

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gap-editor
Copy link

PR description

This change enhances the --bootnodes option so it can read enode URLs from a file or remote source, in addition to the existing comma-separated CLI argument. Specifically:

  • Introduce a new helper method resolveBootnodeStrings to handle:
    • HTTP(S) URLs (fetch and parse each line)
    • file:// URIs
    • Local file paths
    • Fallback to raw enode strings when no file or URL is detected
  • Update the bootnodes parsing logic to first resolve all inputs via the helper, then pass the flattened list into buildEnodes.
  • Provide clear error messages if fetching or reading any of the sources fails.

This enables workflows like Ephemery’s dynamic download of latest enodes at runtime:

--bootnodes=https://ephemery.dev/latest/metadata/enodes.txt

Fixed Issue(s)

fixes #8538

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required (docs).
  • Considered the changelog and included an update if required (changelog).
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • spotless: ./gradlew spotlessApply
  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

Signed-off-by: Maximilian Hubert <64627729+gap-editor@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow --bootnodes to read from a file
1 participant
0