Bitcoin Forum
January 17, 2022, 08:37:29 PM *
News: Latest Bitcoin Core release: 22.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin core - transaction bug and related balance error  (Read 144 times)
sexjam
Jr. Member
*
Offline Offline

Activity: 41
Merit: 1


View Profile
November 08, 2021, 07:18:35 AM
Merited by ETFbitcoin (1)
 #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?
1642451849
Hero Member
*
Offline Offline

Posts: 1642451849

View Profile Personal Message (Offline)

Ignore
1642451849
Reply with quote  #2

1642451849
Report to moderator
1642451849
Hero Member
*
Offline Offline

Posts: 1642451849

View Profile Personal Message (Offline)

Ignore
1642451849
Reply with quote  #2

1642451849
Report to moderator
1642451849
Hero Member
*
Offline Offline

Posts: 1642451849

View Profile Personal Message (Offline)

Ignore
1642451849
Reply with quote  #2

1642451849
Report to moderator
The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1642451849
Hero Member
*
Offline Offline

Posts: 1642451849

View Profile Personal Message (Offline)

Ignore
1642451849
Reply with quote  #2

1642451849
Report to moderator
NeuroticFish
Legendary
*
Offline Offline

Activity: 2828
Merit: 3468


Powerful promotion strategy https://bit.ly/3cRVjFi


View Profile
November 08, 2021, 08:43:33 AM
Merited by Pmalek (2)
 #2

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)

nc50lc
Legendary
*
Offline Offline

Activity: 1568
Merit: 2645


Self-proclaimed Genius ㊙️


View Profile
November 08, 2021, 10:12:53 AM
 #3

-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

mocacinno
Legendary
*
Offline Offline

Activity: 2562
Merit: 3717


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
November 08, 2021, 10:21:37 AM
 #4

--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".

ETFbitcoin
Legendary
*
Offline Offline

Activity: 2114
Merit: 3595


NotYourKeys.org - Not Your Keys, Not Your Bitcoin


View Profile
November 08, 2021, 11:17:24 AM
 #5

Have you tried running this command rescanblockchain? Most likely some transaction isn't shown because the wallet.dat wasn't loaded when Bitcoin Core perform synchronization. If you're not sure how to do it, here's how you execute the command
1. Open Bitcoin Core.
2. Select "Window".
3. Select "Console", new window should be opened.
4. Type "rescanblockchain" on the input text field.

DaveF
Legendary
*
Online Online

Activity: 2632
Merit: 2926


I DO NOT TRADE on Telegram or Skype or Discord.


View Profile WWW
November 08, 2021, 11:27:11 AM
 #6

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


LoyceV
Legendary
*
Offline Offline

Activity: 2464
Merit: 9957


Thick-Skinned Gang Leader


View Profile WWW
November 08, 2021, 11:36:43 AM
Last edit: November 09, 2021, 09:20:48 AM by LoyceV
 #7

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.

DaveF
Legendary
*
Online Online

Activity: 2632
Merit: 2926


I DO NOT TRADE on Telegram or Skype or Discord.


View Profile WWW
November 08, 2021, 12:13:37 PM
 #8

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://bitcointalk.org/index.php?topic=4959742.0

-Dave

ETFbitcoin
Legendary
*
Offline Offline

Activity: 2114
Merit: 3595


NotYourKeys.org - Not Your Keys, Not Your Bitcoin


View Profile
November 09, 2021, 09:14:10 AM
 #9

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.

We don't know whether OP actually use "Bitcoin Core" (starting from version 0.9.0) or "Bitcoin Qt" (which could refer to Bitcoin Qt 0.8.6/lower or the GUI application). But Bitcoin Qt 0.8.0 and newer still can sync to network, so there's no major problem if OP use Bitcoin Core, although he missed faster sync time.

sexjam
Jr. Member
*
Offline Offline

Activity: 41
Merit: 1


View Profile
November 09, 2021, 06:15:01 PM
 #10

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.
nc50lc
Legendary
*
Offline Offline

Activity: 1568
Merit: 2645


Self-proclaimed Genius ㊙️


View Profile
November 10, 2021, 02:41:37 AM
 #11

-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.

ETFbitcoin
Legendary
*
Offline Offline

Activity: 2114
Merit: 3595


NotYourKeys.org - Not Your Keys, Not Your Bitcoin


View Profile
November 10, 2021, 11:36:22 AM
 #12

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.

sexjam
Jr. Member
*
Offline Offline

Activity: 41
Merit: 1


View Profile
November 15, 2021, 07:17:58 AM
 #13

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

nc50lc
Legendary
*
Offline Offline

Activity: 1568
Merit: 2645


Self-proclaimed Genius ㊙️


View Profile
November 15, 2021, 12:22:00 PM
 #14

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

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!