Skip to content

fix(config): enable config wide defaults for ip#1003

Merged
glottologist merged 2 commits into
masterfrom
jason/dedup_config_ip
Nov 18, 2025
Merged

fix(config): enable config wide defaults for ip#1003
glottologist merged 2 commits into
masterfrom
jason/dedup_config_ip

Conversation

@glottologist

Copy link
Copy Markdown
Contributor

Describe the changes
Before:
Each network service (HTTP, Gossip, Reth) required explicit public_ip and bind_ip configuration in TOML files.

After:
Added NetworkDefaults struct and NetworkConfigWithDefaults trait. Services inherit IPs from [network_defaults] section

Changes

Configuration Types (crates/types/src/config/node.rs)

  • Added NetworkDefaults struct with public_ip and bind_ip fields
  • Added NetworkConfigWithDefaults trait with fallback methods public_ip() and bind_ip()
  • Changed GossipConfig, HttpConfig, RethNetworkConfig IP fields from String to Option<String>
  • Implemented NetworkConfigWithDefaults for all 3 config structs
  • Added network_defaults: NetworkDefaults field to NodeConfig

Config File Templates

  • Added [network_defaults] section to mainnet_config.toml and testnet_config.toml
  • Updated docker config files with same pattern

Related Issue(s)
Please link to the issue(s) that will be closed with this PR.

Checklist

  • Tests have been added/updated for the changes.
  • Documentation has been updated for the changes (if applicable).
  • The code follows Rust's style guidelines.

Additional Context
Add any other context about the pull request here.

@glottologist glottologist marked this pull request as ready for review November 17, 2025 21:31

@JesseTheRobot JesseTheRobot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@glottologist glottologist merged commit f01308e into master Nov 18, 2025
24 of 25 checks passed
@glottologist glottologist deleted the jason/dedup_config_ip branch November 18, 2025 15:59
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.

2 participants