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

pull furszy wants to merge 1 commits into bitcoin:master from furszy:2024_descriptors_raw_as_subscript changing 1 files +101 −0
  1. furszy commented at 9:19 pm on December 17, 2024: member

    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.

  2. jonatack added the label New BIP on Dec 17, 2024
  3. jonatack renamed this:
    Raw() as subscript for descriptors
    BIP draft: Raw() as subscript for descriptors
    on Dec 17, 2024
  4. furszy force-pushed on Dec 18, 2024
  5. furszy force-pushed on Dec 18, 2024
  6. in bip-0391.mediawiki:26 in 47fed6d9f0 outdated
    21+
    22+This BIP is licensed under the BSD 2-clause license.
    23+
    24+==Motivation==
    25+
    26+To ensure no information is lost during conversion to descriptors, it’s useful to wrap
    


    sipa commented at 7:36 pm on December 18, 2024:
    This seems to appear somewhat out of the blue; the reader isn’t familiar with the fact that Bitcoin Core is working on migration from pre-descriptor wallets to descriptor wallet, and I don’t think it matters if you phrase it as being able to express information that’s currently inexpressible.

    furszy commented at 10:19 pm on December 18, 2024:
    absolutely, thanks!
  7. furszy force-pushed on Dec 18, 2024
  8. furszy force-pushed on Dec 20, 2024
  9. in bip-0391.mediawiki:44 in a67af04615 outdated
    39+participating in signing a script without knowing all participants' keys, relying solely
    40+on the script structure.
    41+
    42+==Specification==
    43+
    44+Allow raw(HEX) to be accepted within the context of `sh()`, `wsh()` and `tr()` descriptors.
    


    murchandamus commented at 7:31 pm on December 20, 2024:

    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.

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

    furszy commented at 10:17 pm on December 23, 2024:

    It’s been permitted to submit BIPs in Markdown for a while though, if you prefer that.

    Ok yes, that’s better. Will inline the doc to use the `` markdown syntax.

  10. furszy force-pushed on Dec 24, 2024
  11. in bip-0391.mediawiki:41 in 9c5985184f outdated
    36+Additionally, as noted [https://github.com/bitcoin/bitcoin/issues/24114#issuecomment-1127978154 here],
    37+there are other useful scenarios for this feature. For example, it allows representing
    38+in a descriptor that we lack full knowledge of all solvability paths but can still solve
    39+the output, such as a taproot tree where we know only one of its paths, or even also
    40+participating in signing a script without knowing all participants' keys, relying solely
    41+on the script structure.
    


    murchandamus commented at 6:29 pm on December 27, 2024:
    This paragraph is hard to parse, perhaps you could split the second sentence into multiple sentences.
  12. in bip-0391.mediawiki:50 in 9c5985184f outdated
    45+### For `sh()` and `wsh()` descriptors:
    46+`raw(HEX)` must represent the arbitrary script data within the provided context.
    47+This for example means that a P2SH output script (OP_HASH160 <hash160(HEX_script)> OP_EQUAL)
    48+must be created from the provided hex data when a `sh(raw(HEX))` descriptor is provided.
    49+
    50+Parallely, a P2WSH output script (OP_0 <hash160(HEX_script)>) must be created from the provided
    


    murchandamus commented at 6:30 pm on December 27, 2024:
    0Parallelly, a P2WSH output script (OP_0 <hash160(HEX_script)>) must be created from the provided
    
  13. in bip-0391.mediawiki:93 in 9c5985184f outdated
    88+* Non-hex in `rawnode`: `tr(a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd, rawnode(<complete me with a 32-bit non-hex hash>))`
    89+* `raw` in the key path `tr`: `tr(raw(asdf), pk(key))`
    90+
    91+==Backwards Compatibility==
    92+
    93+`raw()` as a subscript descriptors use the format and general operation specified in [[bip-0380.mediawiki|380]].
    


    murchandamus commented at 6:32 pm on December 27, 2024:
    0`raw()` as subscript descriptors use the format and general operation specified in [[bip-0380.mediawiki|380]].
    
  14. in bip-0391.mediawiki:10 in 9c5985184f outdated
     5+  Author: Pieter Wuille pieter@wuille.net
     6+          Matias Furszyfer mfurszy@protonmail.com
     7+  Comments-Summary: No comments yet.
     8+  Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-???
     9+  Status: Draft
    10+  Type: Informational
    


    murchandamus commented at 6:33 pm on December 27, 2024:
    0  Type: Standards Track
    
  15. in bip-0391.mediawiki:11 in 9c5985184f outdated
     6+          Matias Furszyfer mfurszy@protonmail.com
     7+  Comments-Summary: No comments yet.
     8+  Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-???
     9+  Status: Draft
    10+  Type: Informational
    11+  Created: 2024-12-16
    


    murchandamus commented at 6:35 pm on December 27, 2024:

    The Created Header stores the date a BIP was assigned a number:

    0  Created: ?
    
  16. in bip-0391.mediawiki:6 in 9c5985184f outdated
    0@@ -0,0 +1,98 @@
    1+<pre>
    2+  BIP: ???
    3+  Layer: Applications
    4+  Title: raw() as subscript in Output Script Descriptors
    5+  Author: Pieter Wuille pieter@wuille.net
    6+          Matias Furszyfer mfurszy@protonmail.com
    


    murchandamus commented at 6:36 pm on December 27, 2024:
    0  Author: Pieter Wuille <pieter@wuille.net>
    1          Matias Furszyfer <mfurszy@protonmail.com>
    
  17. murchandamus commented at 6:37 pm on December 27, 2024: contributor
    Could maybe use a bit more rationale. Has this already been submitted to the mailing list?
  18. furszy force-pushed on Dec 27, 2024
  19. furszy force-pushed on Dec 27, 2024
  20. Raw() as subscript for descriptors 3197eb9b27
  21. furszy force-pushed on Dec 27, 2024
  22. furszy commented at 8:51 pm on December 27, 2024: member

    Has this already been submitted to the mailing list?

    Not yet. Will do next year.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-01-21 07:10 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me