-
Notifications
You must be signed in to change notification settings - Fork 824
Name and configure the H upgrade: Helicon #4478
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
2829726 to
efe2db4
Compare
Co-authored-by: Stephen Buttolph <[email protected]> Signed-off-by: Jonathan Oppenheimer <[email protected]>
|
|
Signed-off-by: Stephen Buttolph <[email protected]>
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]>
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 |
There was a problem hiding this comment.
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.
| // 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), | ||
| } |
There was a problem hiding this comment.
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).
| // 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
?
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