Skip to content

wallet: Add a deprecation warning for newly created legacy wallets - #24505

Merged
maflcko merged 1 commit into
bitcoin:masterfrom
achow101:deprecate-warning-new-legacy-wallets
Mar 14, 2022
Merged

maflcko merged 1 commit into
bitcoin:masterfrom
achow101:deprecate-warning-new-legacy-wallets

Conversation

@achow101

@achow101 achow101 commented Mar 8, 2022

Copy link
Copy Markdown
Member

As we slowly deprecate legacy wallets, we need to warn users that are making new legacy wallets that their wallet type is going to be unsupported in the future.

@fanquake fanquake added the Wallet label Mar 8, 2022
@theStack

theStack commented Mar 8, 2022

Copy link
Copy Markdown
Contributor

Concept ACK

@fanquake fanquake added this to the 24.0 milestone Mar 8, 2022
@gruve-p

gruve-p commented Mar 8, 2022

Copy link
Copy Markdown
Contributor

ACK 6c629fe

@luke-jr

luke-jr commented Mar 8, 2022

Copy link
Copy Markdown
Contributor

Concept NACK on removal. Users shouldn't be forced to upgrade their wallets (especially not on such a short timeline).

@promag

promag commented Mar 8, 2022

Copy link
Copy Markdown
Contributor

Concept ACK

@luke-jr this just adds the warning when a wallet is created, nothing is removed nor an upgrade is enforced. When do you think the warning is okay?

@luke-jr

luke-jr commented Mar 8, 2022

Copy link
Copy Markdown
Contributor

The warning text says it will be removed. And if the user has to explicitly choose to create it, I don't see why a warning is really needed at all.

@laanwj

laanwj commented Mar 9, 2022

Copy link
Copy Markdown
Member

Concept ACK on discouraging creating new legacy wallets. Agree that the code to support them shouldn't be removed any time soon, but that kind of policy discussion is out of scope here.

@S3RK

S3RK commented Mar 10, 2022

Copy link
Copy Markdown
Contributor

ACK 6c629fe292bbb14d65455158fa38e869bdb17921

@maflcko

maflcko commented Mar 10, 2022

Copy link
Copy Markdown
Member

Wouldn't it be better to update the RPC doc instead? This way the user will see the warning before creating the wallet.

            {"descriptors", RPCArg::Type::BOOL, RPCArg::Default{true}, "Create a native descriptor wallet. The wallet will use descriptors internally to handle address creation"},

@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.

I agree with @MarcoFalke that the RPC help would need to be updated, either first or at the same time, per the principle of least surprise to the user.

Comment thread src/wallet/wallet.cpp Resolved
@achow101
achow101 force-pushed the deprecate-warning-new-legacy-wallets branch from 6c629fe to 8118304 Compare March 10, 2022 10:49
@achow101

Copy link
Copy Markdown
Member Author

Added a warning to the RPC help.

Comment thread src/wallet/rpc/wallet.cpp Resolved
Comment thread src/wallet/wallet.cpp Resolved
@achow101
achow101 force-pushed the deprecate-warning-new-legacy-wallets branch from 8118304 to 6115218 Compare March 10, 2022 12:33
@jonatack

Copy link
Copy Markdown
Member

ACK 6115218

Tested the help and the test with logging the result

₿ test/functional/wallet_createwallet.py
...
2022-03-10T13:00:33.383000Z TestFramework (INFO): Test legacy wallet deprecation
2022-03-10T13:00:33.485000Z TestFramework (INFO): {'name': 'legacy_w0', 'warning': 'Wallet created successfully. The legacy wallet type is being deprecated and support for creating and opening legacy wallets will be removed in the future.'}
₿ ./src/bitcoin-cli help createwallet

6. descriptors             (boolean, optional, default=true) Create a native descriptor wallet. The wallet will use descriptors internally to handle address creation. Setting to "false" will create a legacy wallet; however, the legacy wallet type is being deprecated and support for creating and opening legacy wallets will be removed in the future.

@theStack theStack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK 6115218

$ ./src/bitcoin-cli -regtest -named createwallet wallet_name=wallet_native descriptors=false
{
  "name": "wallet_native",
  "warning": "Wallet created successfully. The legacy wallet type is being deprecated and support for creating and opening legacy wallets will be removed in the future."
}
$ ./src/bitcoin-cli -regtest -named createwallet wallet_name=wallet_desc descriptors=true
{
  "name": "wallet_desc",
  "warning": ""
}
$ ./src/bitcoin-cli -regtest help createwallet | grep "6. descriptors"
6. descriptors             (boolean, optional, default=true) Create a native descriptor wallet. The wallet will use descriptors internally to handle address creation. Setting to "false" will create a legacy wallet; however, the legacy wallet type is being deprecated and support for creating and opening legacy wallets will be removed in the future.

@S3RK

S3RK commented Mar 14, 2022

Copy link
Copy Markdown
Contributor

reACK 6115218

@maflcko
maflcko merged commit e0881aa into bitcoin:master Mar 14, 2022
bitcoinhodler added a commit to bitcoinhodler/GlacierProtocol that referenced this pull request Oct 24, 2022
Added in bitcoin/bitcoin#24505

    "Wallet created successfully. The legacy wallet type is being
    deprecated and support for creating and opening legacy wallets
    will be removed in the future."
bitcoinhodler added a commit to bitcoinhodler/GlacierProtocol that referenced this pull request Oct 25, 2022
Added in bitcoin/bitcoin#24505

    "Wallet created successfully. The legacy wallet type is being
    deprecated and support for creating and opening legacy wallets
    will be removed in the future."
bitcoinhodler added a commit to bitcoinhodler/GlacierProtocol that referenced this pull request Oct 26, 2022
Added in bitcoin/bitcoin#24505

    "Wallet created successfully. The legacy wallet type is being
    deprecated and support for creating and opening legacy wallets
    will be removed in the future."
bitcoinhodler added a commit to bitcoinhodler/GlacierProtocol that referenced this pull request Oct 26, 2022
Added in bitcoin/bitcoin#24505

    "Wallet created successfully. The legacy wallet type is being
    deprecated and support for creating and opening legacy wallets
    will be removed in the future."
bitcoinhodler added a commit to bitcoinhodler/GlacierProtocol that referenced this pull request Oct 27, 2022
Added in bitcoin/bitcoin#24505

    "Wallet created successfully. The legacy wallet type is being
    deprecated and support for creating and opening legacy wallets
    will be removed in the future."
@bitcoin bitcoin locked and limited conversation to collaborators Mar 14, 2023
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.

10 participants