Closed ganthern closed 3 years ago
Thank you for the report! We'll investigate the issue 👍
@antouhou I had a fiddle with this and at least got it syncing correctly, but it's probably not ready for a pull request since I started looking at dashevo literally yesterday and don't really know yet what I'm doing. Should I still open a PR so someone can have a look?
@ganthern We will look at it even if not ready. When creating a PR, you can setup to a be a draft PR instead, that looks suitable :) Thank you !
@ganthern nice one for putting this PR together - I had the same issue myself a couple of days ago but didn't have a chance to investigate further. If you're just getting into Dash Platform ("evo") devolpment, are you aware of the developer discord? http://chat.dashdevs.org/ We're actually running a bounty program there which includes some small incentives to help with bug spotting & swatting just like this, amongst other things. Would be great to see you there!
@cloudwheels I actually found the discord already, and have seen that you seem to have encountered this issue at almost the same time. Thanks for the invitation!
Hey @cloudwheels @ganthern! I've deployed a new version of DAPI yesterday to the evonet. It fixes the issue. Sorry for the long wait! Eventually, we ended up just removing the error message from the DAPI in the https://github.com/dashevo/dapi/pull/315. Please check when you have time! Thanks!
This has been in a previous release.
trying to create a wallet from a fixed mnemonic, the TransactionSyncStreamWorker first tries to sync from the first block, then from some block in the chain, but without updating the count of synced blocks.
Possible Solution
Looks like it syncs up to the gap limit, updates the last synced block hash but not the height, therefore trying to sync more blocks than are on the chain on the next sync call.
https://github.com/dashevo/wallet-lib/blob/7722d817373ae332d15641d0b3b73b9556e48a6c/src/plugins/Workers/TransactionSyncStreamWorker/methods/startHistoricalSync.js#L19-L23
syncUpToTheGapLimit should probably update the height as well.
Steps to Reproduce (for bugs)
wallet.js:
run with
LOG_LEVEL=debug node wallet.js
Output:
Your Environment