0

If a miner creates a block including an appropriate hash value, then he sends it to all nodes, and each node verifies if this is correct or not and add it to the previous block chain if this is chosen to be a correct one.

I read here that after 100 more blocks are added to the previous block chain (actually it is written that after 100 depths, but I think this means what I am saying here), a miner gets rewarded.

When a block is created, a miner puts informations like “I take 0.05BTC from transaction A for the mining fee” to get transaction fees. However, as far as I know, a miner get 12.5BTC newly created bitcoins in addition. How does a miner put this information in a block?

2

Both the block reward and the fees are collected via a "coinbase transaction", which is the first transaction in the block. It has no inputs, and the total value of its outputs is allowed to equal the sum of the block reward plus all the fees from the block. The miner can then set the outputs of this transaction to pay the total to their own address(es).

In particular, it is not necessary for the miner to explicitly list which fees are being collected from which transactions. It's assumed that all fees from all transactions in the block can be collected, so this determines the allowable amount for the coinbase transaction.

The "after 100 blocks" rule is enforced by requiring that none of the next 100 blocks is allowed to contain a transaction which spends this block's coinbase transaction. I guess it's a matter of semantics whether the reward "happens" with this block or 100 blocks later.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.