Add public network support to tmpnet#4267
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enables tmpnet to support public networks (Fuji and Mainnet) by modifying bootstrap configuration logic and fixing network persistence. The changes allow public networks to use avalanchego's built-in bootstrappers instead of custom ones, and ensure NetworkID is properly persisted across sessions.
- Adds logic to skip custom bootstrap configuration for public networks
- Includes NetworkID field in serialized network configuration for proper persistence
- Introduces helper function to identify public networks (Fuji and Mainnet)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/fixture/tmpnet/node.go | Adds public network detection and conditionally skips custom bootstrap setup |
| tests/fixture/tmpnet/network_config.go | Adds NetworkID field to serialized configuration for persistence |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
How much space/time do you think it take for a state-sync node to bootstrap testnet? I'm always loath to have things in the tree that aren't exercised.
Edit: Way too big
Also, what are the limitations of starting a node on a public network. I'm assuming things like subnet creation would be problematic?
| type serializedNetworkConfig struct { | ||
| UUID string `json:"uuid,omitempty"` | ||
| Owner string `json:"owner,omitempty"` | ||
| NetworkID uint32 `json:"networkID,omitempty"` |
|
Looks like we need to re-sign, 8684f8c is missing a signature |
|
Replaced by #4280 due to commit verification issues |
- Add NetworkID field to serialized network config for persistence - Skip bootstrap configuration for public networks (Fuji/Mainnet) - Add isPublicNetwork helper function to identify public networks
Signed-off-by: Ron Kuris <[email protected]> Co-authored-by: Copilot <[email protected]>
…4262) Signed-off-by: maru <[email protected]> Co-authored-by: rodrigo <[email protected]>
Signed-off-by: Sam Liokumovich <[email protected]>
5ae71a9 to
1ce0ae3
Compare
Why this should be merged
This change enables tmpnet to work with public networks (Fuji and Mainnet) by properly handling their configuration differences. Previously, tmpnet would attempt to configure bootstrap nodes for all networks, but public networks should use avalanchego's built-in bootstrappers instead of custom ones. Additionally, the NetworkID field was missing from persistence, causing configuration loss across sessions.
How this works
How this was tested
CLI L1 fuji validators on local machine
Need to be documented in RELEASES.md?