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 cmd and endpoints to get validator delegations #2027

Closed
1 of 4 tasks
fedekunze opened this issue Aug 14, 2018 · 2 comments · Fixed by #2565
Closed
1 of 4 tasks

Add cmd and endpoints to get validator delegations #2027

fedekunze opened this issue Aug 14, 2018 · 2 comments · Fixed by #2565

Comments

@fedekunze
Copy link
Collaborator

fedekunze commented Aug 14, 2018

Summary

Add new cmds and endpoints regarding delegations to a validator in order to provide an easy way to get insightful information and to avoid self DDoS.

Problem Definition

Currently the only way for a validator to get all the addresses that delegated to them is to do the following go through the staking transactions and filter them by their validator owner address and then get from each of them the address of the sender of the message.

Also, if they want to get delegation information they need to additionally query delegations one by one from delegator to validator, which might result in a self DDoS as previously seen in voyager/879.

This may require to add a new key for the KVStore.

Proposal

Implement the following queries in both CLI and Gaia-Lite:

  • stake/validators/{validatorAddr}/delegators: Get all delegators that are bonded to a given validator
  • stake/validators/{validatorAddr}/delegations: Get all delegations to a given validator

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@mslipper
Copy link
Contributor

This appears to already be implemented in the CLI.

@rigelrozanski
Copy link
Contributor

@mslipper I don't think this is implemented in either Rest or the CLI - you can get all the delegations from a delegator but not all delegations from different delegators to a single validator

@fedekunze fedekunze added the lite label Aug 30, 2018
@fedekunze fedekunze changed the title Add cmd and endpoints to get validator delegators and delegations Add cmd and endpoints to get validator delegations Oct 20, 2018
@sunnya97 sunnya97 self-assigned this Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants