<p>The point of mining is to secure the blockchain. Before you mine, you must compose the block you are trying to find a nonce for. That block will include a transaction to pay you.</p>

<p>If you are merged mining Bitcoin and Namecoin, you do the following:</p>

<p>1) You compose the Namecoin block you are trying to find a nonce for. This includes a transaction to pay you the finder's fee.</p>

<p>2) You compose the Bitcoin block you are trying to find a nonce for. This includes a transaction to pay you the finder's fee and a transaction to secure the Namecoin block.</p>

<p>3) Now you try to find a nonce. If it meets the Bitcoin difficulty, you've mined a Bitcoin block. If it meets the Namecoin difficulty, you've mined a Namecoin block.</p>

<p>You submit a Bitcoin block the normal way. The information from the Namecoin block is ignored by the Bitcoin system.</p>

<p>You submit a Namecoin block along with enough information from the Bitcoin block and Merkle tree to prove that the nonce secures the Namecoin block.</p>

CC BY-SA 3.0
2014-04-29T07:43:55.153Z
1) and 2) are ok, but 3) isn't completely clear: if I'm mining for a Bitcoin pool and I find a nonce that matches the Namecoin difficulty, I can submit it to the namecoin chain directly, instead of sending it to the pool controller. Or do I need to sign the block with the private key of the miner who would get the BTC reward?
G B
CC BY-SA 3.0
2014-04-29T08:05:21.700Z
@GB If you're mining in a pool, you don't care about the actual difficulty or actual blocks. You just find a nonce that meets the pool's difficulty and report to the controller. Neither Bitcoin nor Namecoin blocks are ever signed. And once a block is found, you cannot tamper with it in any way or that would invalidate it.
David Schwartz
CC BY-SA 3.0
2014-04-29T08:16:58.223Z
If you are mining in a pool, you know the hashes of your shares and can compare them with the pool difficulty. You can't 'steal' blocks of the main chain because they already include the transaction giving the block reward to the pool controller. I just don't understand how the nonce is applied to the namecoin block. It cannot hash with the block header, and it needs some extra information from the bitcoin blockchain. But this information doesn't include the namecoin address. So how do I know it's the same miner who gets both rewards?
G B
CC BY-SA 3.0
2014-04-29T08:25:38.140Z
@GB Why do you care? Maybe I don't understand your question. If you're mining in a pool, it's the pool manager's job to do that. If you're solo mining, you know because you formed the blocks.
David Schwartz
CC BY-SA 3.0
2014-04-29T08:47:38.890Z
Maybe I didn't understand how a pool works... if I'm mining in a BTC pool, I check a set of possible nonces, and report to the pool controller if the hash of (block header + nonce) meets a given diff. This means: I know the hashes, I could use them myself if I discover that a particular nonce is a solution for the namecoin diff?
G B
CC BY-SA 3.0
2014-04-29T10:46:51.370Z
@GB If you use them yourself, you don't get credit for the work you did. You only get credit by submitting the work to the pool. If you somehow managed to assemble the block and submit it, the pool would get paid (since the block pays the pool) but you wouldn't get paid for that share. If you are pool mining, all the blocks you are attempting to mine are blocks the pool *asked* you to mine, and thus pay the pool. You won't get any credit for mining anything else.
David Schwartz
CC BY-SA 3.0
2014-04-29T11:05:26.333Z
let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/14208/discussion-between-g-b-and-david-schwartz)
G B
CC BY-SA 3.0
2014-04-28T18:26:57.507Z
2014-04-28T18:26:57.507Z
David Schwartz
<p>How do you claim a block reward on a merged chain?</p>

<p>If I understood it right: let's say you are mining Bitcoin and Namecoin. When you find the solution to a BTC block, you include a transaction in the block to give you a block reward.
If the hash of this block is also a solution for the Namecoin chain, where is the transaction giving you the Namecoin block reward? Where is the Namecoin address getting this reward? Or are Bitcoin addresses also valid Namecoin addresses?
And if you are only mining Bitcoin, can you claim the Namecoin block reward for a solved Bitcoin block afterwards?</p>

CC BY-SA 3.0
2014-04-28T13:17:47.520Z
NMC and BTC addresses are different, because a NMC address starts with an 'N' or 'M', and a BTC address with '1'. See [here](http://en.wikipedia.org/wiki/Namecoin#Addresses).
Mathias711
CC BY-SA 3.0
2014-04-29T02:10:00.130Z
See: http://bitcoin.stackexchange.com/questions/273
You can claim both namecoins and bitcoins at the same time, or just one of either, depending on the found solution. Since mining can be equated to a raff to receive the reward, merged mining basically means your same ticket applies to 2 (or more) raffs at the same time.
Joe Pineda
<namecoin><mining-reward><merged-mining>
How are block rewards claimed in merged mining?
G B
# How are block rewards claimed in merged mining?

(Asked by: username_0 on 2014-04-28)

How do you claim a block reward on a merged chain?

If I understood it right: let's say you are mining Bitcoin and Namecoin. When you find the solution to a BTC block, you include a transaction in the block to give you a block reward.
If the hash of this block is also a solution for the Namecoin chain, where is the transaction giving you the Namecoin block reward? Where is the Namecoin address getting this reward? Or are Bitcoin addresses also valid Namecoin addresses?
And if you are only mining Bitcoin, can you claim the Namecoin block reward for a solved Bitcoin block afterwards?

**Tags:** namecoin, mining-reward, merged-mining

> **Comments:**
> **username_1**: NMC and BTC addresses are different, because a NMC address starts with an 'N' or 'M', and a BTC address with '1'. See [here](http://en.wikipedia.org/wiki/Namecoin#Addresses).  
> **username_2**: See: http://bitcoin.stackexchange.com/questions/273 You can claim both namecoins and bitcoins at the same time, or just one of either, depending on the found solution. Since mining can be equated to a raff to receive the reward, merged mining basically means your same ticket applies to 2 (or more) raffs at the same time.  

---

## 1 answers

### Answer by username_3 on 2014-04-28. Score: 3 | Accepted answer

The point of mining is to secure the blockchain. Before you mine, you must compose the block you are trying to find a nonce for. That block will include a transaction to pay you.

If you are merged mining Bitcoin and Namecoin, you do the following:

1) You compose the Namecoin block you are trying to find a nonce for. This includes a transaction to pay you the finder's fee.

2) You compose the Bitcoin block you are trying to find a nonce for. This includes a transaction to pay you the finder's fee and a transaction to secure the Namecoin block.

3) Now you try to find a nonce. If it meets the Bitcoin difficulty, you've mined a Bitcoin block. If it meets the Namecoin difficulty, you've mined a Namecoin block.

You submit a Bitcoin block the normal way. The information from the Namecoin block is ignored by the Bitcoin system.

You submit a Namecoin block along with enough information from the Bitcoin block and Merkle tree to prove that the nonce secures the Namecoin block.

> **Comments:**
> **username_0**: 1) and 2) are ok, but 3) isn't completely clear: if I'm mining for a Bitcoin pool and I find a nonce that matches the Namecoin difficulty, I can submit it to the namecoin chain directly, instead of sending it to the pool controller. Or do I need to sign the block with the private key of the miner who would get the BTC reward?  
> **username_3**: @GB If you're mining in a pool, you don't care about the actual difficulty or actual blocks. You just find a nonce that meets the pool's difficulty and report to the controller. Neither Bitcoin nor Namecoin blocks are ever signed. And once a block is found, you cannot tamper with it in any way or that would invalidate it.  
> **username_0**: If you are mining in a pool, you know the hashes of your shares and can compare them with the pool difficulty. You can't 'steal' blocks of the main chain because they already include the transaction giving the block reward to the pool controller. I just don't understand how the nonce is applied to the namecoin block. It cannot hash with the block header, and it needs some extra information from the bitcoin blockchain. But this information doesn't include the namecoin address. So how do I know it's the same miner who gets both rewards?  
> **username_3**: @GB Why do you care? Maybe I don't understand your question. If you're mining in a pool, it's the pool manager's job to do that. If you're solo mining, you know because you formed the blocks.  
> **username_0**: Maybe I didn't understand how a pool works... if I'm mining in a BTC pool, I check a set of possible nonces, and report to the pool controller if the hash of (block header + nonce) meets a given diff. This means: I know the hashes, I could use them myself if I discover that a particular nonce is a solution for the namecoin diff?  
> **username_3**: @GB If you use them yourself, you don't get credit for the work you did. You only get credit by submitting the work to the pool. If you somehow managed to assemble the block and submit it, the pool would get paid (since the block pays the pool) but you wouldn't get paid for that share. If you are pool mining, all the blocks you are attempting to mine are blocks the pool *asked* you to mine, and thus pay the pool. You won't get any credit for mining anything else.  
> **username_0**: let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/14208/discussion-between-g-b-and-username_3-username_3)  

---

