Author

Topic: Bitcoin newbie - mempool transactions (Read 211 times)

legendary
Activity: 2380
Merit: 5213
September 12, 2024, 04:05:31 AM
#18
To your question in proper, a transaction is sent back to the senders wallet if the node reject it for some particular reason, but i keep wondering why some node may not do the same for overstayed transactions unconfirmed, they remain on the mempool and were not rejected for long.
Wrong and confusing explanation.

When the transaction is unconfirmed, no transaction has actually been made and there is nothing to be sent back to the wallet.
Nodes have different settings, some may allow transaction to stay in their mempool for long time and some may have bigger size limit.
sr. member
Activity: 798
Merit: 436
September 11, 2024, 10:27:28 AM
#17
I'm learning about the mempool and found this text on a bitcoin educational site: Once the Mempool reaches full capacity, nodes start prioritizing transactions by setting up a minimal transaction fee threshold. Transactions with a fee-rate lower than the threshold are immediately removed from the Mempool.

If a transaction is removed from the mempool, where does it go? To some holding area, I assume, for possible inclusion in the next block? What is the name of the holding area and where does it reside? Thx.


One of the reasons why a node reject a transaction is because of the lower transaction fee and this may be seen after it has been long due for confirmation but still remains on the mempool because of low transaction fee, we could always avoid this by ensuring to look into the mempool size and fee rate before making a transaction.

To your question in proper, a transaction is sent back to the senders wallet if the node reject it for some particular reason, but i keep wondering why some node may not do the same for overstayed transactions unconfirmed, they remain on the mempool and were not rejected for long.
hero member
Activity: 1722
Merit: 801
September 10, 2024, 05:31:37 AM
#16
Mempool is "memory" pool. Think of it as your operating system's clipboard.
Because different Bitcoin full nodes and Bitcoin mining pools have different physical resources for their nodes and mempools, their mempools will have different settings too.

Thanks to Satoshi Nakamoto who designed Bitcoin protocol with free of choices, and Bitcoin users, node operators and mining pools have their freedom of choice in settings.

Learn me a bitcoin has a page for Bitcoin memory pool with lot of good explanation, it's good for learning and certainly helpful for newbies. Many newbies think there is only 1 Bitcoin mempool, I used to misunderstand like this too, but there are actually many Bitcoin mempools.
legendary
Activity: 3472
Merit: 10611
September 10, 2024, 03:00:15 AM
#15
Mempool is "memory" pool. Think of it as your operating system's clipboard. Your clipboard item cap is 1, if you copy an item or a text you use that cap. If you copy something else, the previous items in your "memory" would be discarded and replaced by the new item.

Mempool is similar. It has a size cap defined by the client and is a portion of your RAM. Something like 300 MB. When it is filled and the node receives a new transaction they have to decide which ones they want to keep in their RAM.
Since miners prefer transactions with higher fee (to maximize their revenue) the nodes start discarding transactions that pay the lowest fees and accept new transactions that used higher fee rates. The transactions in their memory with rates lower than that threshold are simply discarded (or dropped from memory) freeing up memory space for others.
hero member
Activity: 1722
Merit: 801
September 08, 2024, 10:18:40 PM
#14
I'm learning about the mempool and found this text on a bitcoin educational site: Once the Mempool reaches full capacity, nodes start prioritizing transactions by setting up a minimal transaction fee threshold. Transactions with a fee-rate lower than the threshold are immediately removed from the Mempool.
There are many Bitcoin mempools and operators can set up minimal transaction fee threshold for their nodes anytime. They don't have to wait mempools to be full to set that threshold.

See the tool
https://jlopp.github.io/bitcoin-core-config-generator/
Quote
Block Min Transaction Fee

Set lowest fee rate (in BTC/kB) for transactions to be included in block creation.
You can set the parameter for your node.

Quote
If a transaction is removed from the mempool, where does it go?
There are many Bitcoin mempools and risk of be removed from all mempools is small.

