BIP draft: Raw() as subscript for descriptors #1721
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.