Multibit-Legacy / multibit-hd

Deprecated Bitcoin Wallet
https://multibit.org/blog/2017/07/26/multibit-shutdown.html
Other
170 stars 112 forks source link

multibit-hd wallet sync misses payment made by other client #750

Open tl121 opened 8 years ago

tl121 commented 8 years ago

Multibit hd wallet using Trezor was correctly synced. Not run for several days. Using same Trezor, a payment was made using Electrum and transaction was confirmed, with Electrum correctly showing the reduced wallet balance.

Two weeks pass.

Run Multibit HD with Trezor and pull up same wallet. Wallet sync reports successful completion. Shows high balance. Looking at transactions it is apparent that the payment made using Electrum was missing.

Used Multibit HD Recover Wallet function. This correct the problem.

gary-rowe commented 8 years ago

Yes, sharing the same "wallet words" between two different wallet applications can occasionally cause problems since one doesn't know what the other has done. This is why we added the Repair Wallet tool to allow for a re-synch without requiring a full recover.

Closing because there is no further action to be taken.

tl121 commented 8 years ago

This has happened twice with Multibit HD. Although I've done similar tests with Electrum, I've never experienced this problem. Given that the Repair Wallet tool can work, I don't see any reason why the normal resynchronization shouldn't work as it passes by new blocks that haven't previously been sync'd.

jim618 commented 8 years ago

Hi tl121, You are correct that if the 'Repair wallet' code works the normal sync should also work. The code path is practically identical - the main difference is that a repair wallet 'nukes' the transactions and gets everything fresh.

As the 'Repair wallet' works it isn't a critical fault - as this behaviour could be 'something' to do with Electrum/Trezor/Bitcoin network/MultiBit HD it is probably hard to pin down unless reproducible.

I'll open it and assign it to me into 'Backlog'. (This means if we see more instances of this we'll have a look).

tl121 commented 8 years ago

Just to report. After not running Multibit for a month on my Trezor wallet I tried again. This time it showed one unconfirmed transaction (0.4 BTC) which was incorrect. All transactions were in fact confirmed. Also the total balance was off by about 1 BTC.

I selected the wallet sync operation and after grinding through all of the tens of thousands of blocks the final balance was correct.

This is now three times I've seen a problem where Multibit falls out of sync but corrects when I do a rescan.

jim618 commented 8 years ago

Hi tl121, Thanks for your feedback. Yes I think very occasionally we are missing the block confirmation. The regular sync and wallet repair actually uses the same code so it is most likely something to do with the specific Peer connection. Quite a difficult one to pin down due to its rarity unfortunately.

tl121 commented 8 years ago

If I catch it again, I will try to note the block number and block ID that was missed. It could be that the block was orphaned or was a block that replaced a block that was orphaned, etc... Or perhaps there is some other edge case that happens rarely.

Given that the same code is involved in recovery, then there would appear to be a risk that a block might be lost during a recovery. That would be bad, because it would not be clear what the user should do.

tl121 commented 8 years ago

After running my Trezor with Electrum for a month, I went back to Multibit HD. As before, when I synchronized it messed some transactions and required a wallet repair to get the correct balance. Unfortunately, I did not notice specific tranactions that were missed.

jim618 commented 8 years ago

We've added some extra code into the next version of MultiBit HD so that if there is a transaction that is unconfirmed that is 'old' (between 4 hours and 4 days) it will do a sync from before the unconfirmed tx.

This should help. It'll appear in MBHD v 0.2.0

tl121 commented 8 years ago

Thanks. I'll try it when it comes out.

On 12/16/2015 10:45 AM, Jim Burton wrote:

We've added some extra code into the next version of MultiBit HD so that if there is a transaction that is unconfirmed that is 'old' (between 4 hours and 4 days) it will do a sync from before the unconfirmed tx.

This should help. It'll appear in MBHD v 0.2.0

— Reply to this email directly or view it on GitHub https://github.com/bitcoin-solutions/multibit-hd/issues/750#issuecomment-165150135.

tl121 commented 8 years ago

Problem continues with v. 0.2.0. Last time I had run MultibitHD was in December. Today, I upgraded to the new version, connected my Trezor and started the program. When the program finished synchronizing it showed a December balance, with none of my January or February transactions included. As before, a wallet repair corrected the problem and showed a correct balance and list of transactions. I realize this may be a hard bug to reproduce and locate, but for me it's a killer bug, since a bitcoin wallet that claims to be synchronized and displays a balance that's two months out of date can not be trusted.

gary-rowe commented 8 years ago

Would you mind uploading an error report with comments marked with this issue number (e.g. "Issue 750"). This will provide us with more detail of what is going on in the wallet.

Here are more details on what the error reporting uploads: https://multibit.org/en/help/hd0.2/report-issue.html

tl121 commented 8 years ago

23 days ago I updated the error report.
I have tried multibit HD 0.2.0 with my Trezor several times. (In between, I used Electrum to make transactions.) Once again, today I noticed that my Multibit HD balance was incorrect. Four transactions on several different days that were made using Electrum after the last use of Multibit were missed on a normal synchronization when rerunning Multibit HD. However, there were transactions both before and after in the resynchronization period that were picked up.

This is totally unacceptable. Financial software that misses transactions is inexcusable and dangerous. This is an ongoing problem. I first reported this bug 6 months ago. It is no excuse that the problem is not reproducable, since it is up to your design to make certain that your software (now several versions) runs predictably.

gary-rowe commented 8 years ago

It's probably best that you migrate to use Electrum exclusively in your circumstances. You can do this by using the Tools | Empty wallet facility.

The Bitcoin network has been under a lot of stress recently and as a result various issues resulting from transactions that failed to send or synchronize are being reported.

Your issue has been recorded and will be worked on and, if possible, a fix will be released in a future release.

tl121 commented 8 years ago

I see no reason to believe that others won't have the same issue. In particular, all it takes is to receive payments while the client is not running. There is no need to run a different client. It looks like there is something unreliable with the process of scanning blocks for new use of addresses, e.g. addresses that had previously had some transactions and got others.

It could be something wrong with the SPV code in various nodes, not just multibit-HD. So this is a serious problem.

gary-rowe commented 8 years ago

Agreed, and we are looking into it but be advised that the large part of the SPV code is written and maintained by the Bitcoinj team and we are reluctant to make changes there without careful testing.

slimsteam commented 8 years ago

Hello,

I used the "Repair Wallet" button in the last version of MultiBit HD, it takes no longer than 10 minutes to sinc.

But, when I check Payments, all the transaction status have cross arrows (sync), and not the green ticket on them.

In the mean time, all my balance is unconfirmed Cry

How long it takes for the MultiBit HD client to sync all my received and send payments after I used the Repair Wallet tool ?


http://prntscr.com/bgyajb here is screen with all my pending balance waiting to arrive from the bitcoin network, it was all in my account until I hit the repair button

http://prntscr.com/bgyaxm here is part of the transaction that were sent and received all show sending and receiving and none show green showing as completed

I know I could just enter the correct 18 seed words, but when I wrote them down I put them also into my own code which I have forgotten, so this is not a solution if you tell me to restore the wallet by the keys words, I have not lost access to the wallet or forgot the password.

Is there any I can do, will it eventually correct itself it is showing no sign even through I tried to repair the wallet many times, is there any file I can remove of the history of the blockchain.info leaving the coin spendable inside my wallet.

Let me know if you need anything else to assist you to help me gain access to these coins.