Bitcoin Forum
May 07, 2024, 04:06:25 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Finding out which wallet addresses have a non-zero balance  (Read 3344 times)
jon_smark (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
June 26, 2013, 08:34:45 PM
 #1

I'm unable to start bitcoind/bitcoin-qt after the latest upgrade of the Ubuntu PPA.  However, I've got a backed-up wallet.dat, and using the pywallet utility I also have a list of addresses and private keys.  I think the best solution right now is to create a new wallet and to import into it the one address which does have an associated balance (I know there is only one).  However, I don't know which address it is!  Is there a way to find out the balance associated with each address without having to manually check them on the Block Explorer?  (And yes, I could write a small programme to automate this process, but it seems I would be reinventing the wheel and abusing the Block Explorer service).
1715097985
Hero Member
*
Offline Offline

Posts: 1715097985

View Profile Personal Message (Offline)

Ignore
1715097985
Reply with quote  #2

1715097985
Report to moderator
The network tries to produce one block per 10 minutes. It does this by automatically adjusting how difficult it is to produce blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1233


May Bitcoin be touched by his Noodly Appendage


View Profile
June 26, 2013, 09:34:23 PM
 #2

1. pywallet does this with the '--dumpwithbalance' flag (takes ~2 min / 100 addresses, of course depending on your connection)
2. why don't you just import the wallet.dat in another bitcoin-qt installation?

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
PaperClip
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
June 26, 2013, 09:41:45 PM
 #3

You do not need to do all this.
When you have backup of wallet.dat - you can just put it into bitcoin-qt corresponding folder (after you will manage to get it to work again).
Or else, you can create online wallet and import your wallet.dat backup there https://blockchain.info/wallet/import-wallet

But, if all you want is just know balance -
1) create new wallet using pywallet
2) import all addresses and private kyes
3) open this wallet using bitcoin-qt
4) goto help-debug window-console (this is on Windows, but I suppose on Linux it is the same)
5) write command getreceivedbyaddress XXXXXXXXXXXXXXXX(insert address here)
If address is not in your wallet - you will not be able to see balance on it
jon_smark (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
June 27, 2013, 09:53:06 AM
 #4

1. pywallet does this with the '--dumpwithbalance' flag (takes ~2 min / 100 addresses, of course depending on your connection)

Which version of pywallet does this?  I got mine from Github yesterday, and it does not have this option!

2. why don't you just import the wallet.dat in another bitcoin-qt installation?

Because frankly, the mess with Bitcoin in Ubuntu is such (because of the differing libdb versions) that a different installation will crash on start up if I give it my wallet backup.  I've tried.
jon_smark (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
June 27, 2013, 10:00:17 AM
 #5

You do not need to do all this.
When you have backup of wallet.dat - you can just put it into bitcoin-qt corresponding folder (after you will manage to get it to work again).
Or else, you can create online wallet and import your wallet.dat backup there https://blockchain.info/wallet/import-wallet

I appreciate the reply, but did you read my question carefully?  The problem is that after the upgrade, Bitcoin-qt will crash on start up if I give it my wallet backup!  This is of course because of the differing libdb versions problem which has plagued Bitcoin-qt on Ubuntu for a while now.

However, importing the wallet into an online provider is a good option.  I'll keep that in mind.

But, if all you want is just know balance -
1) create new wallet using pywallet
2) import all addresses and private kyes
3) open this wallet using bitcoin-qt
4) goto help-debug window-console (this is on Windows, but I suppose on Linux it is the same)
5) write command getreceivedbyaddress XXXXXXXXXXXXXXXX(insert address here)
If address is not in your wallet - you will not be able to see balance on it

So basically I have to create a small script anyway to automate this process.  Which is what I why trying to avoid...
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1233


May Bitcoin be touched by his Noodly Appendage


View Profile
June 27, 2013, 10:14:36 AM
 #6

1. pywallet does this with the '--dumpwithbalance' flag (takes ~2 min / 100 addresses, of course depending on your connection)

Which version of pywallet does this?  I got mine from Github yesterday, and it does not have this option!
All versions since long ago.
It does have this option, I just checked. Please check with 'python pywallet.py --help'

2. why don't you just import the wallet.dat in another bitcoin-qt installation?

Because frankly, the mess with Bitcoin in Ubuntu is such (because of the differing libdb versions) that a different installation will crash on start up if I give it my wallet backup.  I've tried.
Ok I get it, I didn't read the 'backed-up wallet' part

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
jon_smark (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
June 27, 2013, 11:22:22 AM
 #7

By the way, in the meantime I've managed to solve my problem.  Here's how:

  • Used "pywallet --dumpwallet" on my backed-up wallet to get a list of private keys.
  • Deleted the wallet and started Bitcoin-qt.  This created a fresh wallet.
  • Wrote a shell script to iterate through all the old private keys and import them using "bitcoind importprivkey account rescan=false"
  • Restarted Bitcoin-qt with rescan option

Step 3 was key: initially I tried importing also using pywallet.  However, Bitcoin-qt was then unable to read the wallet.  The solution was to use bitcoind itself to import the private keys!
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1233


May Bitcoin be touched by his Noodly Appendage


View Profile
June 27, 2013, 12:05:00 PM
 #8

initially I tried importing also using pywallet.  However, Bitcoin-qt was then unable to read the wallet.  The solution was to use bitcoind itself to import the private keys!
Really? Was it encrypted? If so, did you put the passphrase in pywallet?

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
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!