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

Support Height Queries #4318

Closed
1 of 4 tasks
alexanderbez opened this issue May 10, 2019 · 1 comment · Fixed by #4382
Closed
1 of 4 tasks

Support Height Queries #4318

alexanderbez opened this issue May 10, 2019 · 1 comment · Fixed by #4382
Assignees
Milestone

Comments

@alexanderbez
Copy link
Contributor

alexanderbez commented May 10, 2019

Summary

Height-based queries are currently disabled (removed completely) from the client interfaces. There are two notable reasons for initially doing so:

  1. Nodes, by default, have pruning enabled.
  2. Most, if not all, querying is now done through the concept of Queriers which do not necessarily directly query the store.

With regards to (1), if the node has pruning enabled, we need to make sure any height query fails gracefully.

With regards to (2), the general flow is some sort of query params are constructed and serialized. These serialized params are then sent to CLIContext#QueryWithData, which underneath constructs a ABCIQueryOptions and calls ABCIQueryWithOptions. Via ABCI this gets routed to the BaseApp's Query method, namely under the custom switch case which further calls handleQueryCustom. Here in handleQueryCustom is where I believe we would need to utilize the height and try to load it returning an error upon failure (it's currently not being used at all).

/cc @ebuchman @cwgoes @jackzampolin


For Admin Use

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

This is needed for better reporting for validators. I spoke with Matt Harrop from Figment and he thought the two queries that are in most need of height support are:

  • Account balance at height
  • Unclaimed rewards/commission at a block height

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.

2 participants