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

Block height on proofs is wrong after restart abci app #106

Closed
ethanfrey opened this issue Jun 13, 2017 · 4 comments
Closed

Block height on proofs is wrong after restart abci app #106

ethanfrey opened this issue Jun 13, 2017 · 4 comments

Comments

@ethanfrey
Copy link
Contributor

This is tested on the master branches (basecoin v0.5.2, tendermint v0.10.0)

Shell 1:

rm -rf ~/.basecoin
basecoin init
basecoin start --without-tendermint

Shell 2:

rm -rf ~/.tendermint
tendermint init
tendermint node

Shell 3:

sleep 300
curl http://localhost:46657/status 2>/dev/null | jq .result.latest_block_height
# 276
curl http://localhost:46657/abci_query\?data\=0x1B1BE55F969F54064628A63B9559E7C21C925165 2>/dev/null | jq .result.response.height
# 278

In this case they should be similar, maybe 1 or 2 blocks off due to the delay in the two commands... The first height comes from tendermint, the second from basecoin.

Trigger problem

Shell 1:

ctrl-c
basecoin start --without-tendermint

Shell 2:

ctrl-c
tendermint node

Shell 3:

curl http://localhost:46657/status 2>/dev/null | jq .result.latest_block_height
# 400
curl http://localhost:46657/abci_query\?data\=0x1B1BE55F969F54064628A63B9559E7C21C925165 2>/dev/null | jq .result.response.height
# 734
@ethanfrey
Copy link
Contributor Author

@phomer this is the problem I was talking about, will try to reproduce with merkleeyes directly

@ethanfrey
Copy link
Contributor Author

Added a cli test case in bugfix/106-wrong-height-on-restart that reproduces this problem cleanly.

Please add any fixes there and run make test_cli to verify they solved the problem.

Note: you can run DEBUG=1 make test_cli and it will dump out a lot more info to the console to help understand what all the return values are. If you need it.

@phomer
Copy link

phomer commented Jun 21, 2017

The error I am seeing with make test_cli seems to be:

ASSERT:account must exist: ERROR: Response error: Height must be less than or equal to the current blockchain height

This appears to happen consistently with Query after a restart. Is this the expected error?

ethanfrey added a commit that referenced this issue Jun 21, 2017
@ethanfrey
Copy link
Contributor Author

Fixed with #129

liamsi pushed a commit to liamsi/cosmos-sdk that referenced this issue Jun 26, 2018
* Fix dead link in README.md
ParthDesai pushed a commit to ChorusOne/cosmos-sdk that referenced this issue Apr 19, 2021
Raumo0 pushed a commit to mapofzones/cosmos-sdk that referenced this issue Feb 13, 2022
* fix: file keyring backend key recover error

key recover fails with EOF errors when attempting to read keyring
password from piped file.

This change allows to recover the current `*bufio.Reader` from the context
instead of creating a new one, in order to have the mnemonic and
password read from the same source.

In still require the application to init the context with a
`*bufio.Reader` argument to `WithInput(r io.Reader)`.

* fix: missing context input in client/keys/add tests

* fix: redeclared global variable and lint in airdrop module

* chores: more lint fixes

* chores: more airdrop lint / fixes
Raumo0 pushed a commit to mapofzones/cosmos-sdk that referenced this issue Feb 13, 2022
…mos#107)

* continuation from cosmos#106 on other impacted commands:
  *  keys import
  *  keys export
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

No branches or pull requests

2 participants