Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces configuration file support for relay URLs and builder addresses, migrating them from hardcoded Go variables to YAML files. The changes enable network-specific configurations with default support for mainnet and hoodi testnet.
Key Changes:
- Replaced hardcoded relay URLs and builder addresses with YAML-based configuration
- Added config loader with support for CLI flag and environment variable
- Created default configurations for mainnet and hoodi networks
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| vars/vars.go | Changed Genesis from environment variable to config file value |
| vars/relays.go | Converted hardcoded relay URLs to config-populated variables |
| vars/config.go | Added new config loader with YAML parsing and variable population |
| vars/builder_addresses.go | Converted hardcoded builder addresses to config-populated variable |
| go.mod | Moved yaml.v3 dependency from indirect to direct |
| config-mainnet.yaml | Added mainnet configuration with relay URLs and builder addresses |
| config-hoodi.yaml | Added hoodi testnet configuration |
| cmd/root.go | Added config file flag and loading in PersistentPreRunE |
| README.md | Updated documentation to reference config files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ababino
approved these changes
Dec 16, 2025
otherwise queries are not valid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request migrates the relay URLs and builder addresses configuration from hardcoded Go files to external YAML config files, improving flexibility and maintainability. It introduces a new configuration loading mechanism, updates the CLI to support custom config files, and refactors related variables to be populated from the config at runtime. The changes also add sample config files for mainnet and Hoodi networks.
Configuration management improvements:
vars/config.gofile with aConfigstruct andLoadConfigfunction to load relay URLs, builder addresses, and genesis timestamp from a YAML config file. The config is loaded at startup and populates package-level variables for backwards compatibility.vars/relays.goandvars/builder_addresses.goto remove hardcoded relay URLs and builder addresses, making them populated from the loaded config file instead. [1] [2]vars/vars.goto set theGenesisvariable from the config file rather than an environment variable or hardcoded value.CLI and usage documentation updates:
cmd/root.goto add a--configflag and support theCONFIG_FILEenvironment variable, defaulting toconfig-mainnet.yamlif unspecified. The config file is loaded before running any command.README.mdto document the new config file system, including usage examples for specifying custom config files.New configuration files:
config-mainnet.yamlandconfig-hoodi.yamlas example configuration files for mainnet and Hoodi networks, respectively. These files define relay URLs, genesis timestamps, and builder addresses in YAML format. [1] [2]Dependency management:
gopkg.in/yaml.v3as a direct dependency ingo.modfor YAML parsing, and removed it from the indirect dependencies list. [1] [2]