-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ABCI query should use Request Height not Context height in setting query height #9433
Comments
Your reasoning sounds correct to me 👍 |
oh, so we were always responding based on the "latest" state, not the requested state? |
I believe we were always using the Context's height, which when zero, uses the latest height/state. However, when a specific height is requested, I don't think it worked in specific query paths. Correct me if I'm wrong @colin-axner |
This is correct. The height field in the request was unused and it instead relied solely on the context height |
Summary
ABCI query should use the request height not the context height
Related to: 7ba386f
Problem Definition
The current ABCI query sets the opts to use a height from the context height. From my understanding, this is incorrect behaviour. It should use
req.Height
in the same way it usesreq.Prove
to set the Prove value for ABCIQueryWithOptions. I believe the current request height value is unused, which is misleading.This lead to a bug in the helper function exposed from the IBC module. It set the request height correctly, but the context height was incorrectly set (since it was never assumed to be used)
Proposal
Change to use
req.Height
. This may have implications for dependencies which rely on the context height instead of the request heightFor Admin Use
The text was updated successfully, but these errors were encountered: