Author: darosior 2021-09-06 06:16:44
Published on: 2021-09-06T06:16:44+00:00
In a recent discussion on the Bitcoin-dev mailing list, Jeremy Rubin pointed out a flaw in the Sequence lock implementation with respect to upgradability. He suggested that this issue might be protected against by some transaction level policy but couldn't find any such policy in policy.cpp. In response, David A. Harding asked if this wasn't why BIP68 requires using tx.version=2 and suggested deploying any new nSequence rules with tx.version>2 instead. Jeremy had previously suggested enforcing minimality in the context of Miniscript a few months ago. However, he found flaws in the upgradable semantic in script as well as in the transaction nSequence, making it weird/bad to change the semantic in transaction version 3. To fix this issue, he provided a patch in his blog post at https://rubin.io/bitcoin/2021/09/03/upgradable-nops-flaw/. To ensure that the upgradable semantic is enforced correctly, Jeremy's code checks whether the transaction's version number is set high enough to trigger BIP 68 rules. If not, the code fails. He also emphasized the need for a fix, providing further proof of the problem.
Updated on: 2023-06-15T01:27:52.248305+00:00