Skip to content

Conversation

@JonathanOppenheimer
Copy link
Member

@JonathanOppenheimer JonathanOppenheimer commented Nov 6, 2025

Why this should be merged

This is perhaps the most important PR I have ever opened. We held an internal vote about what to name the next upgrade, and @bernard-avalabs's suggestion won!

How this works

This is just structural code for when logic for the next upgrade is added.

How this was tested

CI

Need to be documented in RELEASES.md?

No

@JonathanOppenheimer JonathanOppenheimer changed the title name H upgrade Name and configure the H upgrade: Helicon Nov 6, 2025
@JonathanOppenheimer JonathanOppenheimer self-assigned this Nov 6, 2025
@JonathanOppenheimer JonathanOppenheimer moved this to Ready 🚦 in avalanchego Nov 6, 2025
@JonathanOppenheimer JonathanOppenheimer marked this pull request as ready for review November 6, 2025 21:35
maru-ava
maru-ava previously approved these changes Nov 6, 2025
Copy link
Contributor

@StephenButtolph StephenButtolph left a comment

Choose a reason for hiding this comment

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

Please model this PR after #3964

Bonus points for adding tests to automatically discover discrepancies between this PR and the above linked PR.

@github-project-automation github-project-automation bot moved this from Ready 🚦 to In Progress 🏗️ in avalanchego Nov 6, 2025
@StephenButtolph StephenButtolph requested a review from a team November 12, 2025 18:44
@JonathanOppenheimer
Copy link
Member Author

e2e_post_granite will never run because it doesn't exist anymore.

Signed-off-by: Stephen Buttolph <[email protected]>
JonathanOppenheimer and others added 3 commits November 14, 2025 11:15
Co-authored-by: Stephen Buttolph <[email protected]>
Signed-off-by: Jonathan Oppenheimer <[email protected]>
Co-authored-by: Stephen Buttolph <[email protected]>
Signed-off-by: Jonathan Oppenheimer <[email protected]>
// not passed through the RPC protocol, but we need to set it to match the
// expected value for comparison.
// TODO(JonathanOppenheimer): this should definitely be removed from the config
gotConfig.GraniteEpochDuration = wantConfig.GraniteEpochDuration
Copy link
Member Author

Choose a reason for hiding this comment

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

another reason this should be removed.

Comment on lines +265 to +284
// convert to protobuf
pbUpgrades := &vmpb.NetworkUpgrades{
ApricotPhase_1Time: grpcutils.TimestampFromTime(wantConfig.ApricotPhase1Time),
ApricotPhase_2Time: grpcutils.TimestampFromTime(wantConfig.ApricotPhase2Time),
ApricotPhase_3Time: grpcutils.TimestampFromTime(wantConfig.ApricotPhase3Time),
ApricotPhase_4Time: grpcutils.TimestampFromTime(wantConfig.ApricotPhase4Time),
ApricotPhase_4MinPChainHeight: wantConfig.ApricotPhase4MinPChainHeight, // not passed through the RPC protocol
ApricotPhase_5Time: grpcutils.TimestampFromTime(wantConfig.ApricotPhase5Time),
ApricotPhasePre_6Time: grpcutils.TimestampFromTime(wantConfig.ApricotPhasePre6Time),
ApricotPhase_6Time: grpcutils.TimestampFromTime(wantConfig.ApricotPhase6Time),
ApricotPhasePost_6Time: grpcutils.TimestampFromTime(wantConfig.ApricotPhasePost6Time),
BanffTime: grpcutils.TimestampFromTime(wantConfig.BanffTime),
CortinaTime: grpcutils.TimestampFromTime(wantConfig.CortinaTime),
CortinaXChainStopVertexId: wantConfig.CortinaXChainStopVertexID[:], // not passed through the RPC protocol
DurangoTime: grpcutils.TimestampFromTime(wantConfig.DurangoTime),
EtnaTime: grpcutils.TimestampFromTime(wantConfig.EtnaTime),
FortunaTime: grpcutils.TimestampFromTime(wantConfig.FortunaTime),
GraniteTime: grpcutils.TimestampFromTime(wantConfig.GraniteTime),
HeliconTime: grpcutils.TimestampFromTime(wantConfig.HeliconTime),
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is copied from vm_client.go. This should be made into a helper (similarly to how convertNetworkUpgrades is a helper the other way).

Comment on lines +289 to +292
// not passed through the RPC protocol, but we need to set it to match the
// expected value for comparison.
// TODO(JonathanOppenheimer): this should definitely be removed from the config
gotConfig.GraniteEpochDuration = wantConfig.GraniteEpochDuration
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this just a bug? If we are passing through things like ApricotPhase_4MinPChainHeight and CortinaXChainStopVertexId, I'd expect GraniteEpochDuration to be passed through.

// TestConvertNetworkUpgrades_AllFieldsHandled ensures that all fields in
// upgrade.Config are properly handled when converting from the gRPC protobuf message.
func TestConvertNetworkUpgrades_AllFieldsHandled(t *testing.T) {
wantConfig := upgrade.Default
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we test this for all of:

constants.MainnetID
constants.FujiID
constants.LocalID
constants.UnitTestID

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress 🏗️

Development

Successfully merging this pull request may close these issues.

4 participants