Skip to content

Move hard-coded networks to yml files. - #1198

Open
0xfornax wants to merge 1 commit into
masterfrom
refactor-networks-yml
Open

Move hard-coded networks to yml files.#1198
0xfornax wants to merge 1 commit into
masterfrom
refactor-networks-yml

Conversation

@0xfornax

@0xfornax 0xfornax commented Aug 27, 2026

Copy link
Copy Markdown
Member

Load Ethereum networks from YAML instead of hard-coding them.

Smart Node network identity and behavior now come from networks-default.yml, loaded at startup.

Official networks (mainnet, Hoodi testnet, kurtosis devnet) live in shared/services/rocketpool/assets/install/networks-default.yml. rocketpool service install always overwrites ~/.rocketpool/networks-default.yml with that file.

Operator overlay: optional ~/.rocketpool/networks-extra.yml. Same-name entries replace official ones; new names are appended and show up in service config. Extra networks may omit Rocket Pool contract addresses so clients can sync on a chain that has no RP deployment.

Also

  • Removes Network_Mainnet / Network_Devnet / Network_Testnet. Network_All stays as the parameter-default fallback.
  • Launch scripts use BEACON_NETWORK and optional CUSTOM_CHAIN_DIR instead of switching on mainnet|testnet|devnet.

Closes #438

@github-actions

Copy link
Copy Markdown

Coverage Report

@0xfornax
0xfornax force-pushed the refactor-networks-yml branch from 2544ede to f6e70f6 Compare August 27, 2026 19:39
@github-actions

Copy link
Copy Markdown

Coverage Report

@github-actions

Copy link
Copy Markdown

Merging this branch changes the coverage (6 decrease, 7 increase)

