How is the reward that you got after calculating the right hash added in the blockchain?

3

I have a question. If for each transaction, the hash is calculated and so the pool who calculates it gets the bitcoins as reward, now getting reward means bitcoins gets added to your wallet, but this also becomes 1 transaction so doesn't it require that transaction to be included as well? And if yes, then doesn't the process become recursive?

Pooja

Posted 2014-03-18T05:17:31.173

Reputation: 31

Answers

2

When you are mining, you always compute hashes of blocks assuming that you will be the one to find the block. So you already include this special transaction, known as a coinbase transaction (not to be confused with a transaction made using the service Coinbase - here coinbase just means coin generation), in the block you're hashing. If you're right, then great, you've found a block and included a transaction that sends 25 BTC + transaction fees to yourself. If you're wrong, and someone else finds the block first, there's no harm in that. Just give up on the current block and start working on the next one.

For a more technical side, when you compute a hash you're really hashing the block header. It includes a bunch of things, one of which is the hashMerkleRoot, a hash of the transactions in the block.

Tony

Posted 2014-03-18T05:17:31.173

Reputation: 1 104

Yeah I understood that but this 25BTC + transaction fee amount will be added to my account, so this transaction also needs to get added in blockchain right???Pooja 2014-03-18T06:15:21.370

As I said, you put this coinbase transaction into the block before you even find a hash for it. When you find a qualifying hash, you're ready to submit it to the network.Tony 2014-03-18T06:16:58.473

k k got it..It means coinbase transaction is the one who will pay you reward and will add this transaction in block chain???Pooja 2014-03-18T06:20:14.000

@Pooja: Yes, that is right.Murch 2014-03-18T07:58:49.800

ok ok Thanks Tony for clearing my doubt. Thank you Murch.Pooja 2014-03-18T08:54:44.980

I have another doubt, how many worker nodes can be there in one pool? and how work get divided in pool? what algorithm worker node uses?Pooja 2014-03-18T10:26:50.743

There can be arbitrarily many workers in a pool. Everyone gets the same work, but faster miners submit shares faster. Workers use the same algorithm as whatever the network is at (which is SHA-256 for Bitcoin), but at a lower difficulty.Tony 2014-03-18T17:41:38.577