<p>Yes, since the <code>OP_CSV</code> requires setting a non-maximal <code>nSequence</code> in the spending input, an input spending it is forced to signal replaceability.</p>
<p>Ruben Somsen mentions that he used this construction in his <a href="https://github.com/RubenSomsen/spacechains" rel="nofollow noreferrer">Spacechains Proof of Concept</a> and explains that it indeed enforces use of RBF (and permits the UTXO to be spent within the same block).</p>
<p>He points out that with the <em>anyone can spend</em> construction he was using, this would leave a 0 on the stack, which would fail the script evaluation. He worked around this issue by adding an <code>OP_1ADD</code> to the script.
Ruben suggests that this outcome is why Miniscript disallows timelocks of 0.</p>
<p>Source: <a href="https://twitter.com/SomsenRuben/status/1683056160373391360" rel="nofollow noreferrer">Tweet by Ruben Somsen</a></p>

CC BY-SA 4.0
2023-07-23T17:13:24.187Z
2023-07-25T14:04:54.643Z
2023-07-25T14:04:54.643Z
Murch
<p>If I send bitcoins to an output whose script will execute <code>0 OP_CHECKSEQUENCEVERIFY</code> when it is spent, does that require the spender to set the <a href="https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki" rel="nofollow noreferrer">BIP125</a> signal indicating that the transaction is replacable?</p>
<p>For example, in cases where participants in a contract protocol (like Lightning Network) wanted to ensure a transaction would signal it was replacable, could adding <code>0 OP_CSV</code> to all script branches provide that guarantee of replacability?</p>
<p>Additionally, would <code>0 OP_CSV</code> impose any additional requirements on the transaction executing that operation beyond it needing to signal replacability and having a transaction version number greater than 1?</p>

<replace-by-fee><sequence><checksequenceverify><bip-125-replaceable>
Does `0 OP_CSV` force the spending transaction to signal BIP125 replacability?
David A. Harding
# Does `0 OP_CSV` force the spending transaction to signal BIP125 replacability?

(Asked by: username_0 on 2022-10-14)

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](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki) signal indicating that the transaction is replacable?

For example, in cases where participants in a contract protocol (like Lightning Network) wanted to ensure a transaction would signal it was replacable, could adding `0 OP_CSV` to all script branches provide that guarantee of replacability?

Additionally, would `0 OP_CSV` impose any additional requirements on the transaction executing that operation beyond it needing to signal replacability and having a transaction version number greater than 1?

**Tags:** replace-by-fee, sequence, checksequenceverify, bip-125-replaceable


---

## 1 answers

### Answer by username_1 on 2023-07-23. Score: 3

Yes, since the `OP_CSV` requires setting a non-maximal `nSequence` in the spending input, an input spending it is forced to signal replaceability.

Ruben Somsen mentions that he used this construction in his [Spacechains Proof of Concept](https://github.com/RubenSomsen/spacechains) and explains that it indeed enforces use of RBF (and permits the UTXO to be spent within the same block).

He points out that with the *anyone can spend* construction he was using, this would leave a 0 on the stack, which would fail the script evaluation. He worked around this issue by adding an `OP_1ADD` to the script.
Ruben suggests that this outcome is why Miniscript disallows timelocks of 0.

Source: [Tweet by Ruben Somsen](https://twitter.com/SomsenRuben/status/1683056160373391360)


---

