Skip to content
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

Add getProposedValidators RPC method #3497

Closed
wants to merge 9 commits into from

Conversation

cam-schultz
Copy link
Contributor

Why this should be merged

Exposes via RPC the validators at the proposer VM height used by the inner VM to verify blocks. Useful for gathering ICM signatures from the validators at the height used to verify the block, as specified in ACP-151

How this works

Adds GetProposedValidators which fetches the validators at State.GetMinimumHeight. Other than that, the implementation is identical to GetValidatorsAt

How this was tested

CI

Need to be documented in RELEASES.md?

Yes

tests/e2e/p/proposed_validators.go Outdated Show resolved Hide resolved
vms/platformvm/service.go Show resolved Hide resolved
vms/platformvm/service.md Outdated Show resolved Hide resolved
Co-authored-by: Ian Suvak <[email protected]>
Signed-off-by: cam-schultz <[email protected]>
@@ -120,6 +120,13 @@ type Client interface {
height uint64,
options ...rpc.Option,
) (map[ids.NodeID]*validators.GetValidatorOutput, error)
// GetProposedValidators returns the weights of the validator set of a provided
// subnet at the proposer's height.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// subnet at the proposer's height.
// subnet at this node's current proposed height.

Technically the proposed height is determined on a per-node basis, and the node serving the RPC request likely isn't the same as the proposer of the next block.

@michaelkaplan13
Copy link
Contributor

Closing in favor of #3531

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.

4 participants