<p>A 44-byte header cointaining:</p>

<ul>
<li>magic: 0xfa, 0xbe, 'm', 'm' (only required if over 20 bytes past the start of the script; optional otherwise)</li>
<li>block_hash: Hash of the Namecoin block header</li>
<li>merkle_size: Number of entries in aux work merkle tree.</li>
<li>merkle_nonce: Nonce used to calculate indexes into aux work merkle tree; you may as well leave this at zero</li>
</ul>

<p>is included in the <strong><em>scriptSig of the coinbase transaction in the Bitcoin block</em></strong> and sent to the Bitcoin network. Note that it is only sent to the Bitcoin network if it meets the network difficulty of Bitcoin. If it only meets the difficulty of Namecoin, it is only sent to the Namecoin network.</p>

<p>Source: <a href="https://en.bitcoin.it/wiki/Merged_mining_specification" rel="nofollow">https://en.bitcoin.it/wiki/Merged_mining_specification</a></p>

CC BY-SA 3.0
2014-12-23T04:54:09.277Z
2014-12-23T04:54:09.277Z
soroushjp
<p>I've read the <a href="https://bitcoin.stackexchange.com/questions/273/how-does-merged-mining-work">how does merged mining work?</a> thread and I'm a bit confused as to how one of the transactions in the bitcoin block "stores" the hash of the Namecoin block. Where is this information stored in the transaction sent to the bitcoin network? As a recipient address? Somewhere else? </p>

<mining-pools><merged-mining>
How does a miner insert the hash of a merged-mined alt chain's transaction into a Bitcoin transaction?
bvpx
# How does a miner insert the hash of a merged-mined alt chain's transaction into a Bitcoin transaction?

(Asked by: username_0 on 2013-07-30)

I've read the [how does merged mining work?](https://bitcoin.stackexchange.com/questions/273/how-does-merged-mining-work) thread and I'm a bit confused as to how one of the transactions in the bitcoin block "stores" the hash of the Namecoin block. Where is this information stored in the transaction sent to the bitcoin network? As a recipient address? Somewhere else?

**Tags:** mining-pools, merged-mining


---

## 1 answers

### Answer by username_1 on 2014-12-23. Score: 4 | Accepted answer

A 44-byte header cointaining:

* magic: 0xfa, 0xbe, 'm', 'm' (only required if over 20 bytes past the start of the script; optional otherwise)
* block\_hash: Hash of the Namecoin block header
* merkle\_size: Number of entries in aux work merkle tree.
* merkle\_nonce: Nonce used to calculate indexes into aux work merkle tree; you may as well leave this at zero

is included in the ***scriptSig of the coinbase transaction in the Bitcoin block*** and sent to the Bitcoin network. Note that it is only sent to the Bitcoin network if it meets the network difficulty of Bitcoin. If it only meets the difficulty of Namecoin, it is only sent to the Namecoin network.

Source: <https://en.bitcoin.it/wiki/Merged_mining_specification>


---

