3

What is the recommended nSequence for signalling RBF transactions?

BIP125 says:

A transaction is considered to have opted in to allowing replacement of itself if any of its inputs have an nSequence number less than (0xffffffff - 1).

What is the recommended policy—is it better to send smaller or higher nSequence?

Also, does the sequence number need to increase with newer "versions" of the transaction with higher fees, as was the original semantics of nSequence, or not?

Bitcoin Core itself uses nSequence=0, but only in the RBF tests, AFAIK.

Murch
  • 71,155
  • 33
  • 180
  • 600
Karel Bílek
  • 2,655
  • 3
  • 24
  • 45

1 Answers1

6

The only other relevance of the nSequence field is as relative locktime (in version 2 transactions); see BIP 68.

If you do use relative locktime, they will determine the value of nSequence.

If you don't use that feature, any nSequence lower than 0xfffffffe will do.

In BIP125, there is no need for strictly increasing nSequence versions. instead, the highest fee wins.

Pieter Wuille
  • 98,249
  • 9
  • 183
  • 287