Skip to content

Support MuSig2 address display - #863

Draft
Sjors wants to merge 16 commits into
bitcoin-core:masterfrom
Sjors:2026/10/display-address-musig2
Draft

Sjors wants to merge 16 commits into
bitcoin-core:masterfrom
Sjors:2026/10/display-address-musig2

Conversation

@Sjors

@Sjors Sjors commented Oct 24, 2026

Copy link
Copy Markdown
Member

Based on and split off from #852.

Device / pinned firmware MuSig2 key-path
Ledger modern / 2.5.0 Yes
Coldcard Edge / 6.6.0X Yes

Sjors added 16 commits August 26, 2026 07:12
parse_pubkey() splits at the first comma, which cannot handle key
expressions that themselves contain commas. No behavior change for
valid descriptors.
Move the derivation path checks into _check_bip388_deriv_path() and
the suffix serialization into _get_bip388_deriv_suffix(), so key
expression types with a different placeholder prefix can reuse them.
No behavior change.
Introduce get_derivation_providers() and route the existing key collection
and derive() through it, preserving repeated keys and traversal order.
Cover repeated key expressions with different suffixes and assign one
BIP 388 key-information entry and placeholder index to each key. Keep
derivation traversal separate so every occurrence is still derived.
Registered descriptor policies may contain Miniscript expressions in P2WSH. Parse their structure so keys land in the BIP 388 key information vector and the same policy validation applies as for other descriptors. Miniscript type checking remains the responsibility of the device.
Factor the existing taproot internal-key parsing and index advancement into
_parse_key_expr(), without accepting additional key expression types.
Parse musig() key expressions as specified in BIP 390, checked against
its test vectors. Participants may carry derivation paths only when the
aggregate key has none; in that case derivation happens on the
participant keys before aggregation. Aggregate key derivation must be
unhardened and requires extended public key participants.

The aggregate key carries the derivation path suffix, so
derivation-related callers use the new get_derivation_providers(),
while get_pubkey_providers() returns the participant keys, matching
the BIP 388 Key information vector. BIP 388 does not allow derivation
before aggregation, so get_bip388_placeholder() rejects it.
Move suffix parsing into a shared helper without changing how valid or
malformed paths are interpreted.
@Sjors Sjors changed the title 2026/10/display address musig2 Support MuSig2 address display Oct 24, 2026
This was referenced Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant