BIP-0158: add test cases for OP_RETURN with op codes, empty filter #760

pull Roasbeef wants to merge 3 commits into bitcoin:master from Roasbeef:bip-158-test-vectors changing 5 files +73 −8
  1. Roasbeef commented at 2:34 AM on February 13, 2019: contributor

    In this commit, we add a new test case for a filter built from a block that has a transaction with an OP_RETURN which isn't followed by only push data items. The prior implementation for btcd (which was used to generated these test vectors), had a stricter check which caused it to add extra items to the filter. We also add a case of a block that has a single coinbase transaction, with that transaction having only an OP_RETURN output. As a result, that filter will be "empty", and is signalled by by a single zero (0x00) byte.

    In order to make building the code that makes the test vectors reproducible, we've added go.mod and go.sum files as well.

  2. BIP-0158: add test cases for OP_RETURN with op codes, empty filter
    In this commit, we add a new test case for a filter built from a block
    that has a transaction with an OP_RETURN which isn't followed by only
    push data items. The prior implementation for btcd (which was used to
    generated these test vectors), had a stricter check which caused it to
    add extra items to the filter. We also add a case of a block that has a
    single coinbase transaction, with that transaction having only an
    OP_RETURN output. As a result, that filter will be "empty", and is
    signalled by by a single zero (0x00) byte.
    
    In order to make building the code that makes the test vectors
    reproducible, we've added go.mod and go.sum files as well.
    dd3948b474
  3. tuxcanfly commented at 3:07 AM on February 13, 2019: none

    related: #733

  4. BIP-0158: clarify OP_RETURN handling for filters
    In this commit, we clarify how we handle `OP_RETURN` outputs for regular
    filters. The prior language was a bit ambiguous, so we hope to make it
    as explicit as possible.
    1330853c3e
  5. fixup! BIP-0158: clarify OP_RETURN handling for filters 5ab481ce53
  6. in bip-0158.mediawiki:284 in 1330853c3e outdated
     280 | @@ -281,10 +281,10 @@ following items for each transaction in a block:
     281 |  
     282 |  Any "nil" items MUST NOT be included into the final set of filter elements.
     283 |  
     284 | -We exclude all <code>OP_RETURN</code> outputs in order to allow filters to
     285 | -easily be committed to in the future via a soft-fork. A likely area for future
     286 | -commitments is an additional <code>OP_RETURN</code> output in the coinbase
     287 | -transaction similar to the current witness commitment
     288 | +We exclude all outputs taht start with <code>OP_RETURN</code> in order to allow
    


    jimpo commented at 4:04 AM on February 13, 2019:

    typo: that

  7. luke-jr merged this on Feb 13, 2019
  8. luke-jr closed this on Feb 13, 2019

  9. azuchi referenced this in commit ed8db12f3a on Feb 14, 2019

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: 2026-04-14 15:10 UTC

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