Skip to content

Conversation

@terencechain
Copy link
Collaborator

@terencechain terencechain commented Nov 18, 2025

This PR introduces unsupported versions (currently only Gloas), and tightened version.All() to hide those entries, and added version.IsUnsupported(). Tests were updated to enumerate and assert they never show up in All() or any testnet schedule.

@terencechain terencechain marked this pull request as draft November 18, 2025 17:40
@Inspector-Butters
Copy link
Contributor

  • I don't think Released() is a good name. since for example Fulu isn't released but is being returned by the function.
  • it would be great to see an example of a test that uses the feature gated forks as well. (Released() + FeatureGated())

@prestonvanloon
Copy link
Member

I'd rather see the language of "Unsupported" where a list of forks that are not fully supported are removed from version.All(). The purpose of having version.All() is to ensure that various areas of the code have support for all forks in the select statements in which all forks must be covered to support all forks.

// enabled on any supported network. These versions are removed from All().
var unsupportedVersions = []int{Gloas}

var unsupportedVersionSet = map[int]struct{}{}
Copy link
Collaborator

@kasey kasey Nov 19, 2025

Choose a reason for hiding this comment

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

You can get rid of the list and declare the keys directly in the map:

var unsupportedVersions = map[int]struct{}{
    Gloas: struct{}{}
}

Deletes this whole chunk of init code:

unsupportedVersionSet = make(map[int]struct{}, len(unsupportedVersions))
	for _, v := range unsupportedVersions {
		unsupportedVersionSet[v] = struct{}{}
	}
	sort.Ints(unsupportedVersions)

I think you can also drop the Unsupported func.

@terencechain terencechain changed the title Guard unreleased fork versions and make tests use released set Guard Unreleased Forks and Add Scheduled/Supported Version Helpers Nov 19, 2025
@terencechain terencechain changed the title Guard Unreleased Forks and Add Scheduled/Supported Version Helpers Add supported version for fork enum version Nov 19, 2025
@terencechain terencechain changed the title Add supported version for fork enum version Add supported / unsupported version for fork enum Nov 19, 2025
@terencechain terencechain marked this pull request as ready for review November 19, 2025 22:06
@terencechain terencechain added this pull request to the merge queue Nov 19, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 19, 2025
@terencechain terencechain added this pull request to the merge queue Nov 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 20, 2025
@prestonvanloon prestonvanloon added this pull request to the merge queue Nov 20, 2025
Merged via the queue into develop with commit 2f067c4 Nov 20, 2025
17 checks passed
@prestonvanloon prestonvanloon deleted the released-version-gating branch November 20, 2025 15:23
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.

5 participants