Skip to main content

How Does the ‘Nsequence’ Field Differ in Usage for Opt-in RBF versus Relative Time-Locks?

The 'nSequence' field has two distinct uses: signaling RBF and implementing relative time-locks. For Opt-in RBF, setting 'nSequence' to any value below 0xFFFFFFFE signals replaceability.

For relative time-locks (BIP68/CLTV), a specific bit in the 'nSequence' field is set, and the lower bits encode the time or block height delay. If a transaction uses a relative time-lock, it must also be RBF-enabled (nSequence < 0xFFFFFFFE) to allow for updates to the unconfirmed transaction during the time-lock period.

How Can Time-Locks Mitigate the Security Risks of Mutable Contracts?
How Do Complex Smart Contracts Affect Gas Usage?
How Can a High Transaction Fee Burn Impact Network Usage?
How Does a Miner Calculate the “Target” Value for a Valid Block Hash?