Standardize v0 witness outputs of any length #29571

issue TheBlueMatt openend this issue on March 5, 2024
  1. TheBlueMatt commented at 10:27 pm on March 5, 2024: contributor

    Please describe the feature you’d like to see added.

    Currently any length any-version witness outputs are standard except v0 witness outputs of unknown length. This is fine, I guess, except its a bit confusing and easy to mis-implement in two-party protocols that wish to ensure the transactions they generate are standard. Is there a difference in v0 unknown-length inputs that merits them being nonstandard or should they simply be made standard?

    No response

    Describe the solution you’d like

    No response

    Describe any alternatives you’ve considered

    No response

    Please leave any additional context

    No response

  2. TheBlueMatt added the label Feature on Mar 5, 2024
  3. sipa commented at 10:37 pm on March 5, 2024: member

    Witness v0 outputs with length other than 20 or 32 are consensus-unspendable (unfortunately). Is that a good enough reason?

    BIP141:

    If the version byte is 0, but the witness program is neither 20 nor 32 bytes, the script must fail.

  4. TheBlueMatt closed this on Mar 7, 2024

  5. TheBlueMatt commented at 5:07 pm on March 7, 2024: contributor
    Does that mean it should follow the OP_RETURN length limit? :trollface:

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 15:12 UTC

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