BIP draft: Raw() as subscript for descriptors
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 https://github.com/bitcoin/bitcoin/issues/24114#issuecomment-1127978154, provides historical context and highlights other valid use cases enabled by this behavior change.
Has this already been submitted to the mailing list?
Not yet. Will do next year.
Concept ACK I guess
Hey @furszy, has this been presented to the mailing list? Did you see @ismaelsadeeq’s review?
Hi @furszy, are you still working on this BIP draft?
Sorry for the delay. I started writing some updates a while ago but haven’t had enough time to finish them. Unfortunately, I won’t have time over the next two months either. The idea was also to check https://github.com/bitcoin/bitcoin/pull/30243 so we could align some concepts, but that’s still buried in my work queue as well. No problem at all if you want to close it so someone else can take over. I can always pick it up again later.