fix(key_map): derivation_path for Xprv with key origin info#872
Open
oleonardolima wants to merge 2 commits into
Open
fix(key_map): derivation_path for Xprv with key origin info#872oleonardolima wants to merge 2 commits into
Xprv with key origin info#872oleonardolima wants to merge 2 commits into
Conversation
9869841 to
64483f3
Compare
oleonardolima
commented
Oct 31, 2025
tcharding
added a commit
to tcharding/rust-miniscript
that referenced
this pull request
Nov 3, 2025
We cannot link to a file by directory path in rustdocs. Just remove the link. This is breaking the docs build in rust-bitcoin#805 and is also mentioned in rust-bitcoin#872.
Merged
apoelstra
added a commit
that referenced
this pull request
Nov 3, 2025
f853906 Remove link to doc file (Tobin C. Harding) Pull request description: We cannot link to a file by directory path in rustdocs. Just remove the link. This is breaking the docs build in #805 and is also mentioned in #872. ACKs for top commit: apoelstra: ACK f853906; successfully ran local tests Tree-SHA512: d2e2eb182cb823297de53635ac23d55ff920b750d28efa7e18de08ddeda3a7f2bdffe8ff32dcf4c54ec32a33a176cea349291260388fd5e5cdad14c6c2e9802e
11 tasks
noahjoeris
pushed a commit
to noahjoeris/rust-miniscript
that referenced
this pull request
May 27, 2026
We cannot link to a file by directory path in rustdocs. Just remove the link. This is breaking the docs build in rust-bitcoin#805 and is also mentioned in rust-bitcoin#872.
43d92da to
32867b3
Compare
- fixes the implementation of `GetKey` for `Xprv` with `KeyRequest::Bip32`, when the the key_origin information is available. - introduces a new test for a scenario with no wildcard used, a specific derivation index is used instead.
- introduce table-driven cases for `get_key_xpriv_with_key_origin` with named fields - drop redundant key parsing, and build requests from explicit key sources Assisted-by: Claude Opus 4.8
9cd3d75 to
a2f4497
Compare
Contributor
Author
|
@notmandatory I updated this PR and added new test scenarios, it should be ready to review. cc'in @noahjoeris as you had interest in this and a review would be appreciated. |
3 tasks
Xprv with key origin infoXprv with key origin info
oleonardolima
added a commit
to oleonardolima/rust-miniscript
that referenced
this pull request
Jun 16, 2026
- backports rust-bitcoin#872 fixes for the implementation of `GetKey` for `Xprv` with `KeyRequest::Bip32`, when the the key_origin information is available. - introduces a new test for a scenario with no wildcard used, a specific derivation index is used instead.
oleonardolima
added a commit
to oleonardolima/rust-miniscript
that referenced
this pull request
Jun 16, 2026
- backports introduced rust-bitcoin#872 table-driven test cases for `get_key_xpriv_with_key_origin` with named fields - drop redundant key parsing, and build requests from explicit key sources Assisted-by: Claude Opus 4.8
notmandatory
approved these changes
Jun 16, 2026
notmandatory
left a comment
Contributor
There was a problem hiding this comment.
ACK a2f4497
Changes look good, tests easy to follow.
noahjoeris
approved these changes
Jun 17, 2026
noahjoeris
left a comment
Contributor
There was a problem hiding this comment.
tACK a2f4497
Looking good, thanks.
This was referenced Jun 18, 2026
Open
Contributor
Author
|
ping @tcharding @apoelstra for awareness. |
Member
|
Oops, missed this somehow. Will review it and the backport today. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
GetKeyforDescriptorSecretKey(and thusKeyMap) returned the wrong key when an extended private key with key origin info was queried viaKeyRequest::Bip32.The key request path is master-relative, but the
xkeyis anchored at its origin (e.g.[d34db33f/84h/1h/0h]). The old code stripped the path returned bymatches(); the fix strips the origin prefix instead (and uses the full path when there is no origin) before deriving from thexkey.--
Also, this PR introduces the test
get_key_xpriv_with_key_origincovering the scenarios: bare wildcard; single fixed step; fixed step then wildcard, and the matching/non-matching cases build requests from explicit(fingerprint, path)key sources.Notes
If you'd like an overview on the issue, see: #863 (comment)
Changelog notice
Checklists
Bugfixes: