-
Notifications
You must be signed in to change notification settings - Fork 38.7k
refactor: Redefine IsSolvable() using descriptors
#25664
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
|
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. |
|
ACK 3693771b9aef4e23a1b92b2c52b19ad44dac75da |
furszy
left a comment
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.
Needs rebase but ACK 3693771b
Nice that we don't longer need to produce so many dummy signatures. Should get us a pretty decent speedup in AvailableCoins for big wallets.
…DestinationForScript It's already checked by its (only) caller, AddAndGetMultisigDestination.
3693771 to
fa3c84d
Compare
|
Rebased. |
furszy
left a comment
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.
Code review ACK fa3c84d8 after rebase.
40a773a to
fa3c84d
Compare
It was used back when we didn't have a concept of descriptor. Now we can check for solvability using descriptors.
fa3c84d to
b16f93c
Compare
|
ACK b16f93c |
|
re-ACK b16f93c |
furszy
left a comment
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 b16f93c, only change is the IsSolvable helper function removal.
b16f93c script/sign: remove needless IsSolvable() utility (Antoine Poinsot) c232ef2 outputtype: remove redundant check for uncompressed keys in AddAndGetDestinationForScript (Antoine Poinsot) Pull request description: Now that we have descriptors there is no need to try to sign for a scriptPubKey using dummy signatures, and using a mocked verification of this witness against the interpreter, just to make sure we know how to spend such a Script. Just try to infer a solvable descriptor: any scriptPubKey that we can sign for can be inferred as such. This came up in bitcoin#24149 but i think it's worth it on its own. ACKs for top commit: instagibbs: ACK bitcoin@b16f93c achow101: re-ACK b16f93c furszy: ACK b16f93c, only change is the `IsSolvable` helper function removal. Tree-SHA512: 137068157ce90210b710b1bf9ac3c400e2ff5af1112f892094b69875ea473d6a899f52adb51e5030cb907dee517602059cd1661107808558efa5de842ba12b41
Now that we have descriptors there is no need to try to sign for a scriptPubKey using dummy signatures, and using a mocked verification of this witness against the interpreter, just to make sure we know how to spend such a Script. Just try to infer a solvable descriptor: any scriptPubKey that we can sign for can be inferred as such.
This came up in #24149 but i think it's worth it on its own.