Skip to content

Conversation

@darosior
Copy link
Member

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.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jul 21, 2022

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #25748 (refactor: Avoid copies in FlatSigningProvider Merge by MarcoFalke)
  • #24149 (Signing support for Miniscript Descriptors by darosior)
  • #19602 (wallet: Migrate legacy wallets to descriptor wallets by achow101)

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.

@achow101
Copy link
Member

ACK 3693771b9aef4e23a1b92b2c52b19ad44dac75da

Copy link
Member

@furszy furszy left a 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.
@darosior darosior force-pushed the redefine_issolvable branch from 3693771 to fa3c84d Compare August 7, 2022 22:12
@darosior
Copy link
Member Author

darosior commented Aug 7, 2022

Rebased.

Copy link
Member

@furszy furszy left a 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.

@darosior darosior force-pushed the redefine_issolvable branch 2 times, most recently from 40a773a to fa3c84d Compare August 11, 2022 08:45
@fanquake fanquake requested a review from instagibbs August 11, 2022 09:07
It was used back when we didn't have a concept of descriptor. Now we
can check for solvability using descriptors.
@darosior darosior force-pushed the redefine_issolvable branch from fa3c84d to b16f93c Compare August 11, 2022 13:45
@fanquake fanquake requested a review from achow101 August 11, 2022 13:46
@instagibbs
Copy link
Member

ACK b16f93c

@fanquake fanquake requested a review from furszy August 11, 2022 14:00
@achow101
Copy link
Member

re-ACK b16f93c

Copy link
Member

@furszy furszy left a 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.

@achow101 achow101 merged commit e078ee9 into bitcoin:master Aug 11, 2022
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Aug 11, 2022
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
@bitcoin bitcoin locked and limited conversation to collaborators Aug 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants