OP_SECURETHEBAG (supersedes OP_CHECKOUTPUTSVERIFY)



Summary:

Jeremy Rubin has announced the retraction of OP_CHECKOUTPUTSHASHVERIFY in favor of OP_SECURETHEBAG. The new method does more or less the same thing but fixes malleability issues and lifts the single output restriction to a known number of inputs restriction. According to Rubin, OP_CHECKOUTPUTSVERIFY had some issues with malleability of version and locktime, whereas OP_SECURETHEBAG commits to both of these values. It also lifts the restriction that OP_CHECKOUTPUTSVERIFY had to be spent as only a single input, instead committing to the number of inputs which allows for more flexibility while keeping it easy to get the same single output restriction. A BIP is available at https://github.com/JeremyRubin/bips/blob/op-secure-the-bag/bip-secure-the-bag.mediawiki and the implementation can be found at https://github.com/JeremyRubin/bitcoin/tree/secure_the_bag. Rubin also asked for discussion on how best to eliminate the PUSHDATA and treat OP_SECURETHEBAG like a pushdata directly.


Updated on: 2023-06-13T19:14:01.299747+00:00