How do I add 2 auxiliary chains to the pool? #6
Replies: 8 comments 7 replies
-
Hello, pepecoinppc! I appreciate your interest in the project. You're correct in explaining that multiple aux chains are not supported, and I've been unable to find the appropriate documentation to achieve multiple aux chains. In the docs/ folder, you'll find the best notes I've seen on the topic. I've noted fields that require further research. Block assembly and serialization knowledge is helpful to further the research. If you're familiar with Dogecoin's source code, another breadcrumb would be their "createauxblock" RPC method - Dogecoin creates the auxiliary data for you. I'm happy to provide you with what I have so far. Adding multiple aux coins would be extremely helpful. |
Beta Was this translation helpful? Give feedback.
-
Thank you! I agree that there are no other merged mining pools at the moment. It took me 2 years to fully grasp merged mining and develop this pool. I'd love to support Pepecoin if time allows. Also, thank you for that resource. I'll digest it when the time comes. Patrick may be the best resource to understand the block serialization of a 1 > aux coin mined block. I think we'd need to identify a block on the chain that had been mined as such. Bitcoin has plenty of examples. |
Beta Was this translation helpful? Give feedback.
-
Ok, I've been poking around in the Pepecoin (basically Dogecoin) source code. In https://github.com/pepecoinppc/pepecoin/blob/master/src/auxpow.cpp#L81-L157 The if statement on line 115 checks to see if something called the This looks like where the magic is happening |
Beta Was this translation helpful? Give feedback.
-
Ok here's an example of it running the "check" function once. At line 114, I added print statements which print the hex values of vchRootHash and script.
You know more about this than me. I believe this is what it's looking for though.
It looks like we're on the right track here though. |
Beta Was this translation helpful? Give feedback.
-
Sorry, just trying to document my progress for you. The TLDR; is that the check function in Dogecoin/Pepecoin here https://github.com/pepecoinppc/pepecoin/blob/master/src/auxpow.cpp#L81-L157 seems to be what you're looking for. |
Beta Was this translation helpful? Give feedback.
-
Ok, in the coinbase value, the check function is expecting the following string of hex
Here's a Dogecoin block with a coinbase that has these values. This is block 5190783. Mined by Mining Dutch. 0455bf2401046f282f6608 fabe6d6d 94c46eb28cf007751829674b1a7fc185572f74e04967e8a09d5fe0e039d1e540 00010000 00000000 01c79a23c30400004603112f4d696e696e672d44757463682f2d3333 Update: Alright, I see this documented in the docs. Doing further research. |
Beta Was this translation helpful? Give feedback.
-
Right now, we are using the "Hash of the AuxPOW block header" (aka I believe we need to be using the "root of the chain merkle branch". Here's an illustration of the parent chain's merkle tree source
It looks like the 3 => 4 I think
Does this help? Sorry if it's overwhelming. |
Beta Was this translation helpful? Give feedback.
-
The code would need to be updated in a few more places, but the key functions to look at for multi-coin mining are AuxBlock.GetWork(), AuxBlock.MakeAuxPow(), and AuxBlock.makeAuxChainMerkleBranch() |
Beta Was this translation helpful? Give feedback.
-
Hi! This project is awesome!
It seems like it's a little bit lacking in documentation though. I was wondering how you add a 2nd AuxPow coin. I'm able to mine Litecoin and Dogecoin on the testnets, but not a 3rd coin. I'm trying to add Pepecoin (a fork of Dogecoin). I added a
pepecoin.go
class, added it to thechain.go
switch statement, but it's still not submitting blocks to Aux2.I have a hunch that's it's not quite complete yet. Has support for multiple aux chains not been implemented yet?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions