<p>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 <a href="https://en.bitcoin.it/wiki/Protocol_specification#Transaction_Verification" rel="nofollow">coinbase transaction</a> (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.</p>

<p>For a more technical side, when you compute a hash you're really hashing the <a href="https://en.bitcoin.it/wiki/Block_hashing_algorithm" rel="nofollow">block header</a>. It includes a bunch of things, one of which is the hashMerkleRoot, a hash of the transactions in the block.</p>

CC BY-SA 3.0
2014-03-18T06:15:21.370Z
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
CC BY-SA 3.0
2014-03-18T06:16:58.473Z
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
CC BY-SA 3.0
2014-03-18T06:20:14.000Z
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
CC BY-SA 3.0
2014-03-18T07:58:49.800Z
@Pooja: Yes, that is right.
Murch
CC BY-SA 3.0
2014-03-18T08:54:44.980Z
ok ok Thanks Tony for clearing my doubt. Thank you Murch.
Pooja
CC BY-SA 3.0
2014-03-18T10:26:50.743Z
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
CC BY-SA 3.0
2014-03-18T17:41:38.577Z
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
CC BY-SA 3.0
2014-03-18T06:08:46.800Z
2014-03-18T06:08:46.800Z
Tony
<p>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?</p>

<blockchain>
How is the reward that you got after calculating the right hash added in the blockchain?
Pooja
# How is the reward that you got after calculating the right hash added in the blockchain?

(Asked by: username_0 on 2014-03-18)

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?

**Tags:** blockchain


---

## 1 answers

### Answer by username_1 on 2014-03-18. Score: 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](https://en.bitcoin.it/wiki/Protocol_specification#Transaction_Verification) (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](https://en.bitcoin.it/wiki/Block_hashing_algorithm). It includes a bunch of things, one of which is the hashMerkleRoot, a hash of the transactions in the block.

> **Comments:**
> **username_0**: 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???  
> **username_1**: 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.  
> **username_0**: k k got it..It means coinbase transaction is the one who will pay you reward and will add this transaction in block chain???  
> **username_2**: @username_0: Yes, that is right.  
> **username_0**: ok ok Thanks username_1 for clearing my doubt. Thank you username_2.  
> **username_0**: 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?  
> **username_1**: 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.  

---

