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

The new 2.2.0 version breaks the wallet.dat #201

Closed
cdarken opened this issue Mar 27, 2020 · 16 comments
Closed

The new 2.2.0 version breaks the wallet.dat #201

cdarken opened this issue Mar 27, 2020 · 16 comments

Comments

@cdarken
Copy link

cdarken commented Mar 27, 2020

Describe the issue

Version 2.2.0 broke my wallet. The mining address changed and it also altered my seed phrase.
The balance seems to be correct in the wallet, but if I look for the new address in the explorer it can't be found.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. recover wallet
  2. create the mining account (the address is the same with the one from version 2.1.0.24 but the balance is zero)
  3. rescan the wallet. this has the result that the balance appears but the mining address and the seed change
@mjmacleod
Copy link
Member

In what way does the seed 'change' - are the words actually different or are you talking about it having a number at the end?

@cdarken
Copy link
Author

cdarken commented Mar 27, 2020

Yes, it has a number appended at the end.

@mjmacleod
Copy link
Member

Okay, this is actually a new feature the number at the end uses a special compact encoding to encode a birthdate that when present enables faster recovery in future.
It doesn't impact the recovery phrase in any way, and won't cause any issues.

I'm not sure why you have a new mining address, as that shouldn't happen and doesn't happen on a test wallet here - do you not maybe have more than one mining account and they are getting confused?

The new address would not appear on the explorer as you haven't mined into it yet, the explorer cannot know about unused addresses only used ones.

@cdarken
Copy link
Author

cdarken commented Mar 27, 2020

It's the same account but the address changes after rescan, as I said. Should I try to recover the wallet with the appended number?

@mjmacleod
Copy link
Member

I can now reproduce the address change (it happens only on a wallet upgrade)

Note this isn't harmful in any way, other than being annoying in terms of the address being different - if you want the original address recovering with the appended number will probably put you in a state where you are back on it.

@cdarken
Copy link
Author

cdarken commented Mar 27, 2020

I recovered from the modified seed. But the wallet still needs rescan as the balance is initially zero. After rescan it changes again. But if it's not an issue, that's ok.

@mjmacleod
Copy link
Member

Okay the change is a bit weird, as it shouldn't do that, but it shouldn't be an issue either (other than messing up your statistics if you wanted all mining to be on one address)

If you are concerned you can just do validateaddress address in debug console to ensure it is part of your wallet.
I'll look into fixing this, as it is a bug, but its not serious in any way really.

@mjmacleod
Copy link
Member

Just to confirm you are on 2.2.0.2, and what platform?

@cdarken
Copy link
Author

cdarken commented Mar 27, 2020

Yes, 2.2.0.2, Arch Linux.
And the address is indeed valid.

mjmacleod added a commit that referenced this issue Mar 28, 2020
Mining address should never change for a mining accounts.
Fixes #201
@mjmacleod
Copy link
Member

Changing of address will be fixed in 2.2.0.3 build

@cdarken
Copy link
Author

cdarken commented Mar 29, 2020

There's something else strange with v2.2.0.2. I generated a fresh wallet. I started mining on a new account. Today I found a block. But the transaction shows another address that received the reward.
This is the transaction id: e2c0e38586b0ce1035e9c1e8ab8839c3a0a80c84817fb0d5ee6397fe49f796c3
The address that's shown in the wallet interface is GeM8ENsgCgyJTzAhZf8UEYVspwdGRaasuz.
So maybe you could check if your patch fix this issue too.

@mjmacleod
Copy link
Member

Does validateaddress indicate that the address belongs to your mining account?
If so its likely already fixed, just upgrade to 2.2.0.3

@cdarken
Copy link
Author

cdarken commented Mar 30, 2020

So how would the fix work? It will use the displayed address to generate the transactions? Because I installed the new version, I rescanned the transactions and I still see GeM8ENsgCgyJTzAhZf8UEYVspwdGRaasuz.

@mjmacleod
Copy link
Member

mjmacleod commented Mar 30, 2020

If you recover from phrase on 2.2.0.3 it will put you back in a state where the mining account only ever uses the first address in it, and the address never changes. (but likely will be different from the address you see now)

If you continue to use a wallet file that is already 'affected' in 2.2.0.3 then it will 'settle' on the last generated address and use that from now on, this should be the same address thats shown in the UI.

You can test this by calling getnewaddress "MyMiningAccount" and it should return always the same address not a new one each time.

@cdarken
Copy link
Author

cdarken commented Mar 30, 2020

Ok, thanks for the explanation.

@mjmacleod
Copy link
Member

With 2.2.0.5 release wallet should now be 'repaired' such that you automatically land back on your original address

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants