CLTV IsSuperMajority() soft-fork, rebased against v0.10.2 #6706

pull petertodd wants to merge 7 commits into bitcoin:0.10 from petertodd:cltv-soft-fork-v0.10 changing 16 files +511 −15
  1. petertodd commented at 2:25 AM on September 21, 2015: contributor

    Everything required to backport CLTV to v0.10, including the soft-fork itself.

  2. laanwj added the label Consensus on Sep 24, 2015
  3. laanwj commented at 9:29 AM on September 29, 2015: member

    Somehow I cannot get travis to pass here. Even though "travis: for travis generating an extra build" is on the 0.10 branch, it still creates an extra empty test target. @theuni any idea?

  4. btcdrak commented at 5:36 PM on September 29, 2015: contributor

    @laanwj Travis has been doing this in a lot of places randomly. That extra target is bogus and can be ignored.

  5. laanwj commented at 7:42 PM on September 29, 2015: member

    @btcdrak Sure, but we managed to correct that on the branch by twiddling with the .travis.yml file (which is why it doesn't appear in master pullreqs or the 0.11 one). But somehow it does here. And it's not random, I re-triggered it three times.

  6. dexX7 commented at 11:57 PM on September 29, 2015: contributor

    Might be resolved by rebasing on top of the updated 0.10.

    The last build 81320710 also refers to a non-existing commit https://github.com/bitcoin/bitcoin/commit/0dc55a8e8992c610c84adfd364d5c88a187d779a.

  7. petertodd force-pushed on Oct 1, 2015
  8. petertodd commented at 7:24 AM on October 2, 2015: contributor

    Rebased as suggested; tests passing now.

  9. dexX7 commented at 8:32 AM on October 2, 2015: contributor

    Ah nice.

    Looks good to me. I can confirm that the code for 0.10 is the same as for master and 0.11.

    The softfork status via "getblockchaininfo" is missing in this branch (i.e. 08dbe20f7f8d8dbefb7955d4470b891ac2344ba5 + f59bc924a2af3e4dc0512eeeb5610885781f24fd) though.

  10. petertodd commented at 9:42 AM on October 2, 2015: contributor

    @dexX7 That code depends on the consensusParams stuff, which was added in v0.11.0, so I didn't bother rebasing it for v0.10.x - I expect on a small handful of miners to be using v0.10.x anyway.

  11. MarcoFalke commented at 2:10 PM on October 8, 2015: member

    Needs rebase due to SCRIPT_VERIFY_LOW_S

  12. Make CScriptNum() take nMaxNumSize as an argument
    While the existing numeric opcodes are all limited to 4-byte bignum
    arguments, new opcodes will need different limits.
    
    Rebased-From: 99088d60d8a7747c6d1a7fd5d8cd388be1b3e138
    689746841a
  13. Move LOCKTIME_THRESHOLD to src/script/script.h
    Will now be needed by CHECKLOCKTIMEVERIFY code.
    
    Rebased-From: 48e9c57cf06352f890eac4285ae022d8746cf3fd
    750d54f951
  14. Replace NOP2 with CHECKLOCKTIMEVERIFY (BIP65)
    <nLockTime> CHECKLOCKTIMEVERIFY -> <nLockTime>
    
    Fails if tx.nLockTime < nLockTime, allowing the funds in a txout to be
    locked until some block height or block time in the future is reached.
    
    Only the logic and unittests are implemented; this commit does not have
    any actual soft-fork logic in it.
    
    Thanks to Pieter Wuille for rebase.
    
    Credit goes to Gregory Maxwell for the suggestion of comparing the
    argument against the transaction nLockTime rather than the current
    time/blockheight directly.
    
    Rebased-From: bc60b2b4b401f0adff5b8b9678903ff8feb5867b
    6d0132520c
  15. petertodd force-pushed on Oct 8, 2015
  16. petertodd commented at 3:46 PM on October 8, 2015: contributor

    @MarcoFalke Rebased

  17. Enable CHECKLOCKTIMEVERIFY as a standard script verify flag
    Transactions that fail CLTV verification will be rejected from the
    mempool, making it easy to test the feature. However blocks containing
    "invalid" CLTV-using transactions will still be accepted; this is *not*
    the soft-fork required to actually enable CLTV for production use.
    
    Rebased-From: ffd75adce01a78b3461b3ff05bcc2b530a9ce994
    0e01d0f89d
  18. Add CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic
    Based on the earlier BIP66 soft-fork logic implemented by Pieter
    Wuille's 5a47811da5158df763aa2fca09ce646ee0c51e7b
    
    Rebased-From: 287f54fc90c29301faede8d4ac2ea24a91441917
    41372485ce
  19. Add RPC tests for the CHECKLOCKTIMEVERIFY (BIP65) soft-fork
    bip65-cltv.py is based on the earlier BIP66 soft-fork RPC test
    implemented by Pieter Wuille's 819bcf9b9902319176cdb1d476cacfee9b3727ec
    
    bip65-cltv-p2p.py is based on the earlier BIP66 P2P test by Suhas
    Daftuar's d76412b068d95454732aa3def95decf35251759a
    
    Rebased-From: 308257856099e82e91881ba97f741d840184727c
    6a1343b470
  20. CLTV: Add more tests to improve coverage
    Four cases included:
    
    * The CLTV operand type mismatches the tx locktime. In the script it is
      1 (interpreted as block height), but in the tx is 500000000
      (interpreted as date)
    * The stack is empty when executing OP_CLTV
    * The tx is final by having only one input with MAX_INT sequence number
    * The operand for CLTV is negative (after OP_0 OP_1 OP_SUB)
    
    Rebased-From: cb54d17355864fa08826d6511a0d7692b21ef2c9
    5dc72f8bb0
  21. petertodd force-pushed on Oct 8, 2015
  22. CodeShark commented at 4:37 AM on October 9, 2015: contributor

    Tested. Looks good to me. ACK

  23. dcousens commented at 11:33 PM on October 13, 2015: contributor

    ACK

  24. btcdrak commented at 8:47 PM on October 22, 2015: contributor

    utACK

  25. laanwj merged this on Oct 23, 2015
  26. laanwj closed this on Oct 23, 2015

  27. laanwj referenced this in commit 4b80b09f73 on Oct 23, 2015
  28. MarcoFalke locked this on Sep 8, 2021

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-17 12:15 UTC

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