Author

Topic: What is RBF in and how do you know that transaction doesn't use RBF? (Read 291 times)

legendary
Activity: 2268
Merit: 18748
It's just I haven't seen a non-RBF transaction with 4294967294 sequence, or I'm not searching hard enough.
Standard transactions made from Bitcoin Core use a nSequence value of 0xfffffffe as default, which disables RBF but does not disable nLocktime. This allows them to use nLocktime to prevent fee sniping.

You can see the relevant code for it here: https://github.com/bitcoin/bitcoin/blob/8443fb11ad6462362b0ef9c029d778b28b1de82e/src/wallet/wallet.cpp#L3007

Here are a couple of random transactions I pulled from the mempool which use 0xfffffffe:

6bd3f92f47008419394bbbee256c8e29178b6da5ca75d7074c0504300e09ed31
75d003ae719e20585d56f4ffe46255b5244e8cf88bd0f52f35f23d4167cf1e0a
b274f1ef25b269e68b4f0541bcfdcfeaa0c1ed30dfbb3ab90338857bf7df3f49
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
Both 0xfffffffe and 0xffffffff disable RBF. 0xffffffff also disables nLocktime.
If you are decoding a transaction as you suggest, then sequence can't be 4294967295 or 4294967294.
Thanks! I've reviewed BIP-0125 and it did said "(0xffffffff - 1)".
It's just I haven't seen a non-RBF transaction with 4294967294 sequence, or I'm not searching hard enough.
copper member
Activity: 2170
Merit: 1827
Top Crypto Casino
......and how do we know an RBF transaction?
In order to check whether a transaction is replaceable by fee or not, You can use blockstream explorer
If a transaction is RBF, Blockstream displays it at bottom of the page.
Blockchair too  indicates if the unconfirmed transaction is RBF enabled or not. I prefer Blockchair because it also displays the priority of the transaction among other unconfirmed transactions in the mempool using simplified figures  Wink
legendary
Activity: 2268
Merit: 18748
To make sure, you can decode that raw transaction and look for "sequence", if none is exactly "4294967295", it's replaceable.
That's not quite right. To have opted in to RBF, the nSequence value must be less than MAX-1, in other words, less than or equal to MAX-2, or 0xfffffffd.

Both 0xfffffffe and 0xffffffff disable RBF. 0xffffffff also disables nLocktime.

If you are decoding a transaction as you suggest, then sequence can't be 4294967295 or 4294967294.
legendary
Activity: 2380
Merit: 5213
......and how do we know an RBF transaction?
In order to check whether a transaction is replaceable by fee or not, You can use blockstream explorer
If a transaction is RBF, Blockstream displays it at bottom of the page.


legendary
Activity: 2310
Merit: 4085
Farewell o_e_l_e_o
@tranthidung, just so you know, you might want to ease up on the "highlighting"... it doesn't play nicely with Dark Mode scripts Tongue
Oops, I don't know the annoying problem with Dark Mode script. When I was a noob, I don't know the glow blocks but I saw some famous users use it and it looks cool. In real life, I usually highlight important points when I read books.

Ok, with the annoying problem, it is better to use color blocks or italicize text. I fixed but I would like to know about color blocks. I guess it is annoying in Dark Mode script too, could you confirm it, please.

Thank you so much, I learned one more thing.
HCP
legendary
Activity: 2086
Merit: 4361
In Electrum, following those steps:
Tools > Preferences > Use Replace-by-Fees
@tranthidung, just so you know, you might want to ease up on the "highlighting"... it doesn't play nicely with Dark Mode scripts Tongue

copper member
Activity: 2170
Merit: 1827
Top Crypto Casino
ReplaceByFee is what I've actually been practicing but I don't really understand it the way you guys explain now. So, Many thanks
ReplaceByFee or RBF is an option which certain wallets like electrum give you in case your transaction gets stuck or fails to confirm due to busy bitcoin network or low transaction fees. If you have RBF enabled/activated in a transaction. It means you can later on go back to your wallet and create another transaction with higher transaction fees that can make your transaction have a chance of getting confirmed faster.
The option of increasing your transaction fee is not possible if the transaction is not RBF enabled. I don't know if i have made the explanation easier to understand.
member
Activity: 898
Merit: 19
Do it For Better Humanity (Bitget trader)
The truth here is. Every response about RBF is so helpful for me and Ive more understanding and future links to read for more understanding. ReplaceByFee is what I've actually been practicing but I don't really understand it the way you guys explain now. So, Many thanks
legendary
Activity: 2310
Merit: 4085
Farewell o_e_l_e_o
To be your own bank and have control on your transactions, let use non-custodial wallets like Bitcoin Core or Electrum (SPV wallet, that is lighter than Bitcoin Core). Note that, always verify wallets to be safe before using (in both cases - when you install wallet the first time or when you update your wallet to newest version).

