Skip to content
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

Support conversion of multi-Xprivs into multi-Xpubs #757

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

shesek
Copy link
Contributor

@shesek shesek commented Oct 17, 2024

Possible when all hardened derivation steps are shared among all paths (or if there are none). Errors otherwise.

Possible when all hardened derivation steps are shared among all paths
(or if there are none). Errors otherwise.
apoelstra
apoelstra previously approved these changes Oct 17, 2024
Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 7d3e1e8; successfully ran local tests; the stringly-typed errors are OK since this module is full of them

@apoelstra
Copy link
Member

Would like @sanket1729 to take a quick look at this before acking to sanity-check it.

In particular this forbits multixpubs where there are hardened derivations after the split. I assume this is a requirement to be a legal multixpub? Because there isn't any obvious reason we should be forced to have this limit.

@shesek
Copy link
Contributor Author

shesek commented Oct 17, 2024

assume this is a requirement to be a legal multixpub? Because there isn't any obvious reason we should be forced to have this limit.

Correct, this is a limitation imposed by the current DescriptorMultiXKey structure (can only have one concrete pubkey as the base for derivations) and not something inherent. But supporting it would require some pretty invasive changes and it seemed to me that in the typical case hardened derivation steps are usually shared, and that it can be useful even with that limitation.

@shesek
Copy link
Contributor Author

shesek commented Oct 17, 2024

Added another commit with some formatting changes that also updates the existing DescriptorXKey::to_public(). Let me know if you'd like me to squash or drop it.

Copy link
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

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

utACK ae64ce6

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK ae64ce6; successfully ran local tests; the stringly-typed errors are OK since this module is full of them

shesek added a commit to shesek/minsc that referenced this pull request Oct 17, 2024
@apoelstra apoelstra merged commit 33b417b into rust-bitcoin:master Oct 17, 2024
29 of 30 checks passed
shesek added a commit to shesek/minsc that referenced this pull request Oct 18, 2024
shesek added a commit to shesek/minsc that referenced this pull request Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants