← Back to Bitcoin Improvement Proposals
BIPinformationalopcodestransactions

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

No reviews
Roasbeef·Updated Feb 13, 2019·0 reviews·0 attestations·View source
Collections:BIPs — Merged

Specification

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.

Discussion (0 threads)

Loading discussions...