Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: r1s2g3 on April 11, 2018, 06:02:24 PM



Title: How miners get rewards
Post by: r1s2g3 on April 11, 2018, 06:02:24 PM
I was going through some old thread , When I found below

Bitcoins aren't stored anywhere because they don't exist.
This is actually correct. Apologies for the over-simplification. Bitcoins are indeed abstractions; they exist only in the form of ‘unspent transaction outputs’, UTXOs. Allow me to try to clarify with the help of a blockchain explorer:

  • One of the first bitcoin transactions was https://blockchain.info/tx/0437cd7f8525ceed2324359c2d0ba26006d92d856a9c20fa0241106ee5a597c9, wherein a 50 bitcoin UTXO was created as a reward to the miner.


Actually I am bit confused with this quoted transaction  as it is "No Inputs (Newly Generated Coins)   ".
I assumed that block reward for miner should contain all the transactions done in the block and not like that something generated without "Input".
I also read somewhere that miner get the block rewards not instantaneously but after other 99  blocks added. Is this block reward is triggered by addition of  the more 99 blocks afterwards?
But still I think some input should be there if some unspent transactions are created.
 


Title: Re: How miners get rewards
Post by: Xynerise on April 11, 2018, 07:02:02 PM
Quote
I assumed that block reward for miner should contain all the transactions done in the block and not like that something generated without "Input".
No, it doesn't work that way.
Inputs of a transaction are previous outputs, so if the Coinbase transaction contained the txs in the block as inputs it would mean that somehow the people sending the transactions in the block sent them all to the miner's bitcoin address.
The Coinbase transaction is required for any block and stands on its own as "proof" that the transactions in the block took place and were mined.
Coinbase transactions have no inputs; the outputs of the Coinbase transaction include the block reward (block subsidy + tx fees of all the transactions in the block)
This is the  Coinbase transaction of the most recent book (https://blockchain.info/tx/ea86ff9fa2db435bb0457575ba93c4d6cccc2450c012291aec6cf922be13b520)
Even though the transaction has no inputs, it has an output of 12.707 BTC -- that's 12.5BTC block subsidy + 0.707BTC as the transaction fees in the block.


Quote
I also read somewhere that miner get the block rewards not instantaneously but after other 99  blocks added.
It's actually instantaneous, as you can see from the transaction above, however the output of any Coinbase transaction cannot be spent until after 100 blocks. This is called the block maturation, and it is to account for possible blockchain forks where more than one miner finds a valid block at the same time.
Quote
Is this block reward is triggered by addition of  the more 99 blocks afterwards?
Not "triggered" per se.
The elapse of the block maturation period means it's now available for the miner to spend.

If the miner tries to spend it before the maturation period then the nodes of the network will reject the transaction, and if the miner includes the transaction in his block he mines then other nodes in the network will reject his block as invalid and all his work would be a waste.

Andreas Antonopolous explains it far better than I can here (https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch10.asciidoc)


Title: Re: How miners get rewards
Post by: r1s2g3 on April 12, 2018, 06:46:31 AM

Coinbase transactions have no inputs; the outputs of the Coinbase transaction include the block reward (block subsidy + tx fees of all the transactions in the block)


Thanks for sharing the link of book.

If I am correct then it means a single miner /mining pool get all the reward of finding the block and the transactions contained in it. Transactions are confirmed in block not as individual.
So it is highly possible  that someone producing low hash will not be able to  find any block and get any transaction fees


Title: Re: How miners get rewards
Post by: Xynerise on April 12, 2018, 08:34:11 AM

If I am correct then it means a single miner /mining pool get all the reward of finding the block and the transactions contained in it.
Exactly, yes.
If it's one large miner then they get the block reward and transaction fees for themselves alone, if it's a mining pool that finds the block then they'll share the block reward as shares among the pool participants according to their contributed hashrate.
Quote
Transactions are confirmed in block not as individual.
Yes, correct.
Although a block can include a single transaction (apart from the Coinbase), a transaction cannot be confirmed on its own without being part of a block.
Quote
So it is highly possible  that someone producing low hash will not be able to  find any block and get any transaction fees

It is VERY unlikely.
The probability is so low that it's well nigh impossible.


Title: Re: How miners get rewards
Post by: buwaytress on April 12, 2018, 12:22:05 PM
Thanks for sharing the link of book.

If I am correct then it means a single miner /mining pool get all the reward of finding the block and the transactions contained in it. Transactions are confirmed in block not as individual.
So it is highly possible  that someone producing low hash will not be able to  find any block and get any transaction fees

Just to add, yes virtually impossible for individuals now to find blocks. I'm pretty certain there is no longer any individual miner (or individual who owns a lot of rigs) trying on his own. I believe everyone is part of some pool now. In this case, then even your "low" hash can still earn you a proportional share of the rewards if the pool you joined finds a block. A somewhat comparable example is with so-called cloud mining services...

Halving likely to happen again on July 2016.
Then miners will earn BTC 12.50
"Likely?" Here, have the award for laziest copy paste :(

Wow, you actually caused a copy paster guy to edit and correct his post. I feel like you just achieved something amazing here...