Author

Topic: guide to creating a merge mined blockchain? (Read 644 times)

legendary
Activity: 924
Merit: 1132
March 29, 2014, 11:06:25 PM
#2
Let me see that I correctly understand the way it works.... 

A miner first constructs a potential block in the dependent blockchain.  He takes the hash of this block, then constructs a potential block for the bitcoin blockchain embedding the hash into a coinbase transaction.  - maybe as part of a script on the output or something? 

Now he starts hashing.  If he finds a hash with difficulty acceptable to the dependent blockchain, he packages up the entire bitcoin block header, with the hash, and publishes that in the altchain block as his proof of work.  Altcoin miners can check the block, verify that the hash goes with the header and the nonce and meets the altcoin proof of work requirement, and accept it. 

If he finds a hash with difficulty acceptable to the bitcoin blockchain, he sends the block to the bitcoin blockchain, complete with its somewhat funny-looking coinbase txout containing something that wasn't strictly necessary for Bitcoin.  He can spend the txout, and it's a valid tx that everyone else on the bitcoin network can check, so this isn't a problem. 

It is possible in principle for a hash to be published in either chain or both or neither, or in the case that multiple altchains are being merge mined, in any combination of them.

If merge mining multiple altchains, the miner must embed multiple hashes into the coinbase transaction - which shouldn't be too difficult if the alts cooperate with each other,  but the altchains need to know how to find their own block hashes and not specify so much about the shape of the coinbase transaction that the miner cannot construct one that successfully contains all the hashes in a usable form.

Do I have this right in principle?
legendary
Activity: 924
Merit: 1132

I am working on a project which requires a blockchain.  Rather than trying to scare up a cadre of hashers and trying to keep a tiny new altchain secure in a world where whales can eat such small blockchains for a snack or even destroy them accidentally, I would like to take advantage of the vast SHA256 hashing infrastructure that has been built for Bitcoin. 

Is there any guide available for creating a merge mined coin that gets down to specifics like blockchain header structure etc?  And how to modify mining software to test it against a bitcoin testnet chain? 

Or should I just download Namecoin/IXcoin/CoiledCoin sources and try to figure it all out from the worked examples? 
Jump to: