Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet does not recognize its own change address #411

Closed
pinheadmz opened this issue Mar 30, 2020 · 2 comments
Closed

Wallet does not recognize its own change address #411

pinheadmz opened this issue Mar 30, 2020 · 2 comments
Labels
bug general - Something isn't working

Comments

@pinheadmz
Copy link
Member

pinheadmz commented Mar 30, 2020

There have been at least two separate reports of this bug, and I've heard that it may have happened to the Purse bcoin wallet at least once in the past. It's very difficult to diagnose or reproduce but what seems to happen is this:

  • The wallet sends a transaction and sends the change output to the next address in the BIP44 change path.
  • When this transaction is added to the wallet, the change address is not recognized as being owned by the wallet, and has no path information.
  • The wallet may continue to use the "ghost" address for change and does not increment the change address index of the wallet account

Additional related behavior: the wallet does not know its own private key for the address:

$ hsw-cli change --account=default
{... "address": address...}

$ hsw-cli key <address>
null

Even though the wallet may provide the change address again

Workaround: Your coins are not lost, but so far the only way we have been able to recover a wallet in this state is to import the seed into a new wallet and rescan:

$ hsw-cli mkwallet --id=recovery --mnemonic="abandon abandon abandon ..."
$ hsw-cli --id=recovery rescan
@pinheadmz pinheadmz added bug general - Something isn't working wallet labels Mar 30, 2020
@pinheadmz
Copy link
Member Author

pinheadmz commented Mar 30, 2020

This issue may persist on a wallet restored by mnemonic. This user had large gaps in their receive addresses and so I instructed them to manually regenerate addresses until the appropriate index had been reached and rescan again:

I recovered the wallet, and use generate receiving and change address, and they are same with the original wallet, which contains only 54 received addresses and 26 changed addresses, and the 15, 18, 26 index’s key is lost

This user started on v2.0.2 when they encountered the bug, then upgraded to v2.1.3 after trying the restore.

@pinheadmz
Copy link
Member Author

pinheadmz commented Jan 27, 2021

Closed by #415

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug general - Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant