BIP 387: multi_a() descriptor #1567
pull achow101 wants to merge 1 commits into bitcoin:master from achow101:multi_a changing 2 files +108 −0-
achow101 commented at 10:26 pm on April 17, 2024: member
-
in bip-multi-a.mediawiki:20 in 2ead7501f5 outdated
15+==Abstract== 16+ 17+This document specifies <tt>multi_a()</tt>, and <tt>sortedmulti_a()</tt> output script descriptors. 18+Like BIP 383's <tt>multi()</tt> and <tt>sortedmulti()</tt>, both functions take a threshold and one 19+or more public keys and produce a multisig script. The primary distinction being that <tt>multi_a()</tt> 20+and <tt>sortedmulti_a()<tt> only produce tapscripts and are only allowed in a tapscript context.
laanwj commented at 9:20 am on April 18, 2024:missing</tt>
achow101 commented at 1:54 pm on April 18, 2024:Fixedachow101 force-pushed on Apr 18, 2024in bip-multi-a.mediawiki:59 in 3e8333df23 outdated
54+The only change for <tt>sortedmulti_a()</tt> is that the keys are sorted lexicographically prior to the creation of the output script. 55+This sorting is on the keys that are to be put into the output script, i.e. after all extended keys are derived. 56+ 57+===Multiple Extended Keys</tt>=== 58+ 59+When one or more the key expressions in a <tt>multi_a()</tt> or <tt>sortedmulti_a()</tt> expression are extended keys, the derived keys use the same child index.
jonatack commented at 7:34 pm on April 22, 2024:0When one or more of the key expressions in a <tt>multi_a()</tt> or <tt>sortedmulti_a()</tt> expression are extended keys, the derived keys use the same child index.
achow101 commented at 9:30 pm on April 22, 2024:Donein bip-multi-a.mediawiki:96 in 3e8333df23 outdated
91+* Threshold larger than keys: <tt>tr(50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0,multi_a(3,L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1,5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss))</tt> 92+ 93+==Backwards Compatibility== 94+ 95+<tt>multi_a()</tt>, and <tt>sortedmulti_a()</tt> descriptors use the format and general operation specified in [[bip-0380.mediawiki|380]]. 96+As these are a wholly new descriptors, they are not compatible with any implementation.
jonatack commented at 7:35 pm on April 22, 2024:0As these are wholly new descriptors, they are not compatible with any implementation.
I might be confused, but should this sentence be changed to mention that they have been implemented in Bitcoin Core since version 24.0?
achow101 commented at 9:27 pm on April 22, 2024:Fixed.
I might be confused, but should this sentence be changed to mention that they have been implemented in Bitcoin Core since version 24.0?
Since that is the reference implementation, I don’t think it makes sense to mention in the backwards compatibility section.
in bip-multi-a.mediawiki:97 in 3e8333df23 outdated
92+ 93+==Backwards Compatibility== 94+ 95+<tt>multi_a()</tt>, and <tt>sortedmulti_a()</tt> descriptors use the format and general operation specified in [[bip-0380.mediawiki|380]]. 96+As these are a wholly new descriptors, they are not compatible with any implementation. 97+However the scripts produced are standard scripts so existing software are likely to be familiar with them.
jonatack commented at 7:38 pm on April 22, 2024:0However, the scripts produced are standard scripts, so existing software are likely to be familiar with them.
achow101 commented at 9:30 pm on April 22, 2024:Donein bip-multi-a.mediawiki:19 in 3e8333df23 outdated
14+ 15+==Abstract== 16+ 17+This document specifies <tt>multi_a()</tt>, and <tt>sortedmulti_a()</tt> output script descriptors. 18+Like BIP 383's <tt>multi()</tt> and <tt>sortedmulti()</tt>, both functions take a threshold and one 19+or more public keys and produce a multisig script. The primary distinction being that <tt>multi_a()</tt>
jonatack commented at 7:39 pm on April 22, 2024:0or more public keys and produce a multisig script. The primary distinction is that <tt>multi_a()</tt>
achow101 commented at 9:30 pm on April 22, 2024:Donein bip-multi-a.mediawiki:17 in 3e8333df23 outdated
12+ License: BSD-2-Clause 13+</pre> 14+ 15+==Abstract== 16+ 17+This document specifies <tt>multi_a()</tt>, and <tt>sortedmulti_a()</tt> output script descriptors.
jonatack commented at 7:40 pm on April 22, 2024:0This document specifies <tt>multi_a()</tt> and <tt>sortedmulti_a()</tt> output script descriptors.
achow101 commented at 9:30 pm on April 22, 2024:Donein bip-multi-a.mediawiki:40 in 3e8333df23 outdated
35+They are written as <tt>multi_a(k,KEY_1,KEY_2,...,KEY_n)</tt>. 36+<tt>k</tt> is the threshold - the number of keys that must sign the input for the script to be valid. 37+<tt>KEY_1,KEY_2,...,KEY_n</tt> are the key expressions for the multisig. <tt>k</tt> must be less than or equal to <tt>n</tt>. 38+ 39+<tt>multi_a()</tt> and <tt>sortedmulti_a()</tt> expressions can only be used inside of a <tt>tr()</tt> descriptor. 40+The maximum number of keys is 999
jonatack commented at 7:40 pm on April 22, 2024:0The maximum number of keys is 999.
achow101 commented at 9:30 pm on April 22, 2024:Donein bip-multi-a.mediawiki:101 in 3e8333df23 outdated
96+As these are a wholly new descriptors, they are not compatible with any implementation. 97+However the scripts produced are standard scripts so existing software are likely to be familiar with them. 98+ 99+==Reference Implementation== 100+ 101+<tt>multi_a()</tt>, and <tt>sortedmulti_a()</tt> descriptors have been implemented in Bitcoin Core since version 24.0.
jonatack commented at 7:42 pm on April 22, 2024:0<tt>multi_a()</tt> and <tt>sortedmulti_a()</tt> descriptors have been implemented in Bitcoin Core since version 24.0.
achow101 commented at 9:30 pm on April 22, 2024:Donein bip-multi-a.mediawiki:95 in 3e8333df23 outdated
90+* Uncompressed pubkey: <tt>tr(50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0,multi_a(1,04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235))</tt> 91+* Threshold larger than keys: <tt>tr(50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0,multi_a(3,L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1,5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss))</tt> 92+ 93+==Backwards Compatibility== 94+ 95+<tt>multi_a()</tt>, and <tt>sortedmulti_a()</tt> descriptors use the format and general operation specified in [[bip-0380.mediawiki|380]].
jonatack commented at 7:45 pm on April 22, 2024:0<tt>multi_a()</tt> and <tt>sortedmulti_a()</tt> descriptors use the format and general operation specified in [[bip-0380.mediawiki|BIP380]].
achow101 commented at 9:30 pm on April 22, 2024:Donejonatack commented at 8:04 pm on April 22, 2024: contributorLooks like this needs a BIP number assignment? A few minor suggestions follow.jonatack commented at 8:30 pm on April 22, 2024: contributorAssigned BIP 387.jonatack added the label New BIP on Apr 22, 2024achow101 force-pushed on Apr 22, 2024achow101 renamed this:
BIP multi-a: multi_a() descriptor
BIP 387: multi_a() descriptor
on Apr 22, 2024in README.mediawiki:1166 in a53d663a8c outdated
1162@@ -1163,6 +1163,13 @@ Those proposing changes should consider that ultimately consent may rest with th 1163 | Informational 1164 | Draft 1165 |- 1166+| [[bip-0387.mediawiki|386]]
achow101 commented at 9:43 pm on April 23, 2024:Lol oops, forgot to add it after renaming.
jonatack commented at 9:38 pm on May 1, 2024:0| [[bip-0387.mediawiki|387]]
achow101 commented at 9:43 pm on May 1, 2024:Fixedachow101 force-pushed on Apr 23, 2024achow101 force-pushed on Apr 23, 2024in bip-0387.mediawiki:101 in 4604171b14 outdated
96+As these are wholly new descriptors, they are not compatible with any implementation. 97+However, the scripts produced are standard scripts, so existing software are likely to be familiar with them. 98+ 99+==Reference Implementation== 100+ 101+<tt>multi_a()</tt> and <tt>sortedmulti_a()</tt> descriptors have been implemented in Bitcoin Core since version 24.0.
jonatack commented at 9:40 pm on May 1, 2024:Would it be helpful to link here to the implementation pull(s)?
achow101 commented at 9:45 pm on May 1, 2024:Addedachow101 force-pushed on May 1, 2024achow101 force-pushed on May 1, 2024in bip-0387.mediawiki:54 in fe8b1cbf36 outdated
49+KEY_1 OP_CHECKSIG KEY_2 OP_CHECKSIGADD ... KEY_n OP_CHECKSIGADD k OP_NUMEQUAL 50+</pre> 51+ 52+===<tt>sortedmulti_a()</tt>=== 53+ 54+The only change for <tt>sortedmulti_a()</tt> is that the keys are sorted lexicographically prior to the creation of the output script.
jonatack commented at 6:04 pm on May 6, 2024:Should this be mentioned, like in
doc/descriptors.md#L81
?0The only change for <tt>sortedmulti_a()</tt> is that the (x-only) public keys are sorted lexicographically prior to the creation of the output script.
achow101 commented at 10:26 pm on May 6, 2024:Donein bip-0387.mediawiki:101 in fe8b1cbf36 outdated
96+As these are wholly new descriptors, they are not compatible with any implementation. 97+However, the scripts produced are standard scripts, so existing software are likely to be familiar with them. 98+ 99+==Reference Implementation== 100+ 101+<tt>multi_a()</tt> and <tt>sortedmulti_a()</tt> descriptors were implemented in Bitcoin Core in https://github.com/bitcoin/bitcoin/pull/24043 and has been available since version 24.0.
jonatack commented at 6:04 pm on May 6, 2024:0<tt>multi_a()</tt> and <tt>sortedmulti_a()</tt> descriptors were implemented in Bitcoin Core in https://github.com/bitcoin/bitcoin/pull/24043 and have been available since version 24.0.
achow101 commented at 10:26 pm on May 6, 2024:Donejonatack commented at 6:07 pm on May 6, 2024: contributorLGTM fe8b1cbf36916d0dffed7147070e499d4dbf77b0 modulo 2 nits abovein bip-0387.mediawiki:17 in fe8b1cbf36 outdated
12+ License: BSD-2-Clause 13+</pre> 14+ 15+==Abstract== 16+ 17+This document specifies <tt>multi_a()</tt> and <tt>sortedmulti_a()</tt> output script descriptors.
Christewart commented at 7:30 pm on May 6, 2024:To ask the dumb question, what is
a
?add
?csa
would be clearer IMO.
achow101 commented at 10:28 pm on May 6, 2024:The meaning of
a
is left for the reader to decide :p(I don’t think it has any meaning, just something to distinguish from
multi
. It’s too late to change it since people are already using this.)Christewart commented at 7:34 pm on May 6, 2024: contributorI wont be able to implement the test for this anytime soon to verify they work. Are these implemented in the bitcoin core test suite?BIP 387: multi_a() descriptor 945b281155achow101 force-pushed on May 6, 2024achow101 commented at 10:27 pm on May 6, 2024: memberAre these implemented in the bitcoin core test suite?
Some are. I pulled a few from there, although I don’t think there were any
sortedmulti_a
ones, so those are new in this BIP.jonatack commented at 0:00 am on May 7, 2024: contributorACK 945b281155f12d50be76ade722cbb1a04681caa0jonatack merged this on May 7, 2024jonatack closed this on May 7, 2024
achow101 laanwj jonatack ChristewartLabels
New BIP
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-01 00:10 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me