Bitcoin Forum
May 02, 2024, 10:39:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How do miner's spend their fees (not the block reward)?  (Read 1131 times)
No_2 (OP)
Hero Member
*****
Offline Offline

Activity: 901
Merit: 1031


BTC: the beginning of stake-based public resources


View Profile
September 16, 2016, 11:42:20 AM
Merited by ABCbits (2)
 #1

What do the transactions on the blockchain look like where a miner spends their fees - not the block reward of 50/25/12.5 BTC they have earned per block but the fees users have paid for each transaction to be mined to a block? How are these referenced by the next transaction because fees are not specified in a transaction output?

I understand that a miner states the amount of bitcoin they wish to receive as a reward in the coinbase transaction for a block (they are even able to specify a lower reward than the maximum permitted by the network). They can then spend the outputs from the coinbase by referencing it in the next transaction. But how are the fees the miner received for all the transactions in that block spent?
If you see garbage posts (off-topic, trolling, spam, no point, etc.), use the "report to moderator" links. All reports are investigated, though you will rarely be contacted about your reports.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714646344
Hero Member
*
Offline Offline

Posts: 1714646344

View Profile Personal Message (Offline)

Ignore
1714646344
Reply with quote  #2

1714646344
Report to moderator
1714646344
Hero Member
*
Offline Offline

Posts: 1714646344

View Profile Personal Message (Offline)

Ignore
1714646344
Reply with quote  #2

1714646344
Report to moderator
1714646344
Hero Member
*
Offline Offline

Posts: 1714646344

View Profile Personal Message (Offline)

Ignore
1714646344
Reply with quote  #2

1714646344
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4613



View Profile
September 16, 2016, 01:06:38 PM
Merited by ABCbits (2)
 #2

The block reward (paid to the miner in the output of the coinbase transaction) is required to be less than or equal to the sum of the block subsidy (currently 12.5 BTC) plus all the transaction fees of all the transactions included in the block.

So, the miner spends the fees by spending the block reward.  The fees are already in there.  If a block has a total of 0.17 BTC in fees, then the miner will pay themselves 12.67 BTC in the block reward (12.5 BTC subsidy plus 0.17 BTC fees).


Enforcing this requirement can be done by adding up the values of ALL the outputs from ALL the transactions in the block (including the coinbase transaction) and making sure that sum is not greater than the sum of the current block subsidy (12.5 BTC) plus ALL of the inputs of ALL of the transactions in the block.
Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3071



View Profile
September 17, 2016, 01:11:30 AM
Merited by ABCbits (1)
 #3

From what I remember, the fees and the block subsidy are merged into a single output. So 0.17 BTC fees would create a single coinbase output of 12.67 BTC for the miner, to be spent like any other output.

Vires in numeris
No_2 (OP)
Hero Member
*****
Offline Offline

Activity: 901
Merit: 1031


BTC: the beginning of stake-based public resources


View Profile
September 20, 2016, 11:18:12 AM
 #4

Right makes sense. Thanks everyone.
No_2 (OP)
Hero Member
*****
Offline Offline

Activity: 901
Merit: 1031


BTC: the beginning of stake-based public resources


View Profile
October 04, 2016, 12:39:56 PM
 #5

Actually - one more question: If a miner does not specify the full miners' fees they are entitled to are the BTC lost?

I'm guessing the answer is no as the next block would be entitled to pick up these missing BTC, as long as it doesn't exceed the total permitted BTC for that block depth?
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6576


Just writing some code


View Profile WWW
October 04, 2016, 12:50:27 PM
Merited by ABCbits (1)
 #6

Actually - one more question: If a miner does not specify the full miners' fees they are entitled to are the BTC lost?

I'm guessing the answer is no as the next block would be entitled to pick up these missing BTC, as long as it doesn't exceed the total permitted BTC for that block depth?
IIRC if the miner does not specify the full reward (subsidy and fee) then whatever they missed will be lost. This has happened before; a miner (midnightmagic I think) missed one satoshi in the rewards so now that satoshi is permanently lost.

DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4613



View Profile
October 04, 2016, 03:25:08 PM
Merited by ABCbits (1)
 #7

Actually - one more question: If a miner does not specify the full miners' fees they are entitled to are the BTC lost?

Correct.  Permanently lost.  Those bitcoins simply cease to exist.  There is no way to get them back without a hard fork and consensus of the vast majority of users (which isn't going to happen just because some stupid miner forgot to pay himself his full reward).

This has happened before; a miner (midnightmagic I think) missed one satoshi in the rewards so now that satoshi is permanently lost.

More than one satoshi has been lost this way.  The last I looked (back in July 2014) there were about 135.2 BTC that were completely missing form the UTXO.  Some of those are probably in OP_RETURN outputs, but I think quite a few of them are from a miner that failed to pay himself his full reward (due to a bug in his mining software).
FrilledShark
Hero Member
*****
Offline Offline

Activity: 617
Merit: 500


I am the signed message, without I am not


View Profile WWW
October 04, 2016, 03:46:48 PM
 #8

More than one satoshi has been lost this way.  The last I looked (back in July 2014) there were about 135.2 BTC that were completely missing form the UTXO.  Some of those are probably in OP_RETURN outputs, but I think quite a few of them are from a miner that failed to pay himself his full reward (due to a bug in his mining software).
A few example: block 71036, which is missing the transaction fees, 0.03 BTC. (Look at: "Unparsed address")
also the one by midnight magic. (Below)

This has happened before; a miner (midnightmagic I think) missed one satoshi in the rewards so now that satoshi is permanently lost.
You are almost correct, he wrote about it here: https://bitcointalk.org/index.php?topic=7253.msg184414#msg184414.
It was more then one satoshi, as he also underpaid himself by the transaction fee. He lost 1 satoshi + 0.01 BTC (fee). He was (might still be) the only one to ever have claimed less then the block reward (Bugs making the coinbase unspendable doesn't count). Other have forgotten to claim transaction fees, but always credited themselves the full block reward.

Edit: And if you want to read more about lost bitcoins, there is a thread dedicated to it. Contains a couple of early bugs (As earlier stated by Danny) and stupid mistakes by people.
https://bitcointalk.org/index.php?topic=7253.0

Not very active. Please use PM or email to get a reply from me.
High value lender – Within 24 hours, I can fund your 10 BTC loan. Give me 48 hours and 20 BTC will be ready.
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!