Some mempools have their parameter to drop transactions with low fee after 14 days but this parameter can be customized. A transaction is done and actually a transaction when it was confirmed. Your bitcoin will only move out of your wallet when that transaction was confirmed.
legendary
Activity: 2380
Merit: 5213
September 08, 2024, 07:03:26 PM
#13
On the older version owners of the nodes can able to set minrelaytxfee on their own node I don't know if they can still able to set this minrelaytxfee on the latest version of Bitcoin core but any node owners can set up a minimal transaction fee threshold any transaction below that threshold is likely to be rejected(only on that node) because all nodes have different minrelaytxfee if you are the owner of the node you can able to set it up.
What OP is talking about is the purging fee rate, not minimum relay fee rate.
When the network is congested and the size of the mempool reaches a certain amount, the node starts to remove transactions with low fee rates, so that there's a room for transactions with higher fee rates.

Currently, the minimum relay fee rate is 1 sat/vbyte for any node with default settings.
hero member
Activity: 2268
Merit: 669
Bitcoin Casino Est. 2013
September 08, 2024, 06:42:51 PM
#12
Got it. Thank you all. Very helpful.

This is a great forum!
That's true that this is a great forum. There are many newbies who learned a lot in this forum such as myself when I started years ago. What they explained is true and I have experienced myself where my transaction didn't get included in the next block due to low fee and It almost take a week for my transaction to get confirmed yo the next block. As for the fee this time is that low fee transactions have a chance now to be included in the block since the fee is low compared before.
newbie
Activity: 7
Merit: 1
September 08, 2024, 06:40:23 PM
#11
This is a good opportunity to share learnmeabitcoin that will answer your questions: https://learnmeabitcoin.com/technical/mining/memory-pool/
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
September 08, 2024, 06:14:32 PM
#10
On the older version owners of the nodes can able to set minrelaytxfee on their own node I don't know if they can still able to set this minrelaytxfee on the latest version of Bitcoin core but any node owners can set up a minimal transaction fee threshold any transaction below that threshold is likely to be rejected(only on that node) because all nodes have different minrelaytxfee if you are the owner of the node you can able to set it up.

Rejected transactions from your node will be forwarded to other nodes to validate, if this transaction didn't meet the certain minimum threshold it will be rejected again until it's completely removed from the mempool.

legendary
Activity: 4424
Merit: 4794
September 08, 2024, 03:13:25 PM
#9
other thing to note

each node has its own mempool.. general nodes do not prioritise transactions when the mempool fills up in regards to block creation
jsut when their memory is full and they have to disgard  transactions, which in most cases is to disgard the cheapest tx

however there are mining pools which actually manage the creation of blocks and these are the special nodes that select the transactions to add into a block candidate. they do not wait for their mempool to be full before choosing transactions. they instead start selecting transactions when each new block attempt is made. whether the mempool is full or not.
even in a near empty mempool of unconfirmed transactions waiting. a mining pool can choose any reasons to let any transaction it wants into its block candidate, or ignore it and let it drop.. most mining pools however(due to obvious profit/bonus) will choose the most expensive fee transactions they currently have waiting, emphasis even if the mempool is not full
meaning the mempools of other nodes might actually only contain cheap fee transactions for weeks as the mining pool nodes are picking up and confirming the expensive ones first, leaving the cheaper fee transactions in normal nodes mempools waiting for weeks

what is also worth noting is when a mempool is gaining a bigger amount of transactions waiting, users hoping to get their transactions confirmed sooner into a block will want to and do compete with the other transactions waiting, and so users then rebroadcast their transaction by altering the amounts being moved to raise the fee and replace the old cheaper transaction with the more expensive transaction to beat the competing transactions waiting. so cheapest tx are not just dropped when mempool fills but also old cheaper fee transactions dropped if the sender resends a tx with a higher fee to replace the old transaction
newbie
Activity: 28
Merit: 12
September 08, 2024, 03:00:26 PM
#8
Got it. Thank you all. Very helpful.

