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

Correctly Returning Height in Queries #4773

Closed
3 of 4 tasks
alexanderbez opened this issue Jul 24, 2019 · 0 comments · Fixed by #4777
Closed
3 of 4 tasks

Correctly Returning Height in Queries #4773

alexanderbez opened this issue Jul 24, 2019 · 0 comments · Fixed by #4777
Assignees
Labels

Comments

@alexanderbez
Copy link
Contributor

alexanderbez commented Jul 24, 2019

Summary

Through #4573 we introduced the ability to inject the height in query responses. That is, the height at the time for which the resource was queried at was injected into the response.

Problem Definition

Turns out that the height in the result you receive from ABCIQueryWithOptions is actually the height you specify! In other words, Tendermint does automatically give you this height. Only when you actually provide the height does it return that to you...essentially making #4573 redundant atm (unless you actually specified a height in the query).

Proposal

Since upstream clients and consumers want to the know the height at which a resource was queried at (actually implementing the intended functionality of #4573), we need to automatically and behind the scenes query for the current block height (we already have this logic) and update the CLIContext to include this.

However, this now means one additional internal query per client query. To circumvent this, we can cache the height in the client code somewhere.

/cc @jackzampolin @colin-axner


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant