Full rescan for wallets re-created from seeds (with address discovery)
I can't find a way to do a full rescan of a wallet re-created from a seed which has already been used before. Since the wallet, when first created, has no "addresses", the initial scan doesn't seem to do anything.
I'm looking for the sort of process described in BIP44: https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account-discovery
Is there a way to do this? The only workaround I've found is to create a bunch of "new" addresses, until the new addresses stop having been used according to blockchain.info, and then dropping the transaction history and doing a full rescan as described in: https://github.com/btcsuite/btcwallet/blob/master/docs/force_rescans.md
Hi,
This is not yet implemented in btcwallet, but it is in dcrwallet which is a btcwallet fork. So the work is basically done and just needs to be ported, but it requires other parts in btcd/dcrd as well. It makes use of an "address used" index in the consensus daemon, and an RPC to query it. Without this, it would be too expensive to determine whether an address appears in the blockchain without querying an external service. We want to avoid external services however, because of the privacy risks.
As a workaround if you know how many addresses need to be recovered you can generate those manually and then begin the rescan. For btcwallet, the way to do that currently is to use the dropwtxmgr tool to remove the transaction history, so it will force a rescan next startup.
I also have this problem, which is IMHO totally essential. I do not know any of thousands addresses related to my seed and balance shows 0. In my opinion you should warning wallet users that their Bitcoin is going to a dark hole.
OK, I was able to recover finally my satoshi. This command might be of use if someone has similar problems - I assumed that I don't have more than 2000 adresses in the wallet:
for i in `seq 2000`; do bitcoin-cli -rpcport=8332 getnewaddress "default"; done
In my opinion you should warning wallet users that their Bitcoin is going to a dark hole.
This is impossible to know. The sending wallet has no knowledge of whether the recipient is able to control the output.
for i inseq 2000; do bitcoin-cli -rpcport=8332 getnewaddress "default"; done
This works but will cause unintended consequences during future seed restores if the above mentioned changes from dcrwallet are ever backported. Any new addresses created by this wallet could create gaps in used addresses larger than the default BIP0044 gap limit and cause the wallet to not create all addresses on restore.