Skip to main content

Questions tagged [checksequenceverify]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
48 views

Does OP_CSV usually cause the timelock to be more than the specified time?

OP_CSV require that the transaction spending this UTXO will have nSequence equal or greater that the value in the OP_CSV. So if the UTXO with the OP_CSV created 100 blocks ago, and set the relative ...
3 votes
2 answers
265 views

How is the clock reset in the Complex Script Example?

At the end of Mastering Bitcoin Chapter 7, in the "Complex Script Example", they ask this question in regards to the script: How do the partners "reset" the clock every 29 or 89 ...
0 votes
1 answer
72 views

What are the default timelocks in Lightning implementations today? How are they negotiated on channel opening?

There are two timelocks in Lightning that both channel counterparties must agree to if a channel is going to be opened between them. These are (from BOLT5) to_self_delay (a CSV relative timelock) ...
1 vote
1 answer
78 views

What would happen if the non-upgraded node to BIP68 receives block with the transaction where one of its nSequence is different than 0xffffffff?

What would happen if the node not upgraded to BIP68 and relative lock time meaning of nSequence get a block with the transaction where one of its nSequence is not set to 0xffffffff, but to value which ...
0 votes
1 answer
79 views

Is the image in BIP68 represented in context of little or big endian?

The image in BIP68 is as follows: So, based on the most significant bit (1<<31) we can activate or deactivate relative lock time. However, depending on which endian is implied, this image can ...
3 votes
1 answer
141 views

What does nVersion represent in Bitcoin transaction?

Have a few questions about the nVersion field in the transaction serialization format and they are related to the purpose of this field. What does this field tell us? In the sense that if it is ...
4 votes
1 answer
118 views

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 ...
3 votes
2 answers
183 views

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? ...
1 vote
1 answer
80 views

problem sending relative locktime (OP_CSV) transaction

i tried making a relative timelocked transaction with 1 block timelock (spendable after 1 confirmation) funding tx: 0fda5412da2a2615361914fad007aac73154746108d44c04529e78f6c4424655 address: ...
12 votes
1 answer
3k views

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?
2 votes
1 answer
207 views

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 ...
5 votes
1 answer
271 views

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 ...
13 votes
1 answer
4k views

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?
7 votes
2 answers
651 views

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 ...
5 votes
2 answers
522 views

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,...
1 vote
1 answer
72 views

Are both CSV and nLocktime unnecessary in Eltoo?

The Eltoo paper says "Notice that we could use nSequence for this purpose, but due to the interplay with OP_CSV we opted to use nLocktime". Now that Lau showed CSV not to be necessary, does that mean ...
1 vote
1 answer
182 views

Problem using op_checksequenceverify (op_csv) with relative time flag

i have trouble in using op_csv. The spending condition is not match to my expectation. FUNDING Redeem Script Hex: 03010040b27576a91451d2a5e04d25ceaa86e600a6ec34bd24431c675d88ac Redeem Script Asm: 03&...
0 votes
1 answer
61 views

How many bytes long should nSequence be?

When I look at the following raw transaction from: https://blockstream.info/tx/a175425ee2f3c01acc97ef32ab1082db14eaa94e5af4c54f02f3b01dec72558e?expand ...
1 vote
2 answers
119 views

Could someone provide an example of a tx spending from an input with a relative LockTime?

I want to see an example of a raw transaction which spends from an input which has a relative LockTime applied to it. An example would be a transaction from a Lightning payment channel in which a user ...
0 votes
0 answers
479 views

How to use "OP_CHECKSEQUENCEVERIFY" in regtest?

I have created a P2sh includes OP_CHECKSEQUENCEVERIFY and funded the same. I was trying to redeem the coins. But i could not understand the working of OP_CHECKSEQUENCEVERIFY. Below is the example ...
2 votes
2 answers
1k views

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 ...
2 votes
3 answers
186 views

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 ...
1 vote
1 answer
488 views

How to make a transaction with locktime on testnet?

I tried to make transaction with nLocktime on bitcoin testnet. I am not able to broadcast it. Can someone please help me to make a basic transaction with 1 input and 1 output, so that I can broadcast ...
0 votes
1 answer
244 views

Why are some of my peers rejecting this CSV transaction?

The CSV-redeeming TX I broadcast: https://www.blocktrail.com/tBTC/tx/807d464fff227ce98cfb5f1292069e2793e99f21b0539a1729cc460af32add77 The locktime was set for ten minutes, and the redeeming tx (...
3 votes
1 answer
257 views

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 ...
4 votes
1 answer
1k views

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. (...
1 vote
1 answer
2k views

Bitcoin Script: mandatory-script-verify-flag-failed Script failed an OP_EQUALVERIFY operation

I try to spend a P2SH transaction (in regtest) with a timelockscript of 200 blocks. I got the following error: mandatory-script-verify-flag-failed (Script failed an OP_EQUALVERIFY operation) (...
2 votes
0 answers
358 views

Locktime requirement not satisfied when locktime set to 1 in p2sh

I've created the following script on testnet: OP_IF 2 <pubkey1> <pubkey2> <pubkey3> 3 OP_CHECKMULTISIG OP_ELSE 1 OP_CHECKSEQUENCEVERIFY OP_DROP <pubkey1&...
2 votes
1 answer
144 views

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 ...
6 votes
1 answer
788 views

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: ...
2 votes
1 answer
118 views

Is CheckSequenceVerify only a stop-gap measure?

The Lightning Paper v0.5.9.2 says that CSV "would permit further abilities, including allowing a stop-gap solution before a more permanent solution for resolving transaction malleability. A future ...