Bitcoin Forum
May 07, 2024, 11:59:55 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: guide to creating a merge mined blockchain?  (Read 621 times)
Cryddit (OP)
Legendary
*
Offline Offline

Activity: 924
Merit: 1129


View Profile
March 30, 2014, 02:51:55 AM
 #1


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? 
1715126395
Hero Member
*
Offline Offline

Posts: 1715126395

View Profile Personal Message (Offline)

Ignore
1715126395
Reply with quote  #2

1715126395
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Cryddit (OP)
Legendary
*
Offline Offline

Activity: 924
Merit: 1129


View Profile
March 30, 2014, 04:06:25 AM
 #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?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!