Skip to content

wallet: Drop support to serialize OldKey - #16494

Closed
promag wants to merge 2 commits into
bitcoin:masterfrom
promag:2019-07-drop-oldkey-serialize
Closed

promag wants to merge 2 commits into
bitcoin:masterfrom
promag:2019-07-drop-oldkey-serialize

Conversation

@promag

@promag promag commented Jul 30, 2019

Copy link
Copy Markdown
Contributor

Follow up #16475, removes support to serialize OldKey. Attempting to serialize OldKey results in compilation error.

@jnewbery

Copy link
Copy Markdown
Contributor

concept ACK

What are your thoughts about moving OldKey to walletdb.h now that it's only used for deserialization? (there's precedence - CHDChain and CKeyMetadata are defined in that file)

@laanwj laanwj added the Wallet label Jul 30, 2019
@promag

promag commented Jul 30, 2019

Copy link
Copy Markdown
Contributor Author

@jnewbery done, it could be moved to walletdb.cpp if you prefer.

@jnewbery

Copy link
Copy Markdown
Contributor

utACK d7855d0

it could be moved to walletdb.cpp if you prefer.

Yes, it probably makes more sense in walletdb.cpp since it's not used outside of walletdb.

@jonasschnelli

Copy link
Copy Markdown
Contributor

Nice cleanup.
I kinda dislike the name "OldKey" (I should have raised that concern in #16475 though). The term "Old" in software-code, is a very much dynamic and should IMO be avoided. It's unclear to the reader what "Old" means and what an "old wallet" exactly is. Ideally we would have a bit more information like since what version we stopped writing such keys, etc.

utACK d7855d0

@maflcko

maflcko commented Jul 30, 2019

Copy link
Copy Markdown
Member

I think this has been added in 0.2.2 or 0.3.1, but never used substantially? So I am not sure when it got removed.

53d5080

2939cab

@achow101

Copy link
Copy Markdown
Member

AFAICT, we never had any code that wrote a wkey record ever. So I think this can be removed entirely.

@sipa

sipa commented Jul 30, 2019

Copy link
Copy Markdown
Member

Seems indeed that read support for "wkey" was added in 0.2.2, but never any code that writes it.

@jnewbery

Copy link
Copy Markdown
Contributor

I can't find anywhere in the git history where this was written. Agree that we can remove this entirely.

If Satoshi still has some keys saved as wkeys in an old wallet.dat file, they can be opened with v0.18 or earlier.

@promag

promag commented Jul 30, 2019

Copy link
Copy Markdown
Contributor Author

Replaced by #16502.

@promag promag closed this Jul 30, 2019
@promag
promag deleted the 2019-07-drop-oldkey-serialize branch July 30, 2019 21:54
fanquake added a commit that referenced this pull request Aug 1, 2019
0b1f4b3 wallet: Drop unused OldKey (João Barbosa)

Pull request description:

  Replaces #16494, `OldKey` (previously `CWalletKey`) was never serialized in the code history which means that unserialization support is not required, so remove the code entirely.

ACKs for top commit:
  jnewbery:
    ACK 0b1f4b3
  laanwj:
    ACK 0b1f4b3
  fanquake:
    ACK 0b1f4b3

Tree-SHA512: 92e9b2d6fc41f2765492d5d69d18fc4302c40ab44f28c8c30ca652c72767fbc484848c51a38ecf1f447849767a583c398784408bb5f64f9c86f9a5872b325ffc
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants