[0.11] Backport BIP112 CHECKSEQUENCEVERIFY mempool-only #7693

pull btcdrak wants to merge 3 commits into bitcoin:0.11 from btcdrak:bip112-backport-0.11 changing 9 files +270 −3
  1. btcdrak commented at 7:38 PM on March 15, 2016: contributor

    No description provided.

  2. BIP112: Implement CHECKSEQUENCEVERIFY
    - Replace NOP3 with CHECKSEQUENCEVERIFY (BIP112)
      <nSequence> CHECKSEQUENCEVERIFY -> <nSequence>
    - Fails if txin.nSequence < nSequence, allowing funds of a txout to be locked for a number of blocks or a duration of time after its inclusion in a block.
    - Pull most of CheckLockTime() out into VerifyLockTime(), a local function that will be reused for CheckSequence()
    - Add bitwise AND operator to CScriptNum
    - Enable CHECKSEQUENCEVERIFY as a standard script verify flag
    - Transactions that fail CSV verification will be rejected from the mempool, making it easy to test the feature. However blocks containing "invalid" CSV-using transactions will still be accepted; this is *not* the soft-fork required to actually enable CSV for production use.
    dd100b260c
  3. Separate CheckLockTime() and CheckSequence() logic
    For the sake of a little repetition, make code more readable.
    e5405497c0
  4. Code style fix.
    This if statement is a little obtuse and using braces here
    improves readability.
    cec77c19f8
  5. btcdrak renamed this:
    [0.11 backport] BIP112 CHECKSEQUENCEVERIFY mempool-only
    [0.11] Backport BIP112 CHECKSEQUENCEVERIFY mempool-only
    on Mar 15, 2016
  6. in src/test/data/tx_valid.json:None in cec77c19f8
     228 | @@ -229,5 +229,93 @@
     229 |  [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0xc5b93064159b3b2d6ab506a41b1f50463771b988 EQUAL"]],
     230 |  "0100000001000100000000000000000000000000000000000000000000000000000000000000000000030251b1000000000100000000000000000001000000", "P2SH,CHECKLOCKTIMEVERIFY"],
     231 |  
     232 | +["A transaction with a non-standard DER signature."],
     233 | +[[["b1dbc81696c8a9c0fccd0693ab66d7c368dbc38c0def4e800685560ddd1b2132", 0, "DUP HASH160 0x14 0x4b3bd7eba3bc0284fd3007be7f3be275e94f5826 EQUALVERIFY CHECKSIG"]],
     234 | +"010000000132211bdd0d568506804eef0d8cc3db68c3d766ab9306cdfcc0a9c89616c8dbb1000000006c493045022100c7bb0faea0522e74ff220c20c022d2cb6033f8d167fb89e75a50e237a35fd6d202203064713491b1f8ad5f79e623d0219ad32510bfaa1009ab30cbee77b59317d6e30001210237af13eb2d84e4545af287b919c2282019c9691cc509e78e196a9d8274ed1be0ffffffff0100000000000000001976a914f1b3ed2eda9a2ebe5a9374f692877cdf87c0f95b88ac00000000", "P2SH"],
    


    morcos commented at 1:08 AM on March 16, 2016:

    cherry-pick error?

  7. in src/test/data/tx_invalid.json:None in cec77c19f8
     192 | @@ -193,5 +193,63 @@
     193 |  [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0xc5b93064159b3b2d6ab506a41b1f50463771b988 EQUAL"]],
     194 |  "0100000001000100000000000000000000000000000000000000000000000000000000000000000000030251b1000000000100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"],
     195 |  
     196 | +["A transaction with a non-standard DER signature."],
     197 | +[[["b1dbc81696c8a9c0fccd0693ab66d7c368dbc38c0def4e800685560ddd1b2132", 0, "DUP HASH160 0x14 0x4b3bd7eba3bc0284fd3007be7f3be275e94f5826 EQUALVERIFY CHECKSIG"]],
     198 | +"010000000132211bdd0d568506804eef0d8cc3db68c3d766ab9306cdfcc0a9c89616c8dbb1000000006c493045022100c7bb0faea0522e74ff220c20c022d2cb6033f8d167fb89e75a50e237a35fd6d202203064713491b1f8ad5f79e623d0219ad32510bfaa1009ab30cbee77b59317d6e30001210237af13eb2d84e4545af287b919c2282019c9691cc509e78e196a9d8274ed1be0ffffffff0100000000000000001976a914f1b3ed2eda9a2ebe5a9374f692877cdf87c0f95b88ac00000000", "P2SH,DERSIG"],
    


    morcos commented at 1:08 AM on March 16, 2016:

    cherry-pick error?

  8. morcos commented at 1:18 AM on March 16, 2016: member

    I guess those DER tx tests should be in 0.11 anyway, so maybe leave them? i don't know.

  9. jonasschnelli added the label Consensus on Mar 16, 2016
  10. btcdrak commented at 5:33 PM on March 18, 2016: contributor

    closing for #7716

  11. btcdrak closed this on Mar 18, 2016

  12. btcdrak deleted the branch on Dec 3, 2016
  13. DrahtBot locked this on Sep 8, 2021
Contributors
Labels

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: 2026-04-16 18:15 UTC

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