Skip to content

Add public network support to tmpnet#4267

Merged
joshua-kim merged 7 commits intomasterfrom
add-public-networks-to-tmpnet-pr
Sep 16, 2025
Merged

Add public network support to tmpnet#4267
joshua-kim merged 7 commits intomasterfrom
add-public-networks-to-tmpnet-pr

Conversation

@felipemadero
Copy link
Copy Markdown
Contributor

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

  • Adds NetworkID field to the serialized network configuration for proper persistence across tmpnet sessions
  • Modifies bootstrap configuration logic to skip custom bootstrap setup for public networks, allowing them to use avalanchego's built-in bootstrappers

How this was tested

CLI L1 fuji validators on local machine

Need to be documented in RELEASES.md?

Copilot AI review requested due to automatic review settings September 11, 2025 19:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

@maru-ava maru-ava left a comment

Choose a reason for hiding this comment

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

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?

Comment thread tests/fixture/tmpnet/node.go Outdated
type serializedNetworkConfig struct {
UUID string `json:"uuid,omitempty"`
Owner string `json:"owner,omitempty"`
NetworkID uint32 `json:"networkID,omitempty"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch!

@joshua-kim joshua-kim moved this to Backlog 🧊 in avalanchego Sep 15, 2025
@joshua-kim
Copy link
Copy Markdown
Contributor

Looks like we need to re-sign, 8684f8c is missing a signature

@felipemadero
Copy link
Copy Markdown
Contributor Author

Replaced by #4280 due to commit verification issues

auto-merge was automatically disabled September 15, 2025 23:20

Pull request was closed

@github-project-automation github-project-automation bot moved this from Backlog 🧊 to Done 🎉 in avalanchego Sep 15, 2025
@felipemadero felipemadero reopened this Sep 15, 2025
@github-project-automation github-project-automation bot moved this from Done 🎉 to In Progress 🏗️ in avalanchego Sep 15, 2025
felipemadero and others added 6 commits September 15, 2025 20:39
- 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
@felipemadero felipemadero force-pushed the add-public-networks-to-tmpnet-pr branch from 5ae71a9 to 1ce0ae3 Compare September 15, 2025 23:42
@joshua-kim joshua-kim added this pull request to the merge queue Sep 16, 2025
@joshua-kim joshua-kim removed this pull request from the merge queue due to a manual request Sep 16, 2025
@joshua-kim joshua-kim added this pull request to the merge queue Sep 16, 2025
Merged via the queue into master with commit 87cda9a Sep 16, 2025
35 checks passed
@joshua-kim joshua-kim deleted the add-public-networks-to-tmpnet-pr branch September 16, 2025 01:26
@github-project-automation github-project-automation bot moved this from In Progress 🏗️ to Done 🎉 in avalanchego Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants