CLTV IsSuperMajority() soft-fork, rebased against v0.11.0 #6707

pull petertodd wants to merge 9 commits into bitcoin:0.11 from petertodd:cltv-soft-fork-v0.11 changing 17 files +561 −14
  1. petertodd commented at 2:26 am on September 21, 2015: contributor
    Everything required to backport CLTV to v0.11, including the soft-fork itself.
  2. laanwj added the label Consensus on Sep 24, 2015
  3. laanwj commented at 4:12 pm on September 26, 2015: member
    It may make sense to backport the “softforks” field in getblockchaininfo to 0.11 as well, to give people a way to check how far the fork is along.
  4. petertodd commented at 6:34 pm on September 27, 2015: contributor

    @laanwj Done!

    Heh, I actually need to add that last commit to #6351, but the getblockchaininfo code was added after it and I’d rather not rebase it if I can avoid it; these two backport patches refer to commits in #6351 by commit ID and I don’t want to change that. I’ll fix that after #6351 is merged.

  5. 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
    684636ba67
  6. Move LOCKTIME_THRESHOLD to src/script/script.h
    Will now be needed by CHECKLOCKTIMEVERIFY code.
    
    Rebased-From: 48e9c57cf06352f890eac4285ae022d8746cf3fd
    6ec08db338
  7. 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
    4fa7a048d1
  8. 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
    6ea5ca4b4e
  9. Add CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic
    Based on the earlier BIP66 soft-fork logic implemented by Pieter
    Wuille's 5a47811da5158df763aa2fca09ce646ee0c51e7b
    
    Rebased-From: 287f54fc90c29301faede8d4ac2ea24a91441917
    5e82e1c8f5
  10. 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
    c5a27f4fb3
  11. 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
    70a427b2b5
  12. Show softfork status in getblockchaininfo
    Rebased-From: 5ed10793c2df970d07cecd760c42205e68779e83
    ba1da90b33
  13. Add BIP65 to getblockchaininfo softforks list
    Rebased-From: 54a200ac9ad8909303ccf1ac49c291e0c2b5fb23
    6af25b0f64
  14. petertodd force-pushed on Oct 8, 2015
  15. petertodd commented at 3:51 pm on October 8, 2015: contributor
    Rebased
  16. dcousens commented at 11:34 pm on October 13, 2015: contributor
    once-over ACK
  17. btcdrak commented at 8:46 pm on October 22, 2015: contributor
    utACK
  18. laanwj merged this on Oct 23, 2015
  19. laanwj closed this on Oct 23, 2015

  20. laanwj referenced this in commit fc7f0ee28c on Oct 23, 2015
  21. 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: 2024-11-17 09:12 UTC

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