Skip to content

control default latest version for avago and subnetevm #2724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

sukantoraymond
Copy link
Collaborator

@sukantoraymond sukantoraymond commented Apr 7, 2025

This PR was made in light of past incidents:

  • avalanchego prerelease v1.13.0-fuji was necessary for Fuji to work, which forces us having to create a new tag just for Fuji
  • subnet evm latest version binary was not released, causing errors with cli users.

This PR ensures that users won't encounter errors if these incidents occur again in the future, and won't need to update their CLI version to resolve the issue.

The latest versions of AvalancheGo, Subnet EVM and other dependencies (ICM coming after this PR) will be defined in https://raw.githubusercontent.com/ava-labs/avalanche-cli/main/versions/latest.json. CLI will always use these dependencies' versions as default.

If a new version of a dependency such as AvalancheGo is released, we will first test the e2e flow to ensure that CLI still works with the new dependency. Once we have verified it, the AvalancheGo version will be updated in https://raw.githubusercontent.com/ava-labs/avalanche-cli/main/versions/latest.json.

An additional PR is needed to highlight the minimum version of dependency that can be used on each network (e.g. currently minimum release version for AvalancheGo in Fuji is v1.13.0-fuji and v1.13.0 in mainnet) -> Issue #2731

@@ -295,6 +295,7 @@ const (
FujiAvalancheGoV113 = "v1.13.0-fuji"
AvalancheGoCompatibilityURL = "https://raw.githubusercontent.com/ava-labs/avalanchego/master/version/compatibility.json"
SubnetEVMRPCCompatibilityURL = "https://raw.githubusercontent.com/ava-labs/subnet-evm/master/compatibility.json"
CLILatestDependencyURL = "https://raw.githubusercontent.com/ava-labs/avalanche-cli/control-default-version/versions/latest.json"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

need ot change this to main once this PR is merged

Copy link
Collaborator

Choose a reason for hiding this comment

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

we can also make another PR just with the new file, merge, and then fix this one

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

lets merge this to pass CI and then make another PR to change it to main link

Comment on lines 13 to 14
LatestVersion string `json:"latest-version"`
RequirePrerelease bool `json:"require-prerelease"`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is for case like #2674, where we had to use a prerelease for fuji only

@sukantoraymond sukantoraymond marked this pull request as ready for review April 9, 2025 23:32
Copy link
Collaborator

@felipemadero felipemadero left a comment

Choose a reason for hiding this comment

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

very nice work! adding comments on code organization but also on file organization

@@ -317,7 +316,7 @@ func createNodes(cmd *cobra.Command, args []string) error {
UseLatestAvalanchegoPreReleaseVersion: useLatestAvalanchegoPreReleaseVersion,
UseCustomAvalanchegoVersion: useCustomAvalanchegoVersion,
}
avalancheGoVersion, err := node.GetAvalancheGoVersion(app, avaGoVersionSetting)
avalancheGoVersion, err := node.GetAvalancheGoVersion(app, avaGoVersionSetting, network)
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should move this into a package such as pkg/dependecies/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

addressed

Copy link
Collaborator

Choose a reason for hiding this comment

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

this was not addressed. lets move most if not all AvalancheGoVersionSettings related stuff to pkg/dependencies

Copy link
Collaborator

@felipemadero felipemadero left a comment

Choose a reason for hiding this comment

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

Almost ready. Please try to fix the cycle and also move AvalancheGoVersionSettings related stuff to pkg/dependencies, and for the moment leave the prompting only in pkg/node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog 🗄️
Development

Successfully merging this pull request may close these issues.

2 participants