Impacted Packages Coverage Δ 🤖
github.com/rocket-pool/smartnode/rocketpool-cli/cli 0.20% (+0.20%) 👍
github.com/rocket-pool/smartnode/rocketpool-cli/megapool 0.06% (-0.10%) 👎
github.com/rocket-pool/smartnode/rocketpool-cli/network 0.00% (ø)
github.com/rocket-pool/smartnode/rocketpool-cli/node 0.00% (ø)
github.com/rocket-pool/smartnode/rocketpool-cli/pdao 0.09% (+0.09%) 👍
github.com/rocket-pool/smartnode/rocketpool-cli/service 0.00% (ø)
github.com/rocket-pool/smartnode/rocketpool-cli/service/config 0.00% (ø)
github.com/rocket-pool/smartnode/rocketpool-cli/wallet 0.41% (+0.41%) 👍
github.com/rocket-pool/smartnode/rocketpool/api/node 2.27% (+2.27%) 👍
github.com/rocket-pool/smartnode/rocketpool/node 0.51% (-0.14%) 👎
github.com/rocket-pool/smartnode/rocketpool/watchtower 0.75% (-0.14%) 👎
github.com/rocket-pool/smartnode/shared/services/alerting 1.06% (-0.50%) 👎
github.com/rocket-pool/smartnode/shared/services/config 6.18% (+2.70%) 👍
github.com/rocket-pool/smartnode/shared/services/connectivity 2.04% (-1.80%) 👎
github.com/rocket-pool/smartnode/shared/services/rewards 2.85% (-1.83%) 👎
github.com/rocket-pool/smartnode/shared/services/rocketpool 0.00% (ø)
github.com/rocket-pool/smartnode/shared/services/rocketpool/assets 9.55% (+9.55%) 👍
github.com/rocket-pool/smartnode/shared/services/state/cli 0.00% (ø)
github.com/rocket-pool/smartnode/shared/types/config 5.88% (+0.79%) 👍
github.com/rocket-pool/smartnode/treegen 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/rocket-pool/smartnode/rocketpool-cli/cli/cli.go 0.00% (ø) 2019 (+2019) 0 2019 (+2019)
github.com/rocket-pool/smartnode/rocketpool-cli/megapool/notify-final-balance.go 0.00% (ø) 3971 (+3029) 0 3971 (+3029)
github.com/rocket-pool/smartnode/rocketpool-cli/megapool/status.go 0.00% (ø) 5013 (+2757) 0 5013 (+2757)
github.com/rocket-pool/smartnode/rocketpool-cli/network/dao-proposals.go 0.00% (ø) 2634 (+1401) 0 2634 (+1401)
github.com/rocket-pool/smartnode/rocketpool-cli/node/status.go 0.00% (ø) 6688 (+3522) 0 6688 (+3522)
github.com/rocket-pool/smartnode/rocketpool-cli/node/sync.go 0.00% (ø) 1511 (+884) 0 1511 (+884)
github.com/rocket-pool/smartnode/rocketpool-cli/pdao/status.go 0.00% (ø) 3390 (+1960) 0 3390 (+1960)
github.com/rocket-pool/smartnode/rocketpool-cli/service/commands.go 0.00% (ø) 2750 (+1359) 0 2750 (+1359)
github.com/rocket-pool/smartnode/rocketpool-cli/service/config/step-finished.go 0.00% (ø) 1209 (+577) 0 1209 (+577)
github.com/rocket-pool/smartnode/rocketpool-cli/service/config/step-metrics.go 0.00% (ø) 456 (+228) 0 456 (+228)
github.com/rocket-pool/smartnode/rocketpool-cli/service/config/step-native-finished.go 0.00% (ø) 899 (+415) 0 899 (+415)
github.com/rocket-pool/smartnode/rocketpool-cli/service/config/step-native-metrics.go 0.00% (ø) 456 (+228) 0 456 (+228)
github.com/rocket-pool/smartnode/rocketpool-cli/service/service.go 0.00% (ø) 28655 (+16411) 0 28655 (+16411)
github.com/rocket-pool/smartnode/rocketpool-cli/wallet/status.go 0.00% (ø) 908 (+428) 0 908 (+428)
github.com/rocket-pool/smartnode/rocketpool/api/node/create-vacant-minipool.go 0.00% (ø) 5162 (+3132) 0 5162 (+3132)
github.com/rocket-pool/smartnode/rocketpool/node/auto-tx-gas.go 8.25% (+8.25%) 388 (+388) 32 (+32) 356 (+356) 👍
github.com/rocket-pool/smartnode/shared/services/config/besu-params.go 12.00% (-3.56%) 75 (+30) 9 (+2) 66 (+28) 👎
github.com/rocket-pool/smartnode/shared/services/config/commit-boost-config.go 3.07% (+0.36%) 2084 (+976) 64 (+34) 2020 (+942) 👍
github.com/rocket-pool/smartnode/shared/services/config/erigon-params.go 12.67% (+12.67%) 150 (+150) 19 (+19) 131 (+131) 🎉
github.com/rocket-pool/smartnode/shared/services/config/external-configs.go 3.78% (-0.79%) 1350 (+540) 51 (+14) 1299 (+526) 👎
github.com/rocket-pool/smartnode/shared/services/config/geth-params.go 12.67% (-4.00%) 150 (+60) 19 (+4) 131 (+56) 👎
github.com/rocket-pool/smartnode/shared/services/config/lighthouse-config.go 5.14% (-0.57%) 175 (+70) 9 (+3) 166 (+67) 👎
github.com/rocket-pool/smartnode/shared/services/config/lodestar-config.go 5.14% (-0.57%) 175 (+70) 9 (+3) 166 (+67) 👎
github.com/rocket-pool/smartnode/shared/services/config/mev-boost-config.go 7.63% (-2.57%) 2464 (+1199) 188 (+59) 2276 (+1140) 👎
github.com/rocket-pool/smartnode/shared/services/config/nethermind-params.go 10.14% (-2.31%) 552 (+255) 56 (+19) 496 (+236) 👎
github.com/rocket-pool/smartnode/shared/services/config/networks-config.go 11.69% (+11.69%) 3472 (+3472) 406 (+406) 3066 (+3066) 🎉
github.com/rocket-pool/smartnode/shared/services/config/nimbus-config.go 7.20% (-1.47%) 250 (+100) 18 (+5) 232 (+95) 👎
github.com/rocket-pool/smartnode/shared/services/config/prysm-config.go 8.61% (+1.59%) 244 (+130) 21 (+13) 223 (+117) 👍
github.com/rocket-pool/smartnode/shared/services/config/reth-params.go 10.14% (-2.31%) 552 (+255) 56 (+19) 496 (+236) 👎
github.com/rocket-pool/smartnode/shared/services/config/rocket-pool-config.go 5.80% (+4.86%) 23942 (+15198) 1389 (+1307) 22553 (+13891) 👍
github.com/rocket-pool/smartnode/shared/services/config/smartnode-config.go 1.86% (+0.18%) 3014 (+1465) 56 (+30) 2958 (+1435) 👍
github.com/rocket-pool/smartnode/shared/services/config/teku-config.go 8.33% (-1.91%) 276 (+110) 23 (+6) 253 (+104) 👎
github.com/rocket-pool/smartnode/shared/services/rewards/generator.go 0.00% (ø) 2270 (+1456) 0 2270 (+1456)
github.com/rocket-pool/smartnode/shared/services/rewards/rewards-interval-info.go 0.00% (ø) 98 (+28) 0 98 (+28)
github.com/rocket-pool/smartnode/shared/services/rocketpool/assets/assets.go 9.55% (+9.55%) 157 (+127) 15 (+15) 142 (+112) 👍
github.com/rocket-pool/smartnode/shared/services/rocketpool/client.go 0.00% (ø) 19806 (+10064) 0 19806 (+10064)
github.com/rocket-pool/smartnode/shared/services/state/cli/cli.go 0.00% (ø) 3075 (+1812) 0 3075 (+1812)
github.com/rocket-pool/smartnode/shared/types/config/network.go 6.92% (+6.92%) 260 (+260) 18 (+18) 242 (+242) 👍
github.com/rocket-pool/smartnode/shared/types/config/types.go 17.95% (-6.50%) 78 (+33) 14 (+3) 64 (+30) 👎
github.com/rocket-pool/smartnode/treegen/tree-gen.go 0.00% (ø) 10624 (+6047) 0 10624 (+6047)

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/rocket-pool/smartnode/rocketpool/watchtower/submit-network-balances-state_test.go
  • github.com/rocket-pool/smartnode/shared/services/alerting/alerting_test.go
  • github.com/rocket-pool/smartnode/shared/services/config/api-config_test.go
  • github.com/rocket-pool/smartnode/shared/services/config/config_test.go
  • github.com/rocket-pool/smartnode/shared/services/config/networks-config_test.go
  • github.com/rocket-pool/smartnode/shared/services/connectivity/check-port-connectivity_test.go

@0xfornax
0xfornax marked this pull request as ready for review August 28, 2026 16:26
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.

Networks should not be hard-coded

1 participant