You have to check wallet option to see the Replace-by-Fee is chosen yet, if not, choose it. It does not help all the times because miners are always greedy and they are smart enough to choose transactions with highest fees to confirm first.

In Electrum, following those steps:
Tools > Preferences > Use Replace-by-Fees

My transaction has been unconfirmed for a long time. What can I do?
Bitcoin transactions become “confirmed” when miners accept to write them in the Bitcoin blockchain. In general, the speed of confirmation depends on the fee you attach to your transaction; miners prioritize transactions that pay the highest fees.

Recent versions of Electrum use “dynamic fees” in order to make sure that the fee you pay with your transaction is adequate. This feature is enabled by default in recent versions of Electrum.

If you have made a transaction that is unconfirmed, you can:

Wait for a long time. Eventually, your transaction will either be confirmed or cancelled. This might take several days.

Increase the transaction fee. This is only possible for “replaceable” transactions. To create this type of transaction, you must have checked “Replaceable” on the send tab before sending the transaction. If you’re not seeing the “Replaceable” option on the send tab go to Tools menu > Preferences > Fees tab and set “Propose Replace-By-Fee” to “Always”. Transactions that are replaceable have the word “Replaceable” in the date column on the history tab. To increase the fee of a replaceable transaction right click on its entry on the history tab and choose “Increase Fee”. Set an appropriate fee and click on “OK”. A window will popup with the unsigned transaction. Click on “Sign” and then “Broadcast”.

Create a “Child Pays for Parent” transaction. A CPFP is a new transaction that pays a high fee in order to compensate for the small fee of its parent transaction. It can be done by the recipient of the funds, or by the sender, if the transaction has a change output. To create a CPFP transaction right click on the unconfirmed transaction on the history tab and choose “Child pays for parent”. Set an appropriate fee and click on “OK”. A window will popup with the unsigned transaction. Click on “Sign” and then “Broadcast”.
The solution "Child Pays for Parent" is rarely used so you can ignore it.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
-snip- how do we know an RBF transaction?
Thanks.
Usually, you can easily check your client's history or transaction's details for RBF or Replace-by-fee flag as said above.

But if you want it the hard way, you can check the raw transaction (not the hash and txid) and look for "FFFFFFFF" somewhere in the middle,
if there's none, the transaction might be signaled as replaceable.
To make sure, you can decode that raw transaction and look for "sequence", if none is exactly "4294967295", it's replaceable.

Some online tools you can use if you don't have Bitcoin core:
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
ReplaceByFee

https://en.bitcoin.it/wiki/Replace_by_fee

And some more reading:
https://bitcoinops.org/en/rbf-in-the-wild/

Essentially if a transaction is marked as replace by fee you can send another one with more fees (If you have it) and it should then get confirmed sooner.

edit: what ranochigo said, but the links I posted are still good reading.

-Dave
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
RBF refers to replace-by-fee. Its an opt-in feature that allows the user to send a replacement transaction with a higher fee that would still be accepted by the nodes. Normally, subsequent transactions spending the same UTXOs are rejected by nodes, suffering from poor propagation.

You'll have to inspect the raw TX to see if its opt-in RBF. A sequence lower than MAX-1 marks the TX as an opt-in RBF. Some wallet UIs and block explorer displays this explicitly.
member
Activity: 898
Merit: 19
Do it For Better Humanity (Bitget trader)
I read a post where someone's BTC transaction got stuck for more than 24 hours and he/she needs a way to accelerate the transaction.
And Yes I saw couple of replies and I was able to understand what is needed to be done. But I don't understand an answer which says 
Quote
Normally i'd suggest increase the transaction fee, but it's impossible since the transaction doesn't use RBF.
So I decided to ask some questions about it here.
I know we can accelerate transaction by increasing transaction fees. But what is RBF and how do we know an RBF transaction?
Thanks.
Jump to: