-
Notifications
You must be signed in to change notification settings - Fork 837
ACP-77: Current validators API for SoV #3404
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…hego into refactor-uptime-manager
…s/avalanchego into test-only-current-validators-api
yacovm
reviewed
Nov 11, 2024
yacovm
reviewed
Nov 11, 2024
yacovm
reviewed
Nov 11, 2024
…s/avalanchego into test-only-current-validators-api
Contributor
StephenButtolph
left a comment
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.
final nits
Co-authored-by: Stephen Buttolph <[email protected]> Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Stephen Buttolph <[email protected]> Signed-off-by: Ceyhun Onur <[email protected]>
StephenButtolph
approved these changes
Nov 13, 2024
tsachiherman
pushed a commit
that referenced
this pull request
Jan 29, 2025
Signed-off-by: Ceyhun Onur <[email protected]> Signed-off-by: Joshua Kim <[email protected]> Signed-off-by: Ceyhun Onur <[email protected]> Co-authored-by: Stephen Buttolph <[email protected]> Co-authored-by: Joshua Kim <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new gRPC method
GetCurrentValidatorSetto theValidatorStateservice, allowing clients to retrieve the current validator set for a given subnet. The changes span multiple files to implement this new functionality, including updates to the protobuf definitions, client and server interfaces, and associated tests.Additions to
ValidatorStateService:proto/pb/validatorstate/validator_state_grpc.pb.go: Added theGetCurrentValidatorSetmethod to both client and server interfaces, along with its handler and full method name constant. [1] [2] [3] [4] [5] [6] [7]proto/validatorstate/validator_state.proto: Defined theGetCurrentValidatorSetRequestandGetCurrentValidatorSetResponsemessages, and added the new RPC method to theValidatorStateservice. [1] [2]Client and Server Implementation:
snow/validators/gvalidators/validator_state_client.go: Implemented theGetCurrentValidatorSetmethod in theClientstruct to call the new gRPC method.snow/validators/gvalidators/validator_state_server.go: Implemented theGetCurrentValidatorSetmethod in theServerstruct to handle incoming requests.State Interface and Mock Updates:
snow/validators/state.go: Added theGetCurrentValidatorSetmethod to theStateinterface and implemented it in thelockedStatestruct. [1] [2] [3]snow/validators/traced_state.go: Added tracing support for theGetCurrentValidatorSetmethod.snow/validators/validator.go: Defined theGetCurrentValidatorOutputstruct to represent the current validator data.snow/validators/validatorsmock/state.go: Added mock implementations for theGetCurrentValidatorSetmethod.snow/validators/validatorstest/state.go: Added test support for theGetCurrentValidatorSetmethod. [1] [2]Platform VM State Changes:
vms/platformvm/state/state.go: Added theGetCurrentValidatorSetmethod to theStateinterface and implemented it in thestatestruct, including logic to determine if the subnet is L1 and fetch the current validators. [1] [2]vms/platformvm/state/mock_state.go: Added mock implementations for theGetCurrentValidatorSetmethod.