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

Check stale validators with RPC #751

Closed
lukaw3d opened this issue Mar 11, 2022 · 0 comments · Fixed by #776
Closed

Check stale validators with RPC #751

lukaw3d opened this issue Mar 11, 2022 · 0 comments · Fixed by #776
Assignees
Labels
enhancement New feature or request

Comments

@lukaw3d
Copy link
Member

lukaw3d commented Mar 11, 2022

Related to #734 and #748 (comment)

For stale validators, RPC can get up-to-date information of which validators are active:

const validators = nic.schedulerGetValidators(oasis.consensus.HEIGHT_LATEST)
  .then(a => a.sort((a,b) => Number(b.voting_power)-Number(a.voting_power)))

validators.forEach:
  const nodeAddress = await publicKeyToAddress(validator.id)

compare stale validators by node address, and set active/inactive
@lukaw3d lukaw3d added the enhancement New feature or request label Mar 11, 2022
@lukaw3d lukaw3d self-assigned this Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant