-
Notifications
You must be signed in to change notification settings - Fork 902
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
Taproot wallet support #6035
Taproot wallet support #6035
Conversation
e08a21b
to
7023e45
Compare
ac1a6ba
to
e65af25
Compare
one more libwally update to go.... |
9a2f1f7
to
58c55f1
Compare
58c55f1
to
92c7176
Compare
@@ -395,7 +404,7 @@ static struct command_result *finish_psbt(struct command *cmd, | |||
excess = AMOUNT_SAT(0); | |||
/* Add additional weight of output */ | |||
weight += bitcoin_tx_output_weight( | |||
BITCOIN_SCRIPTPUBKEY_P2WPKH_LEN); | |||
chainparams->is_elements ? BITCOIN_SCRIPTPUBKEY_P2WPKH_LEN : BITCOIN_SCRIPTPUBKEY_P2TR_LEN); |
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.
since script is known b32script
we could just tal_count
it, but there are other cases where we don't have a script on hand already. would rather we sync up behavior
83e529b
to
4ced65f
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.
One minor weird delete...
It's unfortunate that we can't simply reuse "bech32" as the JSON field name for these addresses: I guess some software won't be up-to-date.
However, I think it's naive to use "p2tr" as well, since we're hoping that THIS TIME FOR SURE we have a universal address format: next change it would be great not to have everyone have to parse a new field. So, do we optimistically go for "bech32m"?
I may remove p2sh as part of the deprecations PR, let's not get bogged down behind that!
common/psbt_keypath.c
Outdated
ext->pub_key + 1, sizeof(ext->pub_key) - 1, | ||
NULL, 0, | ||
fingerprint, sizeof(fingerprint), | ||
path, 1) != WALLY_OK) |
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.
Guessing your local tabs are 4 spaces? Because this is very indented!
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.
ok im in libwally mode; what's the expected indent level :)
If someday there's witness output v2 that also uses bech32m, we'll have to un-camp it? p2tr just seems more explicit to me. |
4ced65f
to
d63f23f
Compare
last question I'd have: is it better to not switch to taproot change outputs, just to limit blast radius if something were to go wrong, at least for a release? pushed a couple fixes to tests as well edit: can't replicate |
d63f23f
to
a08dce3
Compare
Unfortunately, I don't think we'd find any bugs without this, and it adds another step change. However, I do note that you need to add two Changelog-Added lines, and edit the newaddr man page (which doesn't mention Changelog-Added: JSON-RPC:
That's a known flake, ignore... |
Also, please change all |
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.
See comments...
a08dce3
to
366e9b5
Compare
Added
done! also added description for arg in |
4bfd9be
to
e39f019
Compare
now that dual funding is back in CI matrix.... time to fix tests :) |
e304a4e
to
50b913b
Compare
746c41c
to
cc3820e
Compare
I'm going to look into storing the feature bits shared by the peers to remove this race in tests that I've run into. We'd like to know that we've previously seen a peer share |
cc3820e
to
f799269
Compare
rebased on the now-ACK'd #6308 removed the random gating in tests, things should be passing now... |
a66e29c
to
4a99000
Compare
79750d6
to
3d97754
Compare
Rebased on master, and folded the fixups into a single commit. Also did some indent fixups. Ack: 3d97754 |
Changelog-Added: JSON-RPC: newaddr: p2tr option to create taproot addresses. Changelog-Changed: Wallet: we now use taproot change addresses.
When modifying the schema, regenerating the file can be challenging. This change sets the autogenerate file as the default target, m aking the process more convenient and simplifying our workflow. Fixes ElementsProject#6365 Report-by: Dusty Daemon Changelog-None Signed-off-by: Vincenzo Palazzo <[email protected]>
3d97754
to
2c1d579
Compare
Trivial rebase for generated file clash. Ack 2c1d579 |
Ayyyy!!!
…On Mon, Jul 10, 2023 at 21:11 Rusty Russell ***@***.***> wrote:
Merged #6035 <#6035>
into master.
—
Reply to this email directly, view it on GitHub
<#6035 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIMAKN2GKIZWOMAPDOVWPDXPSY47ANCNFSM6AAAAAAVHHMQ3Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Regarding field names, @sipa previously had this advice for me:
Source: https://www.erisian.com.au/bitcoin-core-dev/log-2021-06-28.html#l-89 |
This switches CLN to issuing p2tr addresses for deposits optionally, and also by default sending change to p2tr outputs.
Open questions:
chainparams->is_elements
(12 times looks like), bet it would be good to have some simpler way to not forget what version we're doing?