bips icon indicating copy to clipboard operation
bips copied to clipboard

BIP draft: Raw() as subscript for descriptors

Open furszy opened this issue 1 year ago • 3 comments

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.

furszy avatar Dec 17 '24 21:12 furszy

Has this already been submitted to the mailing list?

Not yet. Will do next year.

furszy avatar Dec 27 '24 20:12 furszy

Concept ACK I guess

achow101 avatar Feb 28 '25 17:02 achow101

Hey @furszy, has this been presented to the mailing list? Did you see @ismaelsadeeq’s review?

murchandamus avatar Jun 20 '25 22:06 murchandamus

Hi @furszy, are you still working on this BIP draft?

jonatack avatar Jul 23 '25 22:07 jonatack

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.

furszy avatar Jul 24 '25 01:07 furszy