HomePhabricator

[backport#17056] descriptors: Introduce sortedmulti descriptor

Description

[backport#17056] descriptors: Introduce sortedmulti descriptor

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 https://github.com/bitcoin/bitcoin/pull/17023#issuecomment-537596416.

`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 https://github.com/bitcoin/bitcoin/pull/17056/commits/4bb660be90a2811b53855bf1fd33a8dd9ba3db47
Sjors:
  re-ACK 4bb660be90a2811b53855bf1fd33a8dd9ba3db47

Depends on D7828

Backport of Core PR17056

Test Plan:

ninja all check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7832

Details

Provenance
fanquake <fanquake@gmail.com>Authored on Oct 8 2019, 18:14
majcostaCommitted on Oct 8 2020, 22:21
majcostaPushed on Oct 8 2020, 22:21
Reviewer
Restricted Project
Differential Revision
D7832: [backport#17056] descriptors: Introduce sortedmulti descriptor
Parents
rABC9a3d5bcc7deb: Remove archiving release notes from release process
Branches
Unknown
Tags
Unknown