From 4d61345f307ef6e2853bb432003b576ae686dfbf Mon Sep 17 00:00:00 2001 From: Armin Sabouri Date: Fri, 13 Mar 2026 18:42:41 -0400 Subject: [PATCH] Update RBF nsequence to 0xFFFFFFFD (#3077) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Technically `0x1` will signal opt-in RBF (since 0x1 ≤ 0xFFFFFFFD); however it also sets a relative timelock of 1 block. This seems like an unintended bug. It also fingerprints cake wallet since `0x1` is an abnormal value. This is especially harmful in collaborative settings e.g payjoin. Most wallets set `nsequence = 0xFFFFFFFD` to opt into RBF or just use full rbf which seems to be gaining more adoption. --- cw_bitcoin/lib/psbt/transaction_builder.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cw_bitcoin/lib/psbt/transaction_builder.dart b/cw_bitcoin/lib/psbt/transaction_builder.dart index 7d2badeda..2046e45c5 100644 --- a/cw_bitcoin/lib/psbt/transaction_builder.dart +++ b/cw_bitcoin/lib/psbt/transaction_builder.dart @@ -25,7 +25,7 @@ class PSBTTransactionBuild { psbt.setInputPreviousTxId(i, Uint8List.fromList(hex.decode(input.utxo.txHash).reversed.toList())); psbt.setInputOutputIndex(i, input.utxo.vout); - psbt.setInputSequence(i, enableRBF ? 0x1 : 0xffffffff); + psbt.setInputSequence(i, enableRBF ? 0xfffffffd : 0xffffffff); if (input.utxo.isSegwit()) {