Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Luke-Jr on October 11, 2011, 03:40:56 PM



Title: "Prove yourself" / Sane merged-mining implementation
Post by: Luke-Jr on October 11, 2011, 03:40:56 PM
I've completed a very rough draft of a complete sane merged-mining implementation for Eligius. By sane, I mean it adds no potential harm to the Bitcoin mining operation. This goal is accomplished by making minimal changes (only 2 simple small patches) to bitcoind, and having it ignore problems with the merged mining manager.

The code is all MIT licensed for anyone to use, but I am posting it primarily for new developers who want to prove their skills and get involved more with bitcoin development. Parts 2 and 3 of this implementation are functional, but incomplete. They need some cleanup before they can be merged to mainline codebases (bitcoind and merged-mine-proxy). I'm available on IRC if anyone tackling this needs mentoring/assistance.

It is made up of 3 parts:
1. Coinbaser -- relatively simply branch/patch for Bitcoind to allow mutations to the coinbase transaction; it wasn't merged to 0.5, but ready to go as soon as 0.5 final is released (as a feature in 0.6); stable and well-tested
  • 0.4.x branch: http://luke.dashjr.org/programs/bitcoin/w/bitcoind/luke-jr.git/shortlog/refs/heads/coinbaser_0.4.x
  • 0.5.x branch: http://luke.dashjr.org/programs/bitcoin/w/bitcoind/luke-jr.git/shortlog/refs/heads/coinbaser
  • All-in-one patch (for human read-over): http://pastebin.com/TLyTnNFY
2. "gotwork" outbound JSON-RPC call -- very simple patch for bitcoind to make an outbound "gotwork" JSON-RPC call whenever a work is submitted; needs cleanup, but otherwise works; there is a single hash/dictionary parameter with "hash", "header", and "coinbaseMrkl" keys
  • Rough draft commit: http://luke.dashjr.org/programs/bitcoin/w/bitcoind/luke-jr.git/commitdiff/3c853092e77d797773bf57f796d58fc067939280
3. Hacks to merged-mine-proxy to run parallel to bitcoind -- this hack only supports a single aux chain, and will need its own merkle root maker to support more; it needs cleanup to be made compatible with the current merged-mine-proxy usage
  • Patch against merged-mine-proxy: http://pastebin.com/hufxiKa4


Title: Re: "Prove yourself" / Sane merged-mining implementation
Post by: Luke-Jr on October 11, 2011, 10:40:21 PM
I also started a merged-mining specification page at https://en.bitcoin.it/wiki/Merged_mining_specification


Title: Re: "Prove yourself" / Sane merged-mining implementation
Post by: Mike Hearn on October 13, 2011, 12:57:13 PM
Thanks for doing this. It looks good to me.

Just one request - could you update/merge/link together your wiki page and the Alternative Chains page? The terminology has changed over time and it'd be good to rationalize this (ie aux vs alt chain), also my original page says that the coinbase modification RPC isn't implemented - except now you've gone and implemented it so that's out of date.


Title: Re: "Prove yourself" / Sane merged-mining implementation
Post by: finway on October 13, 2011, 04:38:20 PM
wonderful !!


Title: Re: "Prove yourself" / Sane merged-mining implementation
Post by: John Tobey on October 13, 2011, 05:11:02 PM
Yum!  Looking forward to a new class of entrepreneurs: chain aggregators who provide aux work Merkle trees to pools and will include anyone's new chain for a small fee.  Vires in numeris!


Title: Re: "Prove yourself" / Sane merged-mining implementation
Post by: finway on October 13, 2011, 05:53:39 PM
Where can i get the 0.5 version of bitcoind (win32 binary) for merged mining ?