-
Notifications
You must be signed in to change notification settings - Fork 37.3k
Make bech32m the default for RPC, opt-in for GUI #22260
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
Conversation
5fadd35
to
e967fc7
Compare
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
e967fc7
to
6d1d492
Compare
6d1d492
to
47b02d6
Compare
My understanding from discussion at they July 30th Core wallet meeting is that this will only be merged once the (super)majority of the ecosystem is able to make payments to bech32m addresses. So definitely post Taproot activation but uncertain at this stage when exactly. Assuming I've understood above, Concept ACK. Thanks for the instructions for testing in the PR description, will do this testing at a later date. |
@michaelfolkson note that this doesn't do anything unless there's actually a taproot descriptor in the wallet, which this PR doesn't add. |
47b02d6
to
2c2a8c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1ba76c2
to
9ca663e
Compare
Rebased.
I added a note in the PR description. I tend to agree it's preferable to wait a little bit until more wallets and services support sending to bech32m, otherwise we have to add another checkbox for bech32 fallback and explain all that. |
I wonder why this isn't already merged for Testnet and Signet (not Mainnet), both of which have Taproot activated already. It would make Taproot testing much easier. |
reACK 9ca663e |
@schildbach I don't think we can merge this until there is wide support for sending to bech32m in commonly deployed clients/services, which will probably take a while after activation even. |
I'm open to the idea of enabling this behavior on signet (and testnet) and turning it off on mainnet until a later release. |
I added a GUI settings checkbox to enable "taproot" (maybe needs rewording). See updated PR description. |
Except for legacy wallets and descriptor wallets without taproot. Update the default after importing a taproot descriptor.
9ca663e
to
d6b3f6e
Compare
Use Taproot -> "Generate taproot addresses for wallets that support it..." Instead, could the new GUI option only be shown to users who have updated to taproot capable wallets? Then once clicking 'Use Taproot', the GUI bech32 checkbox should auto-select and produce bech32m addresses. |
Do you mean moving it from the wallet Settings view to the Receive view? (and then only showing it for taproot capable wallets) |
I didn't, but I believe that's a better idea |
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
Closing this in favor of a GUI-only PR: bitcoin-core/gui#459 |
c9a77e2 gui: address type dropdown, add bech32m (Sjors Provoost) 56113da wallet: add taprootEnabled() to interface (Sjors Provoost) Pull request description: This PR replaces the Bech32 checkbox with an address type dropdown It "Use Taproot" checkbox to the receive screen for any wallet with a Taproot descriptor. The Bech32m option is hidden for wallets that don't have taproot descriptors. Bech32 is kept as the default even for Taproot enabled wallets until it's more widely supported. (an earlier attempt of this PR added a second checkbox) <img width="469" alt="Schermafbeelding 2021-12-21 om 11 44 05" src="https://user-images.githubusercontent.com/10217/146872660-339fae1f-c0b8-4673-b8be-33c25f3933fd.png"> **Suggested testing** * notice that the Bech32m entry only appears for wallet with a taproot descriptor * verify that it generates a bc1p instead of bc1q address 1. Legacy wallet 2. Default descriptor wallet (current does not have taproot descriptor) 3. Wallet with taproot descriptor: * just create a new descriptor wallet Replaces bitcoin/bitcoin#22260 ACKs for top commit: Rspigler: tACK c9a77e2. I like the changes made now, thanks! kristapsk: re-ACK c9a77e2 Tree-SHA512: bae66ac90ed55372e6c94878db0e37d32b7b5c24ed00c0f2ebb10fd127dddce3a061162df915d67e92d7b35b3da093137db17b73931a0ae1a470fff20be1f30b
…ve tab) c9a77e2 gui: address type dropdown, add bech32m (Sjors Provoost) 56113da wallet: add taprootEnabled() to interface (Sjors Provoost) Pull request description: This PR replaces the Bech32 checkbox with an address type dropdown It "Use Taproot" checkbox to the receive screen for any wallet with a Taproot descriptor. The Bech32m option is hidden for wallets that don't have taproot descriptors. Bech32 is kept as the default even for Taproot enabled wallets until it's more widely supported. (an earlier attempt of this PR added a second checkbox) <img width="469" alt="Schermafbeelding 2021-12-21 om 11 44 05" src="https://user-images.githubusercontent.com/10217/146872660-339fae1f-c0b8-4673-b8be-33c25f3933fd.png"> **Suggested testing** * notice that the Bech32m entry only appears for wallet with a taproot descriptor * verify that it generates a bc1p instead of bc1q address 1. Legacy wallet 2. Default descriptor wallet (current does not have taproot descriptor) 3. Wallet with taproot descriptor: * just create a new descriptor wallet Replaces bitcoin#22260 ACKs for top commit: Rspigler: tACK c9a77e2. I like the changes made now, thanks! kristapsk: re-ACK c9a77e2 Tree-SHA512: bae66ac90ed55372e6c94878db0e37d32b7b5c24ed00c0f2ebb10fd127dddce3a061162df915d67e92d7b35b3da093137db17b73931a0ae1a470fff20be1f30b
c9a77e2 gui: address type dropdown, add bech32m (Sjors Provoost) 56113da wallet: add taprootEnabled() to interface (Sjors Provoost) Pull request description: This PR replaces the Bech32 checkbox with an address type dropdown It "Use Taproot" checkbox to the receive screen for any wallet with a Taproot descriptor. The Bech32m option is hidden for wallets that don't have taproot descriptors. Bech32 is kept as the default even for Taproot enabled wallets until it's more widely supported. (an earlier attempt of this PR added a second checkbox) <img width="469" alt="Schermafbeelding 2021-12-21 om 11 44 05" src="https://user-images.githubusercontent.com/10217/146872660-339fae1f-c0b8-4673-b8be-33c25f3933fd.png"> **Suggested testing** * notice that the Bech32m entry only appears for wallet with a taproot descriptor * verify that it generates a bc1p instead of bc1q address 1. Legacy wallet 2. Default descriptor wallet (current does not have taproot descriptor) 3. Wallet with taproot descriptor: * just create a new descriptor wallet Replaces bitcoin/bitcoin#22260 ACKs for top commit: Rspigler: tACK c9a77e2. I like the changes made now, thanks! kristapsk: re-ACK c9a77e2 Tree-SHA512: bae66ac90ed55372e6c94878db0e37d32b7b5c24ed00c0f2ebb10fd127dddce3a061162df915d67e92d7b35b3da093137db17b73931a0ae1a470fff20be1f30b
RPC
This makes bech32m the default whenever possible. For legacy wallets the default remains bech32. Same for descriptor wallets without an active Taproot descriptor.
GUI
A new wallet setting allows users to opt-in to Taproot. If they opt in, the GUI bech32 checkbox now produces either bech32 or bech32m depending on the wallet. This avoids having to explain the difference.
Considerations
This lets users and developers experiment with taproot wallets. When merged before #22364, the user will have to manually import a taproot descriptor. After that PR, taproot descriptors will be present for all new wallets.
It is better to stick to bech32 addresses for the time being, because:
But we don't want to prevent users and developers who do understand the difference to use Taproot. Without this PR they can only do this via the RPC (
getnewaddress some_label bech32m
). With this PR it's a simple checkbox.Changing the RPC default to bech32m seems acceptable to me, since those users will have a better understanding of the wallet. Though I can see the case against it because it might be a breaking change, e.g. if someone has an automated setup that creates new wallets (existing wallets currently don't auto upgrade to taproot, so their behavior is not changed).
Suggested testing
getnewaddress
without type andgetnewaddress Test bech32
/bech32m