Skip to content

Comments

Localclusters tmpnet#2680

Merged
felipemadero merged 161 commits intomainfrom
localclusters-tmpnet
Mar 26, 2025
Merged

Localclusters tmpnet#2680
felipemadero merged 161 commits intomainfrom
localclusters-tmpnet

Conversation

@felipemadero
Copy link
Collaborator

@felipemadero felipemadero commented Mar 12, 2025

Why this should be merged

Closes #2579 #2091 #2528 #2688

There is also a couple of minor extra features added on it:

  • support specifying http and staking port for local cluster l1 validators
  • support blockchain aliases on local clusters
  • minor improvements in network status output

How this works

How this was tested

How is this documented

@sukantoraymond
Copy link
Contributor

It solves #2688, does this mean we can have two separate active clusters of local machine validator now at the same time?

@sukantoraymond
Copy link
Contributor

I think it does since it also solves #2528

@felipemadero
Copy link
Collaborator Author

I think it does since it also solves #2528

Both issues are pretty similar. Answer is yes we can have two separate local clusters at the same time.

Comment on lines +460 to +462
string, // nodeID
string, // public key
string, // PoP
Copy link
Contributor

Choose a reason for hiding this comment

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

should we just return a nodeID object here, instead of three strings?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I prefer this reformatting to be done on another PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

} else if !hasValidators {
continue
}
blockchainBootstrapped, err := IsLocalClusterBlockchainBootstrapped(app, clusterName, blockchain.ID.String(), blockchain.SubnetID)
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just assign blockchainBootstrappedOnSomeCluster here

Copy link
Collaborator Author

@felipemadero felipemadero Mar 26, 2025

Choose a reason for hiding this comment

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

we iterate over all the clusters , the last one can be false and overwrite some previous true value. I believe it is cleaner this way that to assign to blockchainBootstrappedOnSomeCluster, check the value and break if true

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok will implement the version with break

Comment on lines +307 to +312
func GetFilteredLocalClusters(
app *application.Avalanche,
running bool,
network models.Network,
blockchainName string,
) ([]string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems that this function is used whenever running = true, should we remove this from argument?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I would rather prefer to keep the option available for the future. It is useful for debugging and dev tasks.

@sukantoraymond
Copy link
Contributor

sukantoraymond commented Mar 21, 2025

AVL-7H2W7V:avalanche-cli raymondsukanto$ ./bin/avalanche node local destroy newSubnet-local-node-fuji
AVL-7H2W7V:avalanche-cli raymondsukanto$ ./bin/avalanche node local destroy newSubnet2-local-node-fuji

Seems that node local destroy doesn't output anything.
We should prob output that its destroyed.

@sukantoraymond
Copy link
Contributor

sukantoraymond commented Mar 25, 2025

AVL-7H2W7V:avalanche-cli raymondsukanto$ ./bin/avalanche blockchain deploy localnetowrk
Found running cluster fujiSubnet-local-node-fuji. Will restart after migration.
Unexpected format on cluster at /Users/raymondsukanto/.avalanche-cli/local/local-local-node-local-network. Please manually recover
Migrating fujiSubnet-local-node-fuji
Migrating newSubnet-local-node-local-network
Restarting cluster fujiSubnet-local-node-fuji.

After i upgrade to a new cli release using this PR, If i want to deploy a new local network, seems that I have to wait a while for migration if i have any local nodes left (which people will do if they dont call node local destroy), can we give them an option if they want to migrate? If they dont' want to migrate, we will just destroy these local nodes instead of migrating them

@github-project-automation github-project-automation bot moved this from Backlog 🗄️ to In Review 👀 in avalanchego Mar 26, 2025
@felipemadero felipemadero merged commit 8ef7ea8 into main Mar 26, 2025
37 checks passed
@felipemadero felipemadero deleted the localclusters-tmpnet branch March 26, 2025 17:27
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done ✅ in avalanchego Mar 26, 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.

Replace ANR usage with TMPNET for Local Clusters

2 participants