Skip to content

BIP Draft: rawtr() Output Script Descriptors - #2251

Open
jeanpablojp wants to merge 1 commit into
bitcoin:masterfrom
jeanpablojp:rawtr-descriptor
Open

BIP Draft: rawtr() Output Script Descriptors#2251
jeanpablojp wants to merge 1 commit into
bitcoin:masterfrom
jeanpablojp:rawtr-descriptor

Conversation

@jeanpablojp

@jeanpablojp jeanpablojp commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

This is a BIP draft for the rawtr() script expression, following the style of BIPs 381-387. Bitcoin Core has implemented it since 24.0 and it has never had a BIP; sipa noted that on #2050 in March.

While writing this I did some digging and found rawtr in more places than I expected. BIP 390 allows musig() inside it, and two of the BIP 390 test vectors are rawtr() descriptors, so a published BIP already points at an expression no BIP defines. Outside Core it's a gap people route around: rust-miniscript prints rawtr_not_supported_yet where a descriptor should be, and bdk-ffi's tests cite rawtr as BIP-386.

Mail list discussion: https://groups.google.com/g/bitcoindev/c/CCZN_qQ5C1s

@achow101

Copy link
Copy Markdown
Member

Concept ACK

@danielabrozzoni danielabrozzoni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This was a very good read, thanks for submitting! It's coincise and easy to understand.
Looks good to me! Though I think someone who knows more about descriptors than I do should also take a look :)

EDIT: I just realized, you should change BIP380's Appendix B to point to this page.

Comment thread bip-rawtr.mediawiki Outdated
Title: rawtr() Output Script Descriptors
Authors: Jean Moreira <jeanpablo.jp@hotmail.com>
Status: Draft
Type: Specification

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the type should be "Informational", similarly to other descriptor BIPs:

BIP Description Type
380 Output Script Descriptors (general) Informational
381 pk(), pkh(), multi() etc. Informational
382 wpkh(), wsh() Informational
383 sh() Informational
384 combo() Informational
385 raw(), addr() Informational
386 tr() Informational
387 multi_a(), sortedmulti_a() Informational
389 Multipath descriptors Informational
390 musig() (used inside rawtr()) Informational

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You are right, I just pushed the change.
Thanks.

@jeanpablojp

Copy link
Copy Markdown
Contributor Author

@danielabrozzoni about the Appendix B, BIP 3 says only the editor assigns the number, and until then the BIP is referred to by name. I can add the row now pointing to bip-rawtr.mediawiki, or wait for the editor to assign the number in this PR and register it with the number. Which do you prefer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants