-
Notifications
You must be signed in to change notification settings - Fork 5.6k
BIP draft: Raw() as subscript for descriptors #1721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
634d18a
to
47fed6d
Compare
1b3ef5c
to
a67af04
Compare
a67af04
to
9c59851
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could maybe use a bit more rationale. Has this already been submitted to the mailing list?
bf8415b
to
88f6b2e
Compare
88f6b2e
to
3197eb9
Compare
Not yet. Will do next year. |
there are other useful scenarios for this feature. For example, it allows representing | ||
in a descriptor that we lack complete knowledge of all solvability paths but can still | ||
solve the output. This includes cases like a taproot tree where we know only one of its |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit unclear for me, can you clarify what do you mean by can still solve the output?
If a different version is required for any use case, a new BIP could introduce `raw(HEX, VERSION)` | ||
in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should just support raw(HEX, VERSION)
and be forward compatible which goes in line with what was suggested in the bitcoin/bitcoin#24114
Concept ACK I guess |
Allowing arbitrary hex data to be wrapped in
sh()
,wsh()
, or even within theTREE
argument of a
tr(KEY, TREE)
descriptor enables the representation of currentlyinexpressible information.
Specifically, the absence of this feature limits the representation of non-standard redeem
and witness scripts. This occurs because they can currently only be represented as top-level
raw(HEX)
descriptors, which retain only the output script information and lack the abilityto preserve the actual script.
This work stemmed from discussions with @sipa and @achow101 about the legacy
wallet migration path, particularly while investigating migrated descriptors that lacked
information about the script they were supposedly migrated from.
Additionally, issue #24114, specifically bitcoin/bitcoin#24114 (comment), provides
historical context and highlights other valid use cases enabled by this behavior change.