TeachMeBitcoin

The 0xffffffff Sentinel

From TeachMeBitcoin, the free encyclopedia Reading time: 2 min

The 0xffffffff Sentinel

The value 0xffffffff (4.29 billion) is the "default" value for the Sequence field in most Bitcoin transactions. It acts as a sentinel that disables several protocol features.

1. Disabling nLockTime

In the original Bitcoin protocol, the nLockTime field (found at the end of the transaction) is only enforced if at least one input has a sequence number less than 0xffffffff.

2. Disabling RBF

As we discussed in the RBF Guide, a sequence of 0xffffffff signals that a transaction is not replaceable according to BIP 125 rules.

3. Disabling BIP 68

For Relative Timelocks to be active, bit 31 of the sequence must be 0. Since 0xffffffff has bit 31 set to 1, it naturally disables relative timelocks for that input.

4. The "Final" Transaction

A transaction is considered "Final" if:

  1. nLockTime is 0 OR matches the current block/time.

  2. OR All inputs have sequence 0xffffffff.

Feature Condition for Activation
nLockTime Any Sequence \u003c 0xffffffff
Opt-in RBF Any Sequence \u003c 0xffffffff - 1
BIP 68 Sequence Bit 31 = 0

[!TIP] If you are building a simple transaction and don't need advanced features, always set the sequence to 0xffffffff to ensure it is processed as quickly as possible.

In the final section, we will build a Python Sequence Parser to decode these bits automatically.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!