Skip to content
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

BIP draft: Raw() as subscript for descriptors #1721

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

furszy
Copy link
Member

@furszy furszy commented Dec 17, 2024

Allowing arbitrary hex data to be wrapped in sh(), wsh(), or even within the TREE
argument of a tr(KEY, TREE) descriptor enables the representation of currently
inexpressible 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 ability
to 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.

@jonatack jonatack changed the title Raw() as subscript for descriptors BIP draft: Raw() as subscript for descriptors Dec 17, 2024
@furszy furszy force-pushed the 2024_descriptors_raw_as_subscript branch 2 times, most recently from 634d18a to 47fed6d Compare December 18, 2024 15:11
bip-0391.mediawiki Outdated Show resolved Hide resolved
@furszy furszy force-pushed the 2024_descriptors_raw_as_subscript branch from 47fed6d to 1b3ef5c Compare December 18, 2024 22:19
@furszy furszy force-pushed the 2024_descriptors_raw_as_subscript branch from 1b3ef5c to a67af04 Compare December 20, 2024 19:00

==Specification==

Allow raw(HEX) to be accepted within the context of `sh()`, `wsh()` and `tr()` descriptors.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you’re mixing up MediaWiki and Markdown. If you want to use mediawiki, you would use <tt>sh()</tt>. It’s been permitted to submit BIPs in Markdown for a while though, if you prefer that.

Suggested change
Allow raw(HEX) to be accepted within the context of `sh()`, `wsh()` and `tr()` descriptors.
Allow raw(HEX) to be accepted within the context of <tt>sh()</tt>, <tt>wsh()</tt> and <tt>tr()</tt> descriptors.

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