Author

Topic: If two transactions have the same fee, is their processing order random? (Read 405 times)

legendary
Activity: 1624
Merit: 2481
To clarify my question, I referred to two transactions, A and B, to have the safe fee per byte.

If a miner recieves two transactions with the same sat/B fee it depends on the algorithm he uses for including transactions into a block.
Usually miners are looking for the biggest profit. For example: If a miner already included the "few" transactions with the highest fee and now
only has, lets say, 200 Byte left in this block. Then if TX A is 100 bytes big and TX B is 300 bytes.. he will either confirm TX A into his block or he skips A and B
and confirms TX C with a lower sat/B fee, but a bigger size so the "overall-"profit is bigger. You can't tell for sure how a miner decides on 2 (exact) same transactions.
Its all how they have coded their algorithm. I think if there is no monetary advantage most miners will go with FIFO.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
In the current situation, where backlog is finally clearing after the one weeks glut, and there is a large number (approximately 20 000) of low fee (1-10 satoshis per byte) payments, which have been waiting several days, what decides the order between them? Is it random?
Honestly, since I don't control any mining pools, I can't tell for sure.

If the miners even see those transactions, the first thing is of course the fees/byte. As with the order, it differs from miner to miner. I would imagine that the miner would include whichever transaction he sees first as the merkle root is calculated first. I'm not sure whether any miner decides which transaction to include based on how well it would fit. It would definitely require some calculation.
full member
Activity: 182
Merit: 101

Transaction priority is mostly deprecated right now, the reference client does not use it for free transaction anymore. In fact, reference client doesn't consider priority when relaying transactions anymore.

You have to understand that miners have their own backend and it is up to them to decide which transaction gets included first. No one would know which transaction would get included first and its neither useful nor important. If I were to give an educated guess, it would likely be the transaction for which the miner sees first that would get a higher chance. The whole process about mining is not the miner finding a block and include the transaction. The inclusion of transaction is before the miner starts hashing their block header.

In the current situation, where backlog is finally clearing after the one weeks glut, and there is a large number (approximately 20 000) of low fee (1-10 satoshis per byte) payments, which have been waiting several days, what decides the order between them? Is it random?

full member
Activity: 182
Merit: 101
To clarify my question, I referred to two transactions, A and B, to have the safe fee per byte.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
No, What decides a particular transaction's priority is its included fee as the miners prioritizes transactions with a higher fee.
OP is talking about transaction priority, which has a formula including its coin age and output amount.

If A is bigger in size, Transaction B will most likely get confirmed first. But If they have the same size then luck  will probably decide which will get confirmed first.
Why would the smaller be included first?


Transaction priority is mostly deprecated right now, the reference client does not use it for free transaction anymore. In fact, reference client doesn't consider priority when relaying transactions anymore.

You have to understand that miners have their own backend and it is up to them to decide which transaction gets included first. No one would know which transaction would get included first and its neither useful nor important. If I were to give an educated guess, it would likely be the transaction for which the miner sees first that would get a higher chance. The whole process about mining is not the miner finding a block and include the transaction. The inclusion of transaction is before the miner starts hashing their block header.
legendary
Activity: 2422
Merit: 1451
Leading Crypto Sports Betting & Casino Platform
It's not random random but we don't know what parameters each miner will have for picking up transactions. If a couple of transactions have the same fee and same sat/byte value as well (which afaik is what matters to miners) then there'd be increased chances that they would be in the same block but that can't be guaranteed to be the case. There's nothing holding the two transactions together and there's a top of other variables that could end up putting them in a different block.
hero member
Activity: 2786
Merit: 902
yesssir! 🫡
If I've understood correctly, transaction's age does not affect any more its priority?
No, What decides a particular transaction's priority is its included fee as the miners prioritizes transactions with a higher fee. But please note that this fee depends on the transaction size and the network condition so for example if your transaction has a lot of inputs resulting in a bigger size, it will require more fee, the same also applies if the network is busy.

Here is a site that gives a fee estimation: https://bitcoinfees.earn.com/

So if two transactions have the same fee, which one is processed first?
If they have the same fee, The transaction which is less in size will most likely get confirmed first. But If they have the same size then luck will probably decide which will get confirmed first. A situation where both of them are never confirmed might also happen if the fees were insufficient for the size and/or for the current network condition.
full member
Activity: 182
Merit: 101
If I've understood correctly, transaction's age does not affect any more its priority? So if two transactions have the same fee, which one is processed first?
Jump to: