-
Notifications
You must be signed in to change notification settings - Fork 878
backport: Add XOnlyPublicKey support for PSBT key retrieval and improve Taproot signing #4443
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
cc @storopoli because he is waiting for this according to #4388 |
79a03fe
to
74e2c5c
Compare
In 9331108: Why isn't it an API break to change the signature of the Also why isn't the API-break bot running here? (I guess we hadn't enabled it in the 0.32 branch in our CI directory? Can we do that?) |
74e2c5c looks good other than that one commit. |
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.
Thanks!
ACK 74e2c5c
… signing This commit enhances PSBT signing functionality by: 1. Added new KeyRequest::XOnlyPubkey variant to support direct retrieval using XOnly public keys 2. Implemented GetKey for HashMap<XOnlyPublicKey, PrivateKey> for more efficient Taproot key management 3. Modified HashMap<PublicKey, PrivateKey> implementation to handle XOnlyPublicKey requests by checking both even and odd parity variants These changes allow for more flexible key management in Taproot transactions. Specifically, wallet implementations can now store keys indexed by either PublicKey or XOnlyPublicKey and successfully sign PSBTs with Taproot inputs. Added tests for both implementations to verify correct behavior. Added test for odd parity key retrieval. Closes rust-bitcoin#4150
74e2c5c
to
95eb255
Compare
Ooph - fail! Thanks man. Force push includes a few things:
|
cc @shesek in case you wanted to see your bug fix getting released. Should have been backported immediately that it was done, my bad. |
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.
ACK 95eb255
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.
ACK 95eb255; successfully ran local tests
Backport two PRs:
The first includes a bug fix in a
GetKey
impl and the second is a feature we want to release. And the three refactor patches touch code that #4238 builds on so I figured we should backport them all.All 5 patches required a small amount of massaging to get in. The first 4 was just adding a
?
to the calls toderive_priv
. The last patch needed a few calls in the unit test changing.