Questions tagged [checksequenceverify]

25 questions
14
votes
1 answer

What does OP_CHECKSEQUENCEVERIFY (OP_CSV) do?

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?
Nick ODell
  • 29,184
  • 11
  • 69
  • 129
12
votes
1 answer

What does the sequence in a transaction input mean?

Following a transaction input: What is the meaning of the sequence number? What does the 4294967295 tell me?
Michael
  • 175
  • 5
7
votes
2 answers

Why does the time interval for OP_CSV need to be in the nSequence field when it is already in the script?

BIP68 prescribes how to put the time interval into the nSequence field but then BIP112 tells you that it is possible to specify it in the script with a notation like "30d". Why are there two ways of doing the same thing? Are they both necessary, or…
6
votes
1 answer

Sequence number semantics

Reading the following BIPs: 68, 112, 125, I got a few questions about the sematics of sequence numbers. As far as I understood, in version 1 transactions, sequence numbers have the following meaning: If any input has a sequence less than…
5
votes
1 answer

Why do Anchor Outputs need to enforce an nSequence of 1?

Quote from https://bitcoinops.org/en/topics/anchor-outputs: As of this writing, the most recent versions of the design add two outputs to the commitment transaction—one for each LN party—and require all other outputs in the commitment transaction…
5
votes
2 answers

What is transaction "finality"?

bitcoind IsFinalTx() as seen here checks the properties of a transaction in this order: Is nLockTime exactly 0? That's final. return. If it's not 0, is it below the current block height / time? If so, it's final. return. Ensure that every tx input…
pinhead
  • 4,932
  • 2
  • 23
  • 38
4
votes
1 answer

Does the bitcoin testnet3 network support Segwit and OP_CSV?

As far as I know, Segregated Witness and OP_CHECKSEQUENCEVERIFY are the last features needed to be able to fully implement a trustless bi-directional payment channel, from start to finish. (Technically you don't need OP_CHECKSEQUENCEVERIFY, it just…
morsecoder
  • 14,008
  • 2
  • 42
  • 92
4
votes
1 answer

Does `0 OP_CSV` force the spending transaction to signal BIP125 replacability?

If I send bitcoins to an output whose script will execute 0 OP_CHECKSEQUENCEVERIFY when it is spent, does that require the spender to set the BIP125 signal indicating that the transaction is replacable? For example, in cases where participants in a…
3
votes
1 answer

Why CHECKLOCKTIMEVERIFY and CHECKSEQUENCEVERIFY opcodes have to be succeeded with DROP Opcode?

Opcodes that end in VERIFY generally do not leave anything on the stack. What's so different and the reasoning when designing these opcodes that CHECKLOCKTIMEVERIFY and CHECKSEQUENCEVERIFY opcodes leaves something on the stack and hence has to be…
Ugam Kamat
  • 7,263
  • 2
  • 13
  • 38
3
votes
2 answers

At what height exactly can a relative time-locked output be spent?

Assume a UTXO created in block n with the output using a relative timelock of s blocks (s OP_CHECKSEQUENCEVERIFY). What is the lowest blockheight which may contain a transaction spending that UTXO? Bonus: At what height will such a transaction be…
Murch
  • 71,155
  • 33
  • 180
  • 600
2
votes
1 answer

Sequence valid before time

I'm studying sequence, and I set a transaction valid after 512 seconds. First of all I use regtest and I start from clean blockchain, after that I mine 114 blocks. At this point miner creates a transaction and tries to send it My decode…
monkeyUser
  • 960
  • 1
  • 7
  • 18
2
votes
2 answers

Error: non-mandatory-script-verify-flag (unknown error) (code 64) with OP_CHECKSEQUENCEVERIFY (OP_CSV)

I am trying to implement a relative time lock on a regtest network using OP_CSV and keep getting this error when I try to consume the locked BTC. I am creating a UTXO with the scriptPubKey as 10 OP_CHECKSEQUENCEVERIFY OP_DROP which would allow…
2
votes
3 answers

CHECKSEQUENCEVERIFY After x time of last transaction

Is there a way where i can have a multi-sig address which will allow one of the signers to use only their single key after a set amount of time after each transaction/update on the address? I want to have an address that requires 2 people to sign…
PixelPaul
  • 121
  • 1
2
votes
0 answers

Locktime requirement not satisfied when locktime set to 1 in p2sh

I've created the following script on testnet: OP_IF 2 3 OP_CHECKMULTISIG OP_ELSE 1 OP_CHECKSEQUENCEVERIFY OP_DROP OP_CHECKSIG OP_ENDIF I am currently able to unlock the funds when I…
2
votes
1 answer

Question about nSequence with regard to bip-0112 and bip-0068

So far my understanding is that when you create an op_csv output the value entered before the OP_NOP3 is an arbitary number, lets say 10. This number can be interpreted as block based of time based depending on the nSequence value set when spending…
MandelDuck
  • 234
  • 1
  • 6
1
2