Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Wallet module is out of sync with consensus module #3027

Closed
huetsch opened this issue May 17, 2018 · 4 comments · Fixed by #3030
Closed

Wallet module is out of sync with consensus module #3027

huetsch opened this issue May 17, 2018 · 4 comments · Fixed by #3030
Assignees
Labels

Comments

@huetsch
Copy link
Contributor

huetsch commented May 17, 2018

BUG REPORT

Expected Behavior

Wallet blockheight should be in sync with consensus blockheight.

How to reproduce it (as minimally and precisely as possible)

Set up a new Sia environment. Sync consensus. Init a new wallet seed. Then run: siac consensus and siac wallet and compare the respective heights. Wallet is consistently behind consensus (usually by 10 blocks, but apparently not always).

consensus mismatch

Extra Comments

Not sure why keyConsensusHeight in the wallet module is falling behind, my best guess is that there's some buffering going on or there's some issue with boltdb.

OKex is using the consensus blockheight in conjunction with the wallet API to grab info about incoming transactions, but their call to the /wallet/transactions API is throwing an error because, although these blocks are in consensus, the wallet API correctly won't accept a starting blockheight that it views as too high.

Environment

  • Sia version: master
  • OS: MacOS 10, Centos 7
@DavidVorick
Copy link
Member

We have reproduced this (inconsistently) locally, so at the very least we agree there's a problem.

My best guess right now is that we are somehow getting into a situation where we revert a consensus change due to an error, but then for some reason we don't revert any changes to the height. On the other hand, it doesn't seem like we are hitting any condition where the wallet shuts down or panics.

@huetsch can you confirm that you didn't experience any crashes, shutdowns, or wallet restarts (it won't start on it's own, you'd have to run a command to start it) while reproducing this bug? If not, that will narrow down some of the places that we have to look.

@huetsch
Copy link
Contributor Author

huetsch commented May 18, 2018

No crashes. I may have killed the Sia daemon (SIGINT) while syncing and then restarted it. But other than that, it was a fresh environment.

@tbenz9 tbenz9 added the Bug label May 18, 2018
@shadymeh
Copy link

Will it be post here or on discord if we are close to fixing the bug? Would be nice to see okex add sia.

@nielscastien
Copy link
Contributor

@DavidVorick I still have this issue on my instance (v1.3.3 updated from v1.3.2). No crashes or other problems but the wallet is still 8 blocks ahead:
afbeelding

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants