Bitcoin Forum
May 04, 2024, 10:09:04 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Algorithm for selecting a low-fee transaction from the mempool  (Read 270 times)
bomberb17 (OP)
Hero Member
*****
Offline Offline

Activity: 771
Merit: 528



View Profile
May 19, 2023, 01:30:42 PM
 #1

I broadcasted a low fee (11sat/vbyte) transaction last week, just at the time when they fees went up.
I knew that the fee was low and that the transaction would take a few days to confirm (according to https://twitter.com/CoreFeeHelper , it would take around 3 days) but it's been a week and my transaction is still in the mempool. Sometimes my wallet (electrum) shows it with a blue "unbroadcasted" icon and I have to rebroadcast it again. I also sometimes use "free" tx accelerator services which basically rebroadcast the transaction everywhere.

My question is what is the algorithm that a miner picks a transaction from the mempool to include it to a block?
Is it a greedy algorithm which just picks the ones with highest fees? Is the "age" of a transaction in the mempool also a factor? Or is it just a combination of fee and a random choice?
1714860544
Hero Member
*
Offline Offline

Posts: 1714860544

View Profile Personal Message (Offline)

Ignore
1714860544
Reply with quote  #2

1714860544
Report to moderator
1714860544
Hero Member
*
Offline Offline

Posts: 1714860544

View Profile Personal Message (Offline)

Ignore
1714860544
Reply with quote  #2

1714860544
Report to moderator
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
hosseinimr93
Legendary
*
Offline Offline

Activity: 2394
Merit: 5235



View Profile
May 19, 2023, 01:33:15 PM
 #2

My question is what is the algorithm that a miner picks a transaction from the mempool to include it to a block?
Miners prioritize transactions based on their fee rate. The more fee rate you use for your transaction, the faster it can be included in the blockchain.


Is it a greedy algorithm which just picks the ones with highest fees? Is the "age" of a transaction in the mempool also a factor? Or is it just a combination of fee and a random choice?
It doesn't matter when you have broadcasted your transaction. It all depends on the fee rate.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
bomberb17 (OP)
Hero Member
*****
Offline Offline

Activity: 771
Merit: 528



View Profile
May 19, 2023, 01:55:50 PM
 #3

My question is what is the algorithm that a miner picks a transaction from the mempool to include it to a block?
Miners prioritize transactions based on their fee rate. The more fee rate you use for your transaction, the faster it can be included in the blockchain.


Is it a greedy algorithm which just picks the ones with highest fees? Is the "age" of a transaction in the mempool also a factor? Or is it just a combination of fee and a random choice?
It doesn't matter when you have broadcasted your transaction. It all depends on the fee rate.

So you say it is purely a greedy algorithm?
Nwada001
Hero Member
*****
Offline Offline

Activity: 574
Merit: 627



View Profile
May 19, 2023, 02:00:00 PM
 #4

Since you are using the electrum wallet and you have already seen that your transaction is still unconfirmed, why not try and speed up the transaction by using the CPFP option so that you just have to replace the old transaction with a newer one with a higher transaction fee, which will speed up the transaction if you actually need to execute the transaction as soon as possible? I have tried most of these accelerator services, but they are not much different from where my transaction was before.

R


▀▀▀▀▀▀▀██████▄▄
████████████████
▀▀▀▀█████▀▀▀█████
████████▌███▐████
▄▄▄▄█████▄▄▄█████
████████████████
▄▄▄▄▄▄▄██████▀▀
LLBIT
  CRYPTO   
FUTURES
 1,000x 
LEVERAGE
COMPETITIVE
    FEES    
 INSTANT 
EXECUTION
.
   TRADE NOW   
hosseinimr93
Legendary
*
Offline Offline

Activity: 2394
Merit: 5235



View Profile
May 19, 2023, 02:01:00 PM
 #5

So you say it is purely a greedy algorithm?
It's not that there's a certain algorithm which miners have to follow that.
Miners are free to include any valid transaction they want. They can even include a transaction with zero fee, but they include transactions with highest fee rates to maximize their profit.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
bomberb17 (OP)
Hero Member
*****
Offline Offline

Activity: 771
Merit: 528



View Profile
May 19, 2023, 02:13:19 PM
 #6

So you say it is purely a greedy algorithm?
It's not that there's a certain algorithm which miners have to follow that.
Miners are free to include any valid transaction they want. They can even include a transaction with zero fee, but they include transactions with highest fee rates to maximize their profit.

So to be precise, I'm not saying what algorithm miners should follow. Of course miners are free to choose any transaction they want (or even censor specific ones, despite if this means a lower reward for them).

What I am asking is what algorithm miners/mining pools typically follow.
Yogee
Sr. Member
****
Offline Offline

Activity: 1540
Merit: 412



View Profile
May 19, 2023, 02:32:00 PM
 #7

"Typically" would be filling up their mined block with the highest fee transactions as much as possible before the next one is mined so that falls under your "greedy algorithm". They can maybe accommodate some requests in including TXs with lower fees but that's definitely not their priority. They are here for the money after all - let's keep it real.

R


▀▀▀▀▀▀▀██████▄▄
████████████████
▀▀▀▀█████▀▀▀█████
████████▌███▐████
▄▄▄▄█████▄▄▄█████
████████████████
▄▄▄▄▄▄▄██████▀▀
LLBIT|
4,000+ GAMES
███████████████████
██████████▀▄▀▀▀████
████████▀▄▀██░░░███
██████▀▄███▄▀█▄▄▄██
███▀▀▀▀▀▀█▀▀▀▀▀▀███
██░░░░░░░░█░░░░░░██
██▄░░░░░░░█░░░░░▄██
███▄░░░░▄█▄▄▄▄▄████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█████████
▀████████
░░▀██████
░░░░▀████
░░░░░░███
▄░░░░░███
▀█▄▄▄████
░░▀▀█████
▀▀▀▀▀▀▀▀▀
█████████
░░░▀▀████
██▄▄▀░███
█░░█▄░░██
░████▀▀██
█░░█▀░░██
██▀▀▄░███
░░░▄▄████
▀▀▀▀▀▀▀▀▀
|
██░░░░░░░░░░░░░░░░░░░░░░██
▀█▄░▄▄░░░░░░░░░░░░▄▄░▄█▀
▄▄███░░░░░░░░░░░░░░███▄▄
▀░▀▄▀▄░░░░░▄▄░░░░░▄▀▄▀░▀
▄▄▄▄▄▀▀▄▄▀▀▄▄▄▄▄
█░▄▄▄██████▄▄▄░█
█░▀▀████████▀▀░█
█░█▀▄▄▄▄▄▄▄▄██░█
█░█▀████████░█
█░█░██████░█
▀▄▀▄███▀▄▀
▄▀▄
▀▄▄▄▄▀▄▀▄
██▀░░░░░░░░▀██
||.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
░▀▄░▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄░▄▀
███▀▄▀█████████████████▀▄▀
█████▀▄░▄▄▄▄▄███░▄▄▄▄▄▄▀
███████▀▄▀██████░█▄▄▄▄▄▄▄▄
█████████▀▄▄░███▄▄▄▄▄▄░▄▀
███████████░███████▀▄▀
███████████░██▀▄▄▄▄▀
███████████░▀▄▀
████████████▄▀
███████████
▄▄███████▄▄
▄████▀▀▀▀▀▀▀████▄
▄███▀▄▄███████▄▄▀███▄
▄██▀▄█▀▀▀█████▀▀▀█▄▀██▄
▄██▄██████▀████░███▄██▄
███░████████▀██░████░███
███░████░█▄████▀░████░███
███░████░███▄████████░███
▀██▄▀███░█████▄█████▀▄██▀
▀██▄▀█▄▄▄██████▄██▀▄██▀
▀███▄▀▀███████▀▀▄███▀
▀████▄▄▄▄▄▄▄████▀
▀▀███████▀▀
OFFICIAL PARTNERSHIP
FAZE CLAN
SSC NAPOLI
|
BitMaxz
Legendary
*
Online Online

Activity: 3248
Merit: 2965


Block halving is coming.


View Profile WWW
May 19, 2023, 02:38:45 PM
 #8

What I am asking is what algorithm miners/mining pools typically follow.

Not miners who can decide what transaction they want to include on the block but the mining pool operator.
I think the algo they use is fee-rate or fee-per-byte where they can sort all transactions from low to high fees.

Only mining pool have their own way how to pick transactions but most of the pools always pick high transaction fees to make more profit.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
serjent05
Legendary
*
Offline Offline

Activity: 2842
Merit: 1253


Cashback 15%


View Profile
May 19, 2023, 02:49:52 PM
 #9

Since you are using the electrum wallet and you have already seen that your transaction is still unconfirmed, why not try and speed up the transaction by using the CPFP option so that you just have to replace the old transaction with a newer one with a higher transaction fee, which will speed up the transaction if you actually need to execute the transaction as soon as possible? I have tried most of these accelerator services, but they are not much different from where my transaction was before.

I think you are talking about RBF or replace-by-fee, while CPFP is the receiving end making a transaction with higher fees so when the child transaction is included on the block, the parent transaction will also be included.

The speed of the Bitcoin transaction to be confirmed is dependent on the fee.  I do not think there is any algorithm that can bypass the transaction fee hierarchy except if a huge mining farm operator decides to include low fees when they mined a block which rarely happens since most mining farm operator has the default option of picking the highest transaction fee before the lower ones.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
buwaytress
Legendary
*
Offline Offline

Activity: 2800
Merit: 3443


Join the world-leading crypto sportsbook NOW!


View Profile
May 19, 2023, 02:49:57 PM
 #10

"Typically" would be filling up their mined block with the highest fee transactions as much as possible before the next one is mined so that falls under your "greedy algorithm". They can maybe accommodate some requests in including TXs with lower fees but that's definitely not their priority. They are here for the money after all - let's keep it real.

Yup. Highest total fees after filling up the blocks is probably how they go, rather than just blind highest fees (e.g. if you can fit 11 txs with average fee of 10.1 sat/byte rather than just 10 txs with 11 sat/byte, that's what they'd go).

You can't really blame "greedy" algorithm, OP. It's a cost-revenue thing, quite literally.

Obviously, you can still see low fee txs, I suspect that's paid for in different ways (e.g. viabtc's paid accelerator... as opposed to broadcasting, which doesn't... accelerate).

██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
Aanuoluwatofunmi
Sr. Member
****
Online Online

Activity: 588
Merit: 409



View Profile
May 19, 2023, 02:56:59 PM
 #11

I broadcasted a low fee (11sat/vbyte) transaction last week, just at the time when they fees went up.
I knew that the fee was low and that the transaction would take a few days to confirm

Even when the fee was high, there are some that make use of some features like RBF to pump their transaction ad make it faster, they would have also reduce their transactions fee rate by using the lowest priority,  while using bitcoin mining pool that has the best offers in confirming their transactions with yours when the next block get confirmed.

My question is what is the algorithm that a miner picks a transaction from the mempool to include it to a block?

Those transactions with the higher fees get confirmed first with higher priority over those with lower transaction fee, but for the benefit of those that uses a mining pool to boost their transactions, their transactions is being added to their own block transaction to get confirmed altogether.

 
Is it a greedy algorithm which just picks the ones with highest fees?

They aren't greedy, just that the miners get higher opportunities in this for making more profits than before and when the whole blocks had being completely mined, they still have to depend on the transaction fee to earn their income

.
SPIN

       ▄▄▄██████████▄▄▄
     ▄███████████████████▄
   ▄██████████▀▀███████████▄
   ██████████    ███████████
 ▄██████████      ▀█████████▄
▄██████████        ▀█████████▄
█████████▀▀   ▄▄    ▀▀▀███████
█████████▄▄  ████▄▄███████████
███████▀  ▀▀███▀      ▀███████
▀█████▀          ▄█▄   ▀█████▀
 ▀███▀   ▄▄▄  ▄█████▄   ▀███▀
   ██████████████████▄▄▄███
   ▀██████████████████████▀
     ▀▀████████████████▀▀
        ▀▀▀█████████▀▀▀
.
RIUM
.
███
███
███
███
███
███
███
███
███
███
███
███
SAFE GAMES
WITH WITHDRAWALS
       ▄▀▀▀▀▀▀▄▄▄▄
 ▄▀▀▀▀▀▀▀▀▀▀▀▀▄  ▀▀▄
█    ▄         █   ▀▌
█   █ █        █    ▌
█      ▄█▄     █   ▐
█     ▄███▄    █   ▌
█    ███████   █  ▐
█    ▀▀ █ ▀▀   █  ▌
█     ▄███▄    █ ▐
█              █▐▌
█        █ █   █▌
 ▀▄▄▄▄▄▄▄▄█▄▄▄▀
       ▄▀▀▀▀▀▀▄▄▄▄
 ▄▀▀▀▀▀▀▀▀▀▀▀▀▄  ▀▀▄
█    ▄         █   ▀▌
█   █ █        █    ▌
█      ▄█▄     █   ▐
█     ▄███▄    █   ▌
█    ███████   █  ▐
█    ▀▀ █ ▀▀   █  ▌
█     ▄███▄    █ ▐
█              █▐▌
█        █ █   █▌
 ▀▄▄▄▄▄▄▄▄█▄▄▄▀
.
███
███
███
███
███
███
███
███
███
███
███
███
▄▀▀▀











▀▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
SIGN UP


▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▄











▄▄▄▀
stompix
Legendary
*
Offline Offline

Activity: 2884
Merit: 6292


Blackjack.fun


View Profile
May 19, 2023, 03:03:27 PM
 #12

So you say it is purely a greedy algorithm?

It's a free market algorithm.
There are more people who want a confirmed tx than space available and since there is no other way to select tx that won't be abused by spammers and make thinks far worse this is it!

I'm pretty sure you would also sell your coins to the one offering $22.5 k when you have offers for 26.5k just because the other guy has been waiting for days for a customer!Right?

What I am asking is what algorithm miners/mining pools typically follow.

They all follow it, one exception to the rule is viabtc which allows up to 100 tx/h submitted on their website in the next block, but with their own rules, under 0.5 kb and over 10sat/b.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
dzungmobile
Sr. Member
****
Offline Offline

Activity: 714
Merit: 369


I stand with Ukraine!


View Profile
May 19, 2023, 03:05:36 PM
 #13

My question is what is the algorithm that a miner picks a transaction from the mempool to include it to a block?
Is it a greedy algorithm which just picks the ones with highest fees?
If it is not their own transactions, they will be greed and prioritize transactions with highest fee rates from tip of mempool first. In other words, they can proceed their own transactions with zero or very low fees.

Quote
Is the "age" of a transaction in the mempool also a factor? Or is it just a combination of fee and a random choice?
There are many mempools, not only one mempool. Each mempool has its own capacity and own settings. They can drop pending transactions from mempools after 1 day, 3 days (72 hours) or 14 days. It depends on their random settings.

Setup guides
Drop pending transactions with low fee after 72 hours, max mempool is 300 MB.
Code:
mempoolexpiry=72
maxmempool=300

███████████████████████████████▀▀▀▀
███████████████████████████████
█████████▀▀▀▀▀█▀█▀▀▀▀▀█████████
███▄▀▀▀   ▄▄▄▄   ▄▄▄▄   ▀▀▀▄███
███████▀▀▀████▌ ▐████▀▀▀███████
█████▀███▀█▀██▌ ▐██▀█▀███▀█████
███████▀▄▀▄███▌ ▐███▄▀▄▀███████
█████▄██▄██▄██   ██▄██▄██▄█████
███████▄▄▄████   ████▄▄▄███████
██████████▀▀▀▀   ▀▀▀▀██████████
██████████▄▄▄▄▄▄▄▄▄▄▄██████████
███████████████████████████████
███████████████████████████████▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
TRUST DICE
.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
█▀▀▀











█▄▄▄
#1 RATED CRYPTO
CASINO IN THE WORLD
██ ██ ██ ██ █Trustpilot
▀▀▀█











▄▄▄█
▄█████████████████████████████
██████████████████▀▀█████▀▀████
█████████████████▀█████████▀███
██████████████████████████████
███████████████████████████▄███
█████████████████████████▄▄████
███████████████████████████████
█████████████░░░███████████████
███████████░░░█████████████████
█████████░░████████████████████
█████░░░██████████████████████
███░░█████████████████████████
▀░░░█████████████████████████▀
█▀▀▀











█▄▄▄
▀▀▀█











▄▄▄█
Rruchi man
Legendary
*
Online Online

Activity: 1288
Merit: 1085


Bitcoin Casino Est. 2013


View Profile
May 19, 2023, 03:12:08 PM
 #14

My question is what is the algorithm that a miner picks a transaction from the mempool to include it to a block?
Miners prioritize transactions based on their fee rate. The more fee rate you use for your transaction, the faster it can be included in the blockchain.
@OP, if you are in a hurry to make a transaction, increasing the fee rate will ensure that you are given priority and you will not have to wait so much. In the mempool every transaction has a priority depending on the fee used if you check, there is a low priority fee for people not in a hurry, medium priority and high priority depending on how quickly you want your transaction. Miners respond to a transaction depending on the fee.

███▄▀██▄▄
░░▄████▄▀████ ▄▄▄
░░████▄▄▄▄░░█▀▀
███ ██████▄▄▀█▌
░▄░░███▀████
░▐█░░███░██▄▄
░░▄▀░████▄▄▄▀█
░█░▄███▀████ ▐█
▀▄▄███▀▄██▄
░░▄██▌░░██▀
░▐█▀████ ▀██
░░█▌██████ ▀▀██▄
░░▀███
▄▄██▀▄███
▄▄▄████▀▄████▄░░
▀▀█░░▄▄▄▄████░░
▐█▀▄▄█████████
████▀███░░▄░
▄▄██░███░░█▌░
█▀▄▄▄████░▀▄░░
█▌████▀███▄░█░
▄██▄▀███▄▄▀
▀██░░▐██▄░░
██▀████▀█▌░
▄██▀▀██████▐█░░
███▀░░
yhiaali3
Legendary
*
Offline Offline

Activity: 1694
Merit: 1861


#SWGT CERTIK Audited


View Profile WWW
May 19, 2023, 04:08:55 PM
 #15

You can't say it's greed. If you were them, would you take the low-fee transactions first? Or will you rush to take higher-fee transactions?

This is the logic that miners work with. If two people offer you to do the same work: one at 1$ and the other at 10$, which job will you accept?
This is the principle by which all human beings work.

teosanru
Hero Member
*****
Offline Offline

Activity: 2100
Merit: 618


View Profile
May 19, 2023, 04:32:26 PM
 #16

I broadcasted a low fee (11sat/vbyte) transaction last week, just at the time when they fees went up.
I knew that the fee was low and that the transaction would take a few days to confirm (according to https://twitter.com/CoreFeeHelper , it would take around 3 days) but it's been a week and my transaction is still in the mempool. Sometimes my wallet (electrum) shows it with a blue "unbroadcasted" icon and I have to rebroadcast it again. I also sometimes use "free" tx accelerator services which basically rebroadcast the transaction everywhere.

My question is what is the algorithm that a miner picks a transaction from the mempool to include it to a block?
Is it a greedy algorithm which just picks the ones with highest fees? Is the "age" of a transaction in the mempool also a factor? Or is it just a combination of fee and a random choice?
Yes obviously it's this also only which gives them highest reward or basically which has highest sat/ byte fees. I won't call the algorithm greedy rather I'll say it rational. If you see in a real world this is only the case. You'll always pick up highest paying person when you are given an option to do just a small task for someone. Can't blame miners when they do this.

Talking about rebroadcast. So rebroadcast does nothing but brings your transaction in the top of the pool again for miners to choose. But eventually if the fees is low and the current rate is still higher there are very less chances any miner will still pick it. If you really want to do the transaction your best bet will be to make it to redo the transaction with the higher fees the old one will get declined automatic.
entebah
Full Member
***
Offline Offline

Activity: 1544
Merit: 153



View Profile
May 19, 2023, 06:10:11 PM
 #17

I also sometimes use "free" tx accelerator services which basically rebroadcast the transaction everywhere.


which website that use for your tx accelerator? because i usually use tx accelerator with a medium fee and it got confirmed in the next block they mine.

My question is what is the algorithm that a miner picks a transaction from the mempool to include it to a block?
Is it a greedy algorithm which just picks the ones with highest fees? Is the "age" of a transaction in the mempool also a factor? Or is it just a combination of fee and a random choice?

i think the miner includes a transaction with the highest fees first because they got rewarded from the transaction fees that are included in the blocks they mine.
so before you send your transaction make sure you don't use a low fee because it will take days to get confirmed.
tiCeR
Hero Member
*****
Online Online

Activity: 1722
Merit: 750



View Profile
May 19, 2023, 07:22:42 PM
 #18

So you say it is purely a greedy algorithm?
It's not that there's a certain algorithm which miners have to follow that.
Miners are free to include any valid transaction they want. They can even include a transaction with zero fee, but they include transactions with highest fee rates to maximize their profit.

So to be precise, I'm not saying what algorithm miners should follow. Of course miners are free to choose any transaction they want (or even censor specific ones, despite if this means a lower reward for them).

What I am asking is what algorithm miners/mining pools typically follow.

I have asked a very similar question here and o_e_l_e_o kindly answered in detail. If you read that post I think everything should be answered. Miners will process transactions paying the highest fees and they are constantly building a "candidate" block which is adjusted on a highest fee first principle until the next block gets mined. Even if you are part of the candidate block for a second, your tx will only confirm once it is part of the candidate block that then also gets mined. Until your tx could be dropped and another one paying a higher fee be included instead. This is why I thought broadcasting a tx when fees are low in a certain moment will also ensure that your tx gets processed, but that was wrong because it could still get dropped again if the block hasn't been mined and a higher fee tx gets preferred over yours.

.
.DuelbitsSPORTS.
▄▄▄███████▄▄▄
▄▄█████████████████▄▄
▄██████████████████████▄
██████████████████████████
███████████████████████████
██████████████████████████████
██████████████████████████████
█████████████████████████████
███████████████████████████
█████████████████████████
▀████████████████████████
▀▀███████████████████
██████████████████████████████
██
██
██
██

██
██
██
██

██
██
██
████████▄▄▄▄██▄▄▄██
███▄█▀▄▄▀███▄█████
█████████████▀▀▀██
██▀ ▀██████████████████
███▄███████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
▀█████████████████████▀
▀▀███████████████▀▀
▀▀▀▀█▀▀▀▀
OFFICIAL EUROPEAN
BETTING PARTNER OF
ASTON VILLA FC
██
██
██
██

██
██
██
██

██
██
██
10%   CASHBACK   
          100%   MULTICHARGER   
Mate2237
Hero Member
*****
Offline Offline

Activity: 714
Merit: 580


Eloncoin.org - Mars, here we come!


View Profile WWW
May 19, 2023, 07:51:00 PM
 #19

This had happened to me as well, I waited for one week plus and lastly when I checked back the transaction I saw remove transaction or canceled at first I clicked removed and the coins went back to my wallet straight, then after 24 hours they still remine it again and asked me to broadcast it which I did. And after 3 days the same thing to remove from transaction. Hey guys!!! I gat to cancel the transaction and happy peace of mind. People really suffered in these days of the high fee transaction.









▄▄████████▄▄
▄▄████████████████▄▄
▄██
████████████████████▄
▄███
██████████████████████▄
▄████
███████████████████████▄
███████████████████████▄
█████████████████▄███████
████████████████▄███████▀
██████████▄▄███▄██████▀
████████▄████▄█████▀▀
██████▄██████████▀
███▄▄█████
███████▄
██▄██████████████
░▄██████████████▀
▄█████████████▀
████████████
███████████▀
███████▀▀
.
▄▄███████▄▄
▄███████████████▄
▄███████████████████▄
▄██████████
███████████
▄███████████████████████▄
█████████████████████████
█████████████████████████
█████████████████████████
▀█
██████████████████████▀
▀██
███████████████████▀
▀███████████████████▀
▀█████████
██████▀
▀▀███████▀▀
.
 ElonCoin.org 
.
████████▄▄███████▄▄
███████▄████████████▌
██████▐██▀███████▀▀██
███████████████████▐█▌
████▄▄▄▄▄▄▄▄▄▄██▄▄▄▄▄
███▐███▀▄█▄█▀▀█▄█▄▀
███████████████████
█████████████▄████
█████████▀░▄▄▄▄▄
███████▄█▄░▀█▄▄░▀
███▄██▄▀███▄█████▄▀
▄██████▄▀███████▀
████████▄▀████▀
█████▄▄
.
"I could either watch it
happen or be a part of it"
▬▬▬▬▬
bomberb17 (OP)
Hero Member
*****
Offline Offline

Activity: 771
Merit: 528



View Profile
May 19, 2023, 08:38:10 PM
 #20

"Typically" would be filling up their mined block with the highest fee transactions as much as possible before the next one is mined so that falls under your "greedy algorithm". They can maybe accommodate some requests in including TXs with lower fees but that's definitely not their priority. They are here for the money after all - let's keep it real.

"Typically" would be filling up their mined block with the highest fee transactions as much as possible before the next one is mined so that falls under your "greedy algorithm". They can maybe accommodate some requests in including TXs with lower fees but that's definitely not their priority. They are here for the money after all - let's keep it real.

Yup. Highest total fees after filling up the blocks is probably how they go, rather than just blind highest fees (e.g. if you can fit 11 txs with average fee of 10.1 sat/byte rather than just 10 txs with 11 sat/byte, that's what they'd go).

You can't really blame "greedy" algorithm, OP. It's a cost-revenue thing, quite literally.

Obviously, you can still see low fee txs, I suspect that's paid for in different ways (e.g. viabtc's paid accelerator... as opposed to broadcasting, which doesn't... accelerate).

The 10tx-11sat/byte vs. 11tx-10.1sat/byte makes some sense.

I didn't "blame" anyone, I am asking what is the algorithm they use to create a block.

They aren't greedy, just that the miners get higher opportunities in this for making more profits than before and when the whole blocks had being completely mined, they still have to depend on the transaction fee to earn their income
You can't say it's greed. If you were them, would you take the low-fee transactions first? Or will you rush to take higher-fee transactions?

This is the logic that miners work with. If two people offer you to do the same work: one at 1$ and the other at 10$, which job will you accept?
This is the principle by which all human beings work.

I didn't say that the miners are "greedy". I was asking if they are adopting a "greedy algorithm" to choose transcations.

Please all read first https://en.wikipedia.org/wiki/Greedy_algorithm
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!