dcrd/txscript/data
Dave Collins ee5b56ba72
txscript: Implement CheckSequenceVerify
This modifies the script engine to replace OP_NOP3 with
OP_CHECKSEQUENCEVERIFY and adds a flag to selectively enable its
enforcement.

The new opcode examines the top item on the stack and compares it
against the sequence number of the associated transaction input in order
to allow scripts to conditionally enforce the inclusion of relative time
locks to the transaction.

The following is an overview of the changes:

- Introduce a new flag named ScriptVerifyCheckSequenceVerify to
  provide conditional enforcement of the new opcode
- Introduce a constant named OP_CHECKSEQUENCEVERIFY which has the same
  value as OP_NOP3 since it is replacing it
  - Update opcode to name mappings accordingly
- Abstract the logic that deals with time lock verification since it is
  the same for both the new opcode and OP_CHECKLOCKTIMEVERIFY
- Implement the required opcode semantics
- Add tests to ensure the opcode works as expected including when used
  both correctly and incorrectly
2017-09-21 15:58:48 -05:00
..
LICENSE Import btcscript repo into txscript directory. 2015-01-30 10:30:16 -06:00
script_invalid.json txscript: Introduce OP_SHA256. 2017-09-14 11:33:48 -05:00
script_valid.json txscript: Introduce OP_SHA256. 2017-09-14 11:33:48 -05:00
tx_invalid.json txscript: Implement CheckSequenceVerify 2017-09-21 15:58:48 -05:00
tx_valid.json txscript: Implement CheckSequenceVerify 2017-09-21 15:58:48 -05:00