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

descriptors: Introduce sortedmulti descriptor #17056

Merged
merged 4 commits into from Oct 8, 2019

Conversation

achow101
Copy link
Member

@achow101 achow101 commented Oct 4, 2019

Adds a sortedmulti() descriptor as mentioned in #17023 (comment).

sortedmulti() works in the same way as multi does but sorts the pubkeys in the resulting scripts in lexicographic order as described in BIP67. Note that this does not add support for BIP67 nor is BIP67 fully supported by this descriptor (which is why it is not named multi67()) as it does not require compressed pubkeys.

Tests from BIP67 were added and documentation was updated.

@fanquake fanquake requested a review from sipa Oct 4, 2019
@DrahtBot
Copy link
Contributor

@DrahtBot DrahtBot commented Oct 4, 2019

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #17023 (doc: warn that ranged multi() descriptors are not BIP67 compatible by Sjors)
  • #16889 (Add some general std::vector utility functions by sipa)
  • #16800 (Basic Miniscript support in output descriptors by sipa)
  • #15590 (Descriptor: add GetAddressType() and IsSegWit() by Sjors)

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.

src/script/descriptor.cpp Outdated Show resolved Hide resolved
src/script/descriptor.cpp Outdated Show resolved Hide resolved
@MarcoFalke MarcoFalke changed the title Introduce sortedmulti descriptor descriptors: Introduce sortedmulti descriptor Oct 5, 2019
@Sjors
Copy link
Member

@Sjors Sjors commented Oct 5, 2019

Copy link
Member

@Sjors Sjors left a comment

I tested with cryptoadvance/specter-desktop#8 that ColdCard simulator no longer complains about a change address that it complained about before.

Code review ACK d5a925b except for the functional test issue.

test/functional/rpc_createmultisig.py Outdated Show resolved Hide resolved
@Sjors
Copy link
Member

@Sjors Sjors commented Oct 6, 2019

ACK a6dd441

Copy link
Contributor

@bitcoinhodler bitcoinhodler left a comment

Love this.

doc/descriptors.md Outdated Show resolved Hide resolved
doc/descriptors.md Outdated Show resolved Hide resolved
doc/descriptors.md Outdated Show resolved Hide resolved
Copy link
Member

@promag promag left a comment

ACK 9214dd6, add release notes and call it a day.

test/functional/rpc_createmultisig.py Outdated Show resolved Hide resolved
@achow101
Copy link
Member Author

@achow101 achow101 commented Oct 7, 2019

Added a release note.

doc/release-notes-17056.md Outdated Show resolved Hide resolved
@achow101 achow101 force-pushed the sortedmulti-desc branch 2 times, most recently from 8ece050 to 2638791 Compare Oct 8, 2019
@laanwj laanwj added the Feature label Oct 8, 2019
@instagibbs
Copy link
Member

@instagibbs instagibbs commented Oct 8, 2019

utACK 2638791

@promag
Copy link
Member

@promag promag commented Oct 8, 2019

ACK 2638791, only changes are the suggestion in the test and added the release note.

@fanquake fanquake requested a review from Sjors Oct 8, 2019
Sjors
Sjors approved these changes Oct 8, 2019
Copy link
Member

@Sjors Sjors left a comment

re-ACK 2638791

@sipa
Copy link
Member

@sipa sipa commented Oct 8, 2019

ACK 2638791. Agree on calling it sortedmulti as it's indeed more generic than bip67.

test/functional/rpc_createmultisig.py Show resolved Hide resolved
src/script/descriptor.cpp Outdated Show resolved Hide resolved
Sjors
Sjors approved these changes Oct 8, 2019
Copy link
Member

@Sjors Sjors left a comment

re-ACK 4bb660b

@instagibbs
Copy link
Member

@instagibbs instagibbs commented Oct 8, 2019

re-ACK 4bb660b

fanquake added a commit that referenced this issue Oct 8, 2019
4bb660b Add release note (Andrew Chow)
ed96b29 Update descriptors.md to include sortedmulti (Andrew Chow)
80be78e Test sortedmulti descriptor using BIP 67 tests (Andrew Chow)
6f588fd Add sortedmulti descriptor and unit tests (Andrew Chow)

Pull request description:

  Adds a `sortedmulti()` descriptor as mentioned in #17023 (comment).

  `sortedmulti()` works in the same way as `multi` does but sorts the pubkeys in the resulting scripts in lexicographic order as described in [BIP67](https://github.com/bitcoin/bips/blob/master/bip-0067.mediawiki). Note that this does not add support for BIP67 nor is BIP67 fully supported by this descriptor (which is why it is not named `multi67()`) as it does not require compressed pubkeys.

  Tests from BIP67 were added and documentation was updated.

ACKs for top commit:
  instagibbs:
    re-ACK 4bb660b
  Sjors:
    re-ACK 4bb660b

Tree-SHA512: 93b21112a74ebe0bf316d8f3e0291f69fd975cf0a29332f9728e7b880cad312b8b14007e86adcd7899f117b9303cbcf4cb35f3bb2f2f648d1a446f83f75a70a5
@fanquake fanquake merged commit 4bb660b into bitcoin:master Oct 8, 2019
0 of 2 checks passed
@Sjors Sjors mentioned this pull request Oct 29, 2019
2 tasks
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this issue Nov 15, 2019
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this issue Nov 15, 2019
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue Oct 8, 2020
Summary:
4bb660be90a2811b53855bf1fd33a8dd9ba3db47 Add release note (Andrew Chow)
ed96b295d747738334459490c79b7360ab85aaf7 Update descriptors.md to include sortedmulti (Andrew Chow)
80be78ea75ac9833ee3db3d468ed09fc4fe6274c Test sortedmulti descriptor using BIP 67 tests (Andrew Chow)
6f588fd2276e5b713c6d36e3b01288484ddb59c0 Add sortedmulti descriptor and unit tests (Andrew Chow)

Pull request description:

  Adds a `sortedmulti()` descriptor as mentioned in bitcoin/bitcoin#17023 (comment).

  `sortedmulti()` works in the same way as `multi` does but sorts the pubkeys in the resulting scripts in lexicographic order as described in [BIP67](https://github.com/bitcoin/bips/blob/master/bip-0067.mediawiki). Note that this does not add support for BIP67 nor is BIP67 fully supported by this descriptor (which is why it is not named `multi67()`) as it does not require compressed pubkeys.

  Tests from BIP67 were added and documentation was updated.

ACKs for top commit:
  instagibbs:
    re-ACK bitcoin/bitcoin@4bb660b
  Sjors:
    re-ACK 4bb660be90a2811b53855bf1fd33a8dd9ba3db47

---

Depends on D7828

Backport of Core [[bitcoin/bitcoin#17056 | PR17056]]

Test Plan:
  ninja all check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7832
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
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.

None yet

9 participants