Author

Topic: Bitcoin core - transaction bug and related balance error (Read 196 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
3. Blockchain scan is complete

By "scan", do you actually mean "sync"?

-snip-
I'm going to try a rescan now and see if everything works out.
Let's just hope that your blockchain isn't pruned or it'll re-download the whole blockchain if you do that.

I doubt it. If OP use pruned mode, he'll get warning that Bitcoin Core will redownload whole blockchain when he resumed load his old wallet.dat.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
Now the balance result is correct, and only the dates on the last transaction do not match.
-snip-
Maybe it has something to do with the first or other logics of "Smart Timestamps":
github.com/bitcoin/bitcoin/blob/master/src/wallet/wallet.cpp#L2380-L2396

If not, it could be related to the "wrong timestamp" bug when using -rescan:
github.com/bitcoin/bitcoin/issues/6662
jr. member
Activity: 41
Merit: 1
Sorry for the long time, the rescan took a few days.
Now the balance result is correct, and only the dates on the last transaction do not match.
On bitcoin-qt it is the one of a few days ago, while on the blockchain there is (obviously) the correct one.

In my opinion what happened is this: the software skipped (I don't know why) the last 2 transactions giving me a wrong balance.

This is the hash of the last transaction that show the empty wallet
c637fc1382a5bf8350bd6422b389d5361daca72a6575bf278e4a563a988fc290

legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
-snip-
I'm going to try a rescan now and see if everything works out.
Let's just hope that your blockchain isn't pruned or it'll re-download the whole blockchain if you do that.

If it's pruned, it's easier to confirm that it's empty if the transactions listed in the transactions tab are the same spent inbound txns you can see in blockexplorers,
Transaction ID:
  • 7292f7ac67361256af58cf96258154232ee2180bb48c5d3053b85ba740cb229f
  • 66ceb535fdd694c6ab1c6c30e03f30610ca1fc98e5d1ae49b67ed5e68bdf8520
  • ed5ea04d9f862e361f98f85969a6e0a925cacb8ca68f1404e5fb1a141e2e4281
  • 0386cf6e0948d282f84915aac0262e794bfd000ce4f85b9db3ce15bc0c484982
  • ddd35c0b004f4037b798538afbdeca8ae9810557e9c7b11c38b3d3162c8bfb32
  • fcef0e378aae9b88c7860f59490a88a2a988f948604a1e772fce1ce505a87895
  • cc3265df3186206de6f4638d0e902f33e94f7dd75a79a803a1bf63ce3988207f

Otherwise, continue.
jr. member
Activity: 41
Merit: 1
I really appreciate your responses.

1. The version of bitcoin-qt is the latest 22.00.
2. I have backed up the wallet.dat
3. Blockchain scan is complete
4. On any block explorer (such as blockchair.com) the transactions are correct. The wallet MUST have 0 btc.
5. Only incoming transactions are displayed on bitcoin-qt. So the balance is positive, but it should be 0.
6. I tried to send a transaction, but it never gets sent on the bitcoin network.

The address to check is this one: 13Sfy3ucX8yCJkLQeALohX3K3PhtJhdCZL

I'm going to try a rescan now and see if everything works out.
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
Yes, what LoyceV said.

Also forgot to ask, did download and run the newer version of bitcioncore?

The older versions will not fully sync anymore, so if you just found an old computer with your wallet from 201X and turned it on and started to download the blockchain it's never going to sync.

And also take a look at LoyceV's topic here: https://bitcointalksearch.org/topic/overview-recover-bitcoin-from-any-old-storage-format-4959742

-Dave
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
Or the wallet.dat is not from bitcoin but rather an alt.
~
sexjam did you look at a block explorer like NeuroticFish suggested?
To check: enter the txid in Blockchair.com's Search field, not an address.
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
Or the wallet.dat is not from bitcoin but rather an alt.
The OP has not posted here since Aug 2015, if it's from then it's possible that is was from one the altcoins that were popping up all over the place.
sexjam did you look at a block explorer like NeuroticFish suggested?

-Dave

legendary
Activity: 3514
Merit: 5123
https://merel.mobi => buy facemasks with BTC/LTC
--snip--
 or your node isn't synced yet.
--snip--

If i had to guess, i'd say the odds are pretty big that this is the explanation...

@OP: is your wallet synced? You're using the QT gui, IIRC, while it's syncing it would show a green bar at the bottom that tells you how much time you're "behind".
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
-snip-
Does anyone think it is possible to inform some of the developers to let them know this bug?
Bugs can be reported as "issue" in bitcoin's repository in Github: https://github.com/bitcoin/bitcoin/issues.
However, take your time to check if it's really a bug or just an isolated case, eg.: wallet.dat not scanned properly.

Are all those transactions labeled with a "check icon" in the 'transactions' tab?
Because any other icon beside that could mean that those are not a valid transaction or your node isn't synced yet.

It doesn't even fit into the mempool.
What error did you get?

What error are you getting if you try to re-broadcast it?
To re-broadcast a transaction: Go to 'transactions' tab, right-click on your "pending" transaction, click "Copy raw transaction".
Then go to 'Console' (Window->Console); type sendrawtransaction followed by the 'raw transaction' that you've copied.
eg.: sendrawtransaction 00000000123456....................................654321
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
Well, when I try to spend my balance, of course, it remains pending and is never mined in the blockchain.
It doesn't even fit into the mempool.

1. I hope that you made a backup of that wallet.dat
2. You should check on a block explorer (blockchair.com, mempool.space) if your addresses indeed have funds
3. If you have a very big number of small inputs then it can happen that your transaction gets too big (and expensive too). In that case you have to pick a smaller number of inputs and make multiple transactions.
4. If this doesn't work even with small number of inputs, you may need re-sync or (faster) import the relevant keys into Electrum and try from there. (Get Electrum only from electrum.org and verify it)
jr. member
Activity: 41
Merit: 1
I have found an old wallet.dat and I resumed it. I was convinced that there was several incoming transactions and  only one outgoing transaction in this wallet.dat.
But the bitcoin-qt shows only the incoming transactions, and all the balance is available.

Well, when I try to spend my balance, of course, it remains pending and is never mined in the blockchain.
It doesn't even fit into the mempool.

Does anyone think it is possible to inform some of the developers to let them know this bug?
Jump to: