-
Notifications
You must be signed in to change notification settings - Fork 675
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
Remove subnetIDs from uptime manager #3235
Conversation
func (s *state) GetUptime(vdrID ids.NodeID) (time.Duration, time.Time, error) { | ||
return s.validatorState.GetUptime(vdrID, constants.PrimaryNetworkID) | ||
} | ||
|
||
func (s *state) SetUptime(vdrID ids.NodeID, upDuration time.Duration, lastUpdated time.Time) error { | ||
return s.validatorState.SetUptime(vdrID, constants.PrimaryNetworkID, upDuration, lastUpdated) | ||
} |
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.
Intentionally added these here to not modify validator_metadata
as we will probably modify it completely by also removing delegateeReward, potential reward etc
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.
Doc pointers on how a given VM is suggested to track uptime once this is removed? I didn't see mention in the merged version of ACP-77. I'm curious if each VM will have to implement something bespoke if there exists / we intend to provide (e.g. in subnet-evm or hypersdk) an easily configurable facility.
Co-authored-by: Darioush Jalali <[email protected]> Signed-off-by: Ceyhun Onur <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]> Signed-off-by: Ceyhun Onur <[email protected]>
Why this should be merged
With ACP-77, P-chain will not track uptimes; instead every VM should be tracking their own uptimes for their subnets. This removes any subnetID related uptime tracking logic from AvalancheGo/P-chain.
Should be merged after #3226 gets in a release
How this works
ConnectedSubnet
internal messageSubnetUptimes
and it's handling in p2p ping messageHow this was tested