Skip to content

Fix RBF nsequence: canonical value, all inputs#12

Open
bc1cindy wants to merge 2 commits into
cake-tech:mainfrom
bc1cindy:rbf-sequence
Open

Fix RBF nsequence: canonical value, all inputs#12
bc1cindy wants to merge 2 commits into
cake-tech:mainfrom
bc1cindy:rbf-sequence

Conversation

@bc1cindy

@bc1cindy bc1cindy commented Jun 2, 2026

Copy link
Copy Markdown

0x01 signals opt-in RBF, but on v2 txs it also sets a BIP-68 relative timelock of 1 block (unintended), and it's an abnormal value that fingerprints the wallet on-chain, harmful in collaborative settings like payjoin. It was also applied only to inputs[0], leaving a mixed [0x01, MAX, …] pattern that fingerprints too.

use the canonical 0xFFFFFFFD (ENABLE_RBF_NO_LOCKTIME) and apply it to every input, in both builders.

ref: payjoin/rust-payjoin#1597

bc1cindy added 2 commits June 2, 2026 19:29
0x01 signals opt-in RBF but also sets a BIP-68 relative timelock of 1
block, which is unintended. It is also an abnormal value that
fingerprints the wallet on-chain, which is harmful in collaborative
settings like payjoin. Most wallets use 0xFFFFFFFD to opt into RBF
without imposing a timelock.
Setting the sequence only on inputs[0] leaves the remaining inputs at
0xFFFFFFFF, producing a mixed pattern that itself fingerprints the
wallet. Applying it to every input keeps nsequence uniform within the
transaction. The same bug existed in both builders.

@arminsabouri arminsabouri left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cACK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants