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

Light Client: "height requested is too high" thrown when querying against the latest height #7641

Closed
ashcherbakov opened this issue Jan 19, 2022 · 1 comment · Fixed by #7642

Comments

@ashcherbakov
Copy link

ashcherbakov commented Jan 19, 2022

Tendermint version: v0.34.14

What happened:

  • LightClient proxy is started
  • An ABCI query request is sent via light client proxy with the default height (0) which means to query against the latest state
  • Light client successfully receives the response, and tries to update itself for the next height (H+1)
  • A block with H+1 is not created yet, and light client fails with height requested is too high error

What you expected to happen:
Probably one of the following should happen (be configurable):

  • Option1: light client waits until the new block (H+1) is committed
  • Option2: if query against the latest state needs to be done, perform query against latestHeight-1 instead (need to calculate lateststate-1 properly to make sure that we don't get an outdated request if latest state is taken from a malicious primary node)

It looks like Option2 is used for block_results request (BlockResults in https://github.com/tendermint/tendermint/blob/master/light/rpc/client.go)

@ashcherbakov
Copy link
Author

Fix implementing Option2: #7642

Abdulbois added a commit to zigbee-alliance/distributed-compliance-ledger that referenced this issue Feb 6, 2024
- Replace 'cometbft' repo with fork due to light Proxy issue - tendermint/tendermint#7641
- Enable accessing lightclient0 endpoint

Signed-off-by: Abdulbois <abdulbois.tursunov@dsr-corporation.com>
Signed-off-by: Abdulbois <abdulbois123@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant