How does a miner insert the hash of a merged-mined alt chain's transaction into a Bitcoin transaction?

5

I've read the 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?

bvpx

Posted 2013-07-30T02:29:13.633

Reputation: 1 072

Answers

4

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

soroushjp

Posted 2013-07-30T02:29:13.633

Reputation: 273