Skip to content

wallet: Give deprecation warning when loading a legacy wallet - #27869

Merged
glozow merged 1 commit into
bitcoin:masterfrom
achow101:deprecation-warning-legacy-wallet
Jul 6, 2023
Merged

glozow merged 1 commit into
bitcoin:masterfrom
achow101:deprecation-warning-legacy-wallet

Conversation

@achow101

Copy link
Copy Markdown
Member

Next step in legacy wallet deprecation.

@DrahtBot

DrahtBot commented Jun 12, 2023 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK jonatack, S3RK
Concept ACK fanquake, glozow, darosior
Stale ACK dimitaracev

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #28027 (test: Fixes and updates to wallet_backwards_compatibility.py for 25.0 and descriptor wallets by achow101)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@dimitaracev

Copy link
Copy Markdown
Contributor

ACK 956d05b

@fanquake

Copy link
Copy Markdown
Member

Concept ACK

1 similar comment
@glozow

glozow commented Jun 13, 2023

Copy link
Copy Markdown
Contributor

Concept ACK

@darosior darosior left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK. How about also logging for wallets that are loaded on startup?

Comment thread src/wallet/wallet.cpp Resolved
@achow101
achow101 force-pushed the deprecation-warning-legacy-wallet branch from 956d05b to 2bf7183 Compare June 13, 2023 16:15
@S3RK

S3RK commented Jun 14, 2023

Copy link
Copy Markdown
Contributor

ACK 2bf7183ea9b42a9edf76bccdf00708341a1d2c0a

@jonatack jonatack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 2bf7183ea9b42a9edf76bccdf00708341a1d2c0a

Indeed, there is no debug log warning yet as suggested in #27869 (review).

Sanity check:

$ ./src/bitcoin-cli -signet listwallets                 
[
  "sqlite3",
  "bdb"
]
$ ./src/bitcoin-cli -signet unloadwallet bdb            
{
}
$ ./src/bitcoin-cli -signet loadwallet bdb            
{
  "name": "bdb",
  "warnings": [
    "Wallet loaded successfully. The legacy wallet type is being deprecated and support for creating and opening legacy wallets will be removed in the future. Legacy wallets can be migrated to a descriptor wallet with migratewallet."
  ]
}

@jonatack jonatack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-ACK 8fbb6e9

modulo #27869 (review)

Tested on the command line and with the GUI

Screenshot 2023-07-05 at 10 40 10

Comment thread src/wallet/wallet.cpp

// Legacy wallets are being deprecated, warn if the loaded wallet is legacy
if (!wallet->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) {
warnings.push_back(_("Wallet loaded successfully. The legacy wallet type is being deprecated and support for creating and opening legacy wallets will be removed in the future. Legacy wallets can be migrated to a descriptor wallet with migratewallet."));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, the similar warning at the end of CreateWallet() could be updated to use this expanded one

@S3RK

S3RK commented Jul 6, 2023

Copy link
Copy Markdown
Contributor

reACK 8fbb6e9

@DrahtBot
DrahtBot removed the request for review from S3RK July 6, 2023 07:03
@glozow
glozow merged commit ecf3baf into bitcoin:master Jul 6, 2023
@bitcoin bitcoin locked and limited conversation to collaborators Dec 5, 2024
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.

8 participants