<p>If you fake the bitcoin blocks, then you will be mining only namecoins and no bitcoins, so you are losing 99% of your mining income.</p>

<p>You can't just mine at a height above the current namecoin blockchain. Remember that it is a chain. Each block has to link to the previous one. If you want to mine at namecoin height X which is thousands of blocks above the current height, how will you know in advance what the hash of the block at height X-1 will be?</p>

CC BY-SA 3.0
2014-04-09T14:38:24.833Z
2014-04-09T14:38:24.833Z
Dr.Haribo
<p>So, namecoin supports merged mining against bitcoin. My understanding of the merged mining protocol is that basically miners can use the primary coin's POW solution to solve the aux coin's block. It's possible for a primary coin POW solution to not be difficult enough for the primary coin, but be valid for the secondary coin. </p>

<p>However, given this, what would stop a malicious person from working on forging a set of primary blocks, such that they would meet the aux difficulty. They would set their blocks up to be a very high height so they have plenty of time to mine the blocks at the target difficulty (since they don't have enough power to do it in realtime of course). And then, when they need to control of the blockchain, they would submit all of these forged blocks at the proper time, messing up target block times and allowing them to possibly double spend.. </p>

<p>How is this prevented? </p>

<namecoin><attack><merged-mining>
How does namecoin and other merge-mined coins prevent pre-mine attacks?
Earlz
# How does namecoin and other merge-mined coins prevent pre-mine attacks?

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

So, namecoin supports merged mining against bitcoin. My understanding of the merged mining protocol is that basically miners can use the primary coin's POW solution to solve the aux coin's block. It's possible for a primary coin POW solution to not be difficult enough for the primary coin, but be valid for the secondary coin.

However, given this, what would stop a malicious person from working on forging a set of primary blocks, such that they would meet the aux difficulty. They would set their blocks up to be a very high height so they have plenty of time to mine the blocks at the target difficulty (since they don't have enough power to do it in realtime of course). And then, when they need to control of the blockchain, they would submit all of these forged blocks at the proper time, messing up target block times and allowing them to possibly double spend..

How is this prevented?

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


---

## 1 answers

### Answer by username_1 on 2014-04-09. Score: 2

If you fake the bitcoin blocks, then you will be mining only namecoins and no bitcoins, so you are losing 99% of your mining income.

You can't just mine at a height above the current namecoin blockchain. Remember that it is a chain. Each block has to link to the previous one. If you want to mine at namecoin height X which is thousands of blocks above the current height, how will you know in advance what the hash of the block at height X-1 will be?


---

