14

Some people have suggested repurposing OP_NOP3 as a new opcode, OP_CHECKSEQUENCEVERIFY.

What would the new opcode do? Why is it useful? Can't the signer choose the sequence field when they sign?

Murch
  • 71,155
  • 33
  • 180
  • 600
Nick ODell
  • 29,184
  • 11
  • 69
  • 129

1 Answers1

10

OP_CHECKSEQUENCEVERIFY (a.k.a OP_RELATIVECHECKLOCKTIMEVERIFY) can do relative lock times (used for sidechains and lightning).

It basically checks, if an input's sequence number is smaller than the sequence threshold (1 << 31 = 2147483648), and if so, it will compare the nLockTime against the sequence number of the input.

More info:

Murch
  • 71,155
  • 33
  • 180
  • 600
Jonas Schnelli
  • 5,992
  • 1
  • 20
  • 33
  • 3
    OP_CSV (BIP112) only constrains the nSequence value. The comparison of nSequence against time happens independently of OP_CSV's usage (BIP68). – Pieter Wuille Feb 08 '16 at 02:41