This is a great forum!
legendary
Activity: 2380
Merit: 5213
September 08, 2024, 02:26:58 PM
#7
Thank you. Who (or what process) decides if the removed transaction will be broadcast again?
Anyone in the world that has the raw transaction can rebroadcast the transaction. If the transaction is rebroadcasted and it's still valid, it will be recevied by nodes again.
Again, take note that any node has its own mempool. Even if majority of nodes remove a transaction from their mempool, it's possible that some still have it and the transaction gets confirmed.
legendary
Activity: 994
Merit: 1089
September 08, 2024, 02:18:19 PM
#6
If a node remove a transaction from their mempool due to any of above reasons, it's completely removed and it's like that it has never received that transaction.
The node may receive the removed transaction if it's broadcasted again.
Thank you. Who (or what process) decides if the removed transaction will be broadcast again?
Just as you have been told, each node has their own individual mempool, there is no general mempool, so node A can remove your tx from their mempool, but node B could still have it in theirs, this is because nodes receive tx's at different times and they can also configure their mempool differently on how long a tx will remain in their mempool.

The BTC network is decentralized, so there is no single authority that decides anything, you can rebroadcast you tx and some wallet softwares also rebroadcasts tx's automatically. Take note that rebroadcasting tx's does not mean that it will be added into a block and confirmed, if your tx is stuck, you either have to use rbf or cpfp to get it confirmed.
sr. member
Activity: 448
Merit: 560
Crypto Casino and Sportsbook
September 08, 2024, 02:17:14 PM
#5
I'm learning about the mempool and found this text on a bitcoin educational site: Once the Mempool reaches full capacity, nodes start prioritizing transactions by setting up a minimal transaction fee threshold. Transactions with a fee-rate lower than the threshold are immediately removed from the Mempool.
If a transaction is removed from the mempool, where does it go? To some holding area, I assume, for possible inclusion in the next block? What is the name of the holding area and where does it reside? Thx.
Hosseinimr93 has pretty much said most of it. The fees on the bitcoin network as well as fee rate on the MEMPOOL is dynamic meaning it's not fixed it changes depending on average fees. The average closing fees on an already confirmed block would likely be the opening average fee for a new block. This simply means that if more bitcoin users decide to increase the fee rate they are making use of in their transactions just for them to get their transactions confirmed faster then the average fee rate on that block will increase also.

Nodes have a minimal fee rate known as purge fee. It's the smallest fee that would be ever considered by miners to be confirmed. Transactions with fees below the purge fee will be dropped automatically from the MEMPOOL and as fees go up the purge fee tends to increase also too.
legendary
Activity: 1526
Merit: 1359
September 08, 2024, 02:08:41 PM
#4
Thank you. Who (or what process) decides if the removed transaction will be broadcast again?

Most wallets, as far as I know, have an option to rebroadcast a transaction. Some of them do it automatically, while others require you to do it manually.
Plus, you can use some of the public services, like https://live.blockcypher.com/btc/pushtx/ or https://blockchair.com/broadcast, or the so-called "free transaction accelerators" that will do it for you.

Are there any statistics on the percentage of transactions that get removed and never make it into the blockchain?

I dont know of any. Due to the decentralized nature of the blockchain (each node maintains its own mempool), Im unsure if such data can even be collected reliably.
newbie
Activity: 28
Merit: 12
September 08, 2024, 01:39:58 PM
#3
If a node remove a transaction from their mempool due to any of above reasons, it's completely removed and it's like that it has never received that transaction.
The node may receive the removed transaction if it's broadcasted again.
Thank you. Who (or what process) decides if the removed transaction will be broadcast again?

Are there any statistics on the percentage of transactions that get removed and never make it into the blockchain?
legendary
Activity: 2380
Merit: 5213
September 08, 2024, 01:22:20 PM
#2
First of all note that each node has its own mempool and they may remove a transaction from their mempool without the transaction being included in the blockchain for two reasons. 1. Due to low fee, 2. Due to staying unconfirmed for a certain time

If a node remove a transaction from their mempool due to any of above reasons, it's completely removed and it's like that it has never received that transaction.
The node may receive the removed transaction if it's broadcasted again.
newbie
Activity: 28
Merit: 12
September 08, 2024, 01:11:11 PM
#1
I'm learning about the mempool and found this text on a bitcoin educational site: Once the Mempool reaches full capacity, nodes start prioritizing transactions by setting up a minimal transaction fee threshold. Transactions with a fee-rate lower than the threshold are immediately removed from the Mempool.

If a transaction is removed from the mempool, where does it go? To some holding area, I assume, for possible inclusion in the next block? What is the name of the holding area and where does it reside? Thx.
Jump to: