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

use nodeID filter and uptimePerc #1390

Merged
merged 2 commits into from
Nov 19, 2024
Merged

use nodeID filter and uptimePerc #1390

merged 2 commits into from
Nov 19, 2024

Conversation

ceyonur
Copy link
Collaborator

@ceyonur ceyonur commented Nov 18, 2024

Why this should be merged

getCurrentValidators in Platform VM API returns uptime percentage. This PR changes the uptime seconds to uptime percentage in GetCurrentValidators API to keep the consistency between APIs. It also adds NodeID filtering.

How this works

  • plugin/evm/client.go: Modified the GetCurrentValidators method to accept nodeIDs as a parameter, allowing for filtered queries. [1] [2]
  • plugin/evm/service.go: Introduced GetCurrentValidatorsRequest to handle node ID filtering and updated the GetCurrentValidators method to use this request. Additionally, changed the Uptime field to UptimePercentage for consistency with the PlatformVM API. [1] [2] [3]

Support for new method in state interfaces:

How this was tested

Locally

Need to be documented?

Yes

Need to update RELEASES.md?

Not since we have not captured the API.

@ceyonur ceyonur requested review from darioush and a team as code owners November 18, 2024 14:21
@ceyonur ceyonur merged commit 6083668 into master Nov 19, 2024
14 checks passed
@ceyonur ceyonur deleted the uptime-api-nits branch November 19, 2024 14:22
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.

3 participants