Skip to content

390: Allow repeated participant pubkeys#1867

Merged
murchandamus merged 1 commit intobitcoin:masterfrom
achow101:390-clarifications
Jun 18, 2025
Merged

390: Allow repeated participant pubkeys#1867
murchandamus merged 1 commit intobitcoin:masterfrom
achow101:390-clarifications

Conversation

@achow101
Copy link
Member

@achow101 achow101 commented Jun 5, 2025

As posted to the mailing list, 390 should allow participant public keys to be repeated.

Copy link
Contributor

@rkrux rkrux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 6020858

@achow101 achow101 force-pushed the 390-clarifications branch from 6020858 to 19c46bd Compare June 6, 2025 18:05
Comment on lines +59 to +62
For these <tt>musig()</tt> expressions, the KEY expressions contained within must be xpubs or derived from
xpubs, and cannot contain child derivation as specified by a <tt>/*</tt>, <tt>/*'</tt>, or <tt>/*h</tt>.
This restriction on KEY expression child derivation applies even when the derivation steps following the
<tt>musig()</tt> do not include <tt>/*</tt>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this hard to understand.

Does this mean that one musig() expression may not include two keys where one of the keys is a child derivation of the other key?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's saying that musig(xpub1/*,xpub2/*)/3/4 is disallowed.

I do not see how you could have interpreted it in a way that this was talking about KEY expressions being relative to each other.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth adopting the term "wildcard index" from bip 88? Then you could specify it as "the KEY expression contained within a musig() expression cannot include a wildcard index (ie a /*, /*', or /*h)"? (Or if not that, some other way of talking about derivation templates that generate many keys versus a fixed derivation that always generates a particular key).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding an example like the one mentioned above can make the text clearer.

Suggested change
For these <tt>musig()</tt> expressions, the KEY expressions contained within must be xpubs or derived from
xpubs, and cannot contain child derivation as specified by a <tt>/*</tt>, <tt>/*'</tt>, or <tt>/*h</tt>.
This restriction on KEY expression child derivation applies even when the derivation steps following the
<tt>musig()</tt> do not include <tt>/*</tt>.
For these <tt>musig()</tt> expressions, the KEY expressions contained within must be xpubs or derived from
xpubs, and cannot contain child derivation as specified by a <tt>/*</tt>, <tt>/*'</tt>, or <tt>/*h</tt>.
This restriction on KEY expression child derivation applies even when the derivation steps following the
<tt>musig()</tt> do not include <tt>/*</tt>. (Ex: `musig(xpub1/*,xpub2/*)/3/4` is disallowed).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth adopting the term "wildcard index" from bip 88?

Perhaps, but I'd prefer to do that in a followup.

Adding an example like the one mentioned above can make the text clearer.

I don't like adding examples to the specification section. However, I did add a failure test case for it.

Copy link
Contributor

@rkrux rkrux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 19c46bd

Copy link
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 19c46bd

@harding
Copy link
Contributor

harding commented Jun 10, 2025

ACK 19c46bd

FYI, the Friday, June 13th, Optech newsletter will be relaying @achow101's mailing list request for feedback about this change to give it wider exposure, so if there's still an outstanding concern that someone has already implemented duplicate checking, it might be useful to wait another week to merge this.

asim1019

This comment was marked as spam.

@achow101
Copy link
Member Author

I haven't heard anyone say that this change would be an issue for them. Were there any comments about it after the Optech recap? If not, then I think this is ready to be merged.

@jonatack
Copy link
Member

Not that it has much reach, but I also asked on X and had no reply: https://x.com/jonatack/status/1930728964005265563

@bitcoin bitcoin deleted a comment from Koki1610 Jun 18, 2025
@achow101 achow101 force-pushed the 390-clarifications branch from 6791838 to 46aa9f6 Compare June 18, 2025 19:22
@achow101
Copy link
Member Author

achow101 commented Jun 18, 2025

Dropped the second commit as the wording seems to be confusing, will open a new PR with the clarification from the second commit.

@achow101 achow101 force-pushed the 390-clarifications branch from 46aa9f6 to 4d544e5 Compare June 18, 2025 19:30
@achow101
Copy link
Member Author

Added a test vector for the duplicate participant.

@achow101 achow101 force-pushed the 390-clarifications branch from 4d544e5 to 530b91d Compare June 18, 2025 19:32
Copy link
Member

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@murchandamus murchandamus merged commit 879ba82 into bitcoin:master Jun 18, 2025
4 checks passed
Copy link
Contributor

@rkrux rkrux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post merge ACK

390: Allow repeated participant pubkeys and disallow ranged participants with aggregate derivation.

The PR title can be updated though to remove the second clause since the second commit was removed.

@murchandamus murchandamus changed the title 390: Allow repeated participant pubkeys and disallow ranged participants with aggregate derivation. 390: Allow repeated participant pubkeys Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants