Bitcoin Forum
May 09, 2024, 05:43:22 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Weird bug in bitcoin core qt for some people, is there a command to remedy?  (Read 150 times)
Joe-Bloggs (OP)
Member
**
Offline Offline

Activity: 103
Merit: 18


View Profile
March 30, 2024, 08:58:14 PM
Last edit: March 31, 2024, 10:49:00 AM by Joe-Bloggs
 #1

Can anyone tell me the command to see all addresses in my wallet that have received coins.

Listreceivedbyaddress 0 true does not work. It does not show addresses I know that have funds on because the overview shows those addresses receiving coins and the total balance.

The QT overview shows the correct balance. But now I've restored from an older wallet.dat. All receive addresses I made after this backup seem hidden or just vanished. This is very strange and a bit worrying.

Is there a command that just shows every address with coins on inside your wallet.dat?

Edit 2/ after lots of googling I find this is a known issue or bug.


https://github.com/bitcoin/bitcoin/issues/20293

https://bitcoin.stackexchange.com/questions/88434/listreceivedbyaddress-missing-transactions-after-restore

So although listreceivedbyaddress does not show these addresses have received coins because of some label issue
Does it matter? I mean the wallet.dat seemingly does not acknowledge these addresses at all or has no label for them but can still spend from them?


Edit/ it seems if you make a new wallet.dat make 1 recieve address send bitcoin to this address.
Then make multiple copies of that wallet.dat as backups.

Now if you make more receive addresses and send coins to them after a time and your machine breaks.

When you go to your backup wallet.dat and reload into a new qt wallet.
Those new recieve addresses that have recieved coins. Will never appear.
Like if you keep clicking generate new receive address it will skip past those that have recieved coins.
If you type type listreceivedbyaddress 0 true or listreceivedbyaddress  1 true
It will never show those addresses? However it will show the original receive address and the initial coins you sent to it.

This is very strange? It worries me I can not seem to make the qt demonstrate I still control those addresses.
Its like they just never existed. Although you can see the tx shown on the overview page of the qt ?


https://bitcoin.stackexchange.com/questions/88434/listreceivedbyaddress-missing-transactions-after-restore

Edit3/

Okay so eventually I solved this and I will relay what I found here for others just because it may happen to you.

When you restore from and older wallet.dat file sometimes all the new received addresses you have generated on your more updated wallet.dat are for some reason now labelled as change addresses so are kind of invisible to a novice user.

This causes some strange things to happen.

Listreceivedbyaddress 0 true will not show these addresses

When you generate new receiving addresses these addresses even if unused will never show up so it seems that it is making different addresses in a different order to a more recently used wallet.dat. Depending on how many new received addresses you made on the more recently used wallet.dat before then resorting to restoring from an old wallet.dat you may need to create lots of new addresses before you see them creating the same exact addresses on both machines.

To see them and check you still have these addresses under your control in this wallet.dat
You can simply click on coin control and then under the send tab click on inputs

This will then show you all of your addresses and all of the coins on those addresses.
So now you can relax. The coins are still inside that wallet.dat and you can spend them.

I am not sure why this happens but maybe it is not a bug it is just a bit confusing to a novice.
1 moment these were receiving addresses you could see and next moment these are invisible change addresses.
But no matter you still have control of the coins.

1 slight issue may be if you wanted to dump priv keys and you forgot about the change addresses.
So coin control can be used to check.


1715276602
Hero Member
*
Offline Offline

Posts: 1715276602

View Profile Personal Message (Offline)

Ignore
1715276602
Reply with quote  #2

1715276602
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715276602
Hero Member
*
Offline Offline

Posts: 1715276602

View Profile Personal Message (Offline)

Ignore
1715276602
Reply with quote  #2

1715276602
Report to moderator
1715276602
Hero Member
*
Offline Offline

Posts: 1715276602

View Profile Personal Message (Offline)

Ignore
1715276602
Reply with quote  #2

1715276602
Report to moderator
1715276602
Hero Member
*
Offline Offline

Posts: 1715276602

View Profile Personal Message (Offline)

Ignore
1715276602
Reply with quote  #2

1715276602
Report to moderator
Yamane_Keto
Sr. Member
****
Offline Offline

Activity: 476
Merit: 486



View Profile WWW
March 31, 2024, 02:59:05 PM
 #2

When you restore from and older wallet.dat file sometimes all the new received addresses you have generated on your more updated wallet.dat are for some reason now labelled as change addresses so are kind of invisible to a novice user.
By design, the wallet believes that payment addresses are actual change, but they are not fixed so that each transaction does not appear multiple times.

You can solve this problem by deleting this line https://github.com/bitcoin/bitcoin/blob/d0f81a96d9c158a9226dc946bdd61d48c4d42959/src/wallet/wallet.cpp#L1756

Code:
if (pwallet->IsChange(txout))

and recompile

You can see discussions on this topic here https://github.com/bitcoin/bitcoin/issues/16160

.BEST.CHANGE..███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6732


bitcoincleanup.com / bitmixlist.org


View Profile WWW
April 01, 2024, 04:27:17 AM
 #3

1 slight issue may be if you wanted to dump priv keys and you forgot about the change addresses.
So coin control can be used to check.

The thing is, you can only try this troubleshooting method on legacy wallets, as descriptor wallets don't support dumping yet.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Joe-Bloggs (OP)
Member
**
Offline Offline

Activity: 103
Merit: 18


View Profile
April 01, 2024, 05:41:31 PM
 #4

When you restore from and older wallet.dat file sometimes all the new received addresses you have generated on your more updated wallet.dat are for some reason now labelled as change addresses so are kind of invisible to a novice user.
By design, the wallet believes that payment addresses are actual change, but they are not fixed so that each transaction does not appear multiple times.

You can solve this problem by deleting this line https://github.com/bitcoin/bitcoin/blob/d0f81a96d9c158a9226dc946bdd61d48c4d42959/src/wallet/wallet.cpp#L1756

Code:
if (pwallet->IsChange(txout))

and recompile

You can see discussions on this topic here https://github.com/bitcoin/bitcoin/issues/16160

Thanks for this information. It is a bit advanced for me but I'm certain other people here can do this.

Thanks NotaTether I think this is important to know.
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5593


Self-proclaimed Genius


View Profile
April 04, 2024, 01:03:12 PM
 #5

I don't know why those old issue were brought-up since those are already closed due to being solved by an old PR.
Perhaps OP is still using an old Bitcoin Core version?

For what it's worth, the issues linked in this topic should've been solved by this PR that was merged in Dec 2021,
because it's now utilizing the "internal" flag on top of the simple marking logic.
Link: wallet: Automatically add receiving destinations to the address book #22929
Refer to #2 use-case.

If it happened in the latest version, this is worth reporting in GitHub, only if you can show a way to reproduce the issue.
(I can't using the provided steps above)

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
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!