Bitcoin Forum
May 27, 2024, 04:50:21 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How does the system prioritise transactions for mining?  (Read 734 times)
kittdigital (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
February 06, 2014, 03:52:15 PM
Last edit: February 06, 2014, 04:30:56 PM by kittdigital
 #1

Hi all,

I have been reading this forum for a while and the information has been invaluable.  I am investigating cryptocurrencies as part of a bigger project that I am involved in.

One thing I can't seem to find an answer for is that when mining is there anything that prioritises transactions that have a transaction fee attached so they get mined first?  If so does that mean that eventually everyone will have to pay a transaction fee or else their transaction will never be verified?

Also, how does it work it out? is it based on a percentage of the transaction or is it more just the higher the transaction fee the quicker it will get mined?

What I think is confusing me is that as far as I understand  it the transactions are allocated to a block on a time basis so there is no real prioritisation for transaction fees?

Hope you guys can help.
Foxpup
Legendary
*
Offline Offline

Activity: 4368
Merit: 3061


Vile Vixen and Miss Bitcointalk 2021-2023


View Profile
February 07, 2014, 03:26:52 AM
 #2

First, 27kB of a block is set aside for free transactions, provided they meet certain criteria (no larger than 1kB and high "priority"). These are sorted by "priority", which is the total value of the transaction times the age of the inputs, divided by the transaction size in bytes. If there are more than 27kB of free transactions, only the highest priority transactions will be confirmed. Note that since priority depends on the age of the transaction inputs, a transaction's priority will constantly increase without limit the longer it waits for confirmation, so all free transactions less than 1kB should eventually be confirmed, though it may take a very long time.

The remainder of the block is filled with fee-paying transactions, which are sorted by transaction fee per kilobyte. The fee must be more than the minimum fee; transaction paying less than the minimum fee are treated as free transactions. Only 250kB is available for transactions paying the minimum fee - if a block is to include more transactions than that, the transactions must pay higher fees (the block will never come close to the absolute block size limit unless extremely high fees are paid). Note that if a fee-paying transaction meet the criteria for free transactions, it will be included in that space if its priority is high enough, but otherwise priority has no effect on fee-paying transactions (and the fee, if any, has no effect on transactions that qualify as free).

The practical consequences of this system are:
* Paying less than the minimum fee is the same as paying no fee.
* Free transactions, although described as "high priority", may take a very long time to confirm due to limited amount of space allocated for such transactions.
* Transactions paying the minimum fee will usually be confirmed in the next block, unless the block is getting full.
* Paying more than the minimum fee will get your transaction into otherwise full blocks (at the moment, paying more than double the minimum fee all but guarantees next block confirmation).

Note that these are the default rules, used by most miners. Miners are free to choose their own fee rules, which may be radically different.

Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
I am not on the scammers' paradise known as Telegram! Do not believe anyone claiming to be me off-forum without a signed message from the above address! Accept no excuses and make no exceptions!
kittdigital (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
February 07, 2014, 10:03:17 AM
 #3

@Foxpup - Awesome!  That gives me a great starting point for further understanding thank you Smiley

You mention that free transactions have to be 'no larger than 1kB and high "priority".' Will we reach a stage where a free transaction is over 1KB?  if so what happens to that transaction?

Also, as part of my investigation I have set up some mining rigs to understand the process but I have not seen anywhere that I would set my fee rules?
Foxpup
Legendary
*
Offline Offline

Activity: 4368
Merit: 3061


Vile Vixen and Miss Bitcointalk 2021-2023


View Profile
February 07, 2014, 10:25:39 AM
 #4

You mention that free transactions have to be 'no larger than 1kB and high "priority".' Will we reach a stage where a free transaction is over 1KB?  if so what happens to that transaction?
The default transaction fee policy has changed several times in the past, and it is difficult to predict what changes will be made in the future. I think it is likely that free transactions will eventually be phased out altogether, as the block subsidy drops and the network becomes more dependent on fees. In any case, a transaction that pays insufficient fees and does not meet the requirements for free transactions will never be confirmed unless a miner with a different fee policy decides to accept it.

Also, as part of my investigation I have set up some mining rigs to understand the process but I have not seen anywhere that I would set my fee rules?
For solo mining and p2pool, the fee policy is set by your Bitcoin node. The basic parameters (minimum fee, amount of space to allocate for free transactions, etc) can be set in bitcoin.conf or the command line; more radical changes require modifying and recompiling the code. For pooled mining (other than p2pool), the fee policy is set by the pool's Bitcoin node. If you disapprove of your pool's fee policy, your only option is to switch to a different one.

Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
I am not on the scammers' paradise known as Telegram! Do not believe anyone claiming to be me off-forum without a signed message from the above address! Accept no excuses and make no exceptions!
kittdigital (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
February 07, 2014, 10:52:12 AM
 #5

I was hoping for something like that Smiley

In my head coins will eventually have to have a minimum level of enforced transaction fee else there is no reward for miners and actually the whole system collapses.
fbueller
Sr. Member
****
Offline Offline

Activity: 412
Merit: 275


View Profile
February 07, 2014, 11:57:09 AM
 #6

Certain transactions end up with a larger size, and may exceed the limit. Multi-signature transactions containing many signatures will encounter problems with size if people aren't careful when including fee's.

Bitwasp Developer.
Pages: [1]
  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!