How are block rewards claimed in merged mining?

2

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?

G B

Posted 2014-04-28T13:06:55.893

Reputation: 165

NMC and BTC addresses are different, because a NMC address starts with an 'N' or 'M', and a BTC address with '1'. See here.

– Mathias711 – 2014-04-28T13:17:47.520

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 – 2014-04-29T02:10:00.130

Answers

3

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.

David Schwartz

Posted 2014-04-28T13:06:55.893

Reputation: 48 957

>

  • 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 – 2014-04-29T07:43:55.153

    @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 – 2014-04-29T08:05:21.700

    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 – 2014-04-29T08:16:58.223

    @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 – 2014-04-29T08:25:38.140

    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 – 2014-04-29T08:47:38.890

    @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 – 2014-04-29T10:46:51.370

    let us continue this discussion in chat

    – G B – 2014-04-29T11:05:26.333