-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 GET redelegation endpoint and querier #2182
Comments
Seeing as the tag here was changed from if-have-time-prelaunch to prelaunch, I'm presuming its needed / blocking something for voyager? |
Not really for Voyager, but mostly because of the LCD spec (#2113), which is labeled prelaunch |
@faboweb @jackzampolin @cwgoes @HaoyangLiu do you think we require to have this functionality of querying a single redelegation ? According to Fabo it might not be required since clients will most of the time do query all of them at once. Thoughts ? |
I think we need this functionality for individual delegation viewing screens. Also does the group of delegations endpoint allow for filtering by user? I have a feeling theres a lot of UI that would require the ability to show all the delegations by an individual user. |
Can't we use the GET data field instead of URL params? |
Seems like |
Agree with @alexanderbez and @sunnya97 here. We should push this into query params. |
actually shouldn't |
Huh? What wrong with Obviously we'd perform sanity/validation checks. |
I'm not opposed to use query parameters |
Great! And |
It should be Alternatively, I can do create the endpoint: |
Ahhh yes there can only be a single redelegation, so yes singular. I like the later model you mentioned as well. |
I'd go with the first one with queries bc
|
I can see a block explorer or some cool delegation visualizer wanting to do that
In this one, is this redelegations to or from a specific validator? If you really wanted to do this, this should be split into two endpoints:
But I don't see why/how is this cleaner than having a single endpoint? |
you can still query all transactions of a certain type by using
no, resources are always in plural. for one delegator/validator there can be multiple redelegations that are filtered by the query parameters Delegator redelegations endpoint I could go with:
For the validator redelegations I think the endpoint is already pretty solid:
Clients can filter on incoming and outgoing redelegations based on the tx. Plus they only need to do one request instead of two. Did any consumer of the API complain about its current form? |
Having to use txs to query all redelegations or to filter between incoming vs outgoing redelegations seems suboptimal. Using tx tags is good for listening for events, but if a query can be done using state, that should be preferred. |
The same could be said for governance votes and deposits. Where do we draw the line? |
@alexanderbez This is a REALLY good question and I think that performance and feedback from clients should really drive this. |
#2139 is missing redelegation querier and redelegation endpoint that needs to be implemented for #2113:
GET /stake/delegators/{delegatorAddr}/redelegations/validator_from/{validatorSrcAddr}/validator_to/{validatorDstAddr}
.Please note that the
GetRedelegation
keeper is already doneFor Admin Use
The text was updated successfully, but these errors were encountered: