Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: ahmed_bodi on July 20, 2013, 02:45:20 AM



Title: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: ahmed_bodi on July 20, 2013, 02:45:20 AM
Im working on the mergecoin code to try out different coins that im thinking of making and i get this error when compiling? anyone have any ideas?

Error: http://pastebin.com/7NXkB5RQ


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: markm on July 20, 2013, 03:19:24 AM
Did you finish the applying of the patches?

Several chuncks of the merged mining as a secondary coin patches were rejected by the patch program, they need to be manually applied, they are the .rej files.

I applied what I could, however i left the .rej files anyway so people can check what i actually did to what was supposed to be done but got rejected.

Even once all are cleanly applied the result will be a version of bitcoin that would be able to act as a secondary chain in a merge, which would be a hard fork of bitcoin.

But once that has been done, then all the various coins can clone it and start chaing the name the icons the block rewards and so on, all the things that make them each a different coin.

-MarkM-

EDIT actually once those patches are cleanly applied then also whatever bitcoin's vulnerability fix should also be applied before all the various coins clone it to mutate into a newer version of themselves.


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: ahmed_bodi on July 20, 2013, 03:22:45 AM
where can i obtain these patches, i cant seem to find them in your github repo?


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: markm on July 20, 2013, 03:26:42 AM
where can i obtain these patches, i cant seem to find them in your github repo?

The mergecoin repo is bitcoin and the patch and the rejects that resulted from using the program named patch to apply the patch.

However it looks like the patch did not include any entire new separate files needed, only changes to files that already existed in bitcoin back when the patch was made.

The missing files though are already in all the merged mined coins that were already made by applying the full version of the patch, including it seems some entirely new files that had not existed in bitcoin before.

So groupcoin, devcoin, whatevercoin all likely contain copies of the files that for some reason the one big patch file form of the patch does not contain.

-MarkM-


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: ahmed_bodi on July 20, 2013, 03:28:44 AM
right okay, i might try one of the ideas ou posted on the other threads about comparing the coins code to the bitcoin's code then, Do you know which was the last version of bitcoin to use berkerlydb


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: markm on July 20, 2013, 03:33:42 AM
Ahh there is an idea! Yes, try doing a diff of the last version of bitcoin to use Berkeley DB against the latest version of bitcoin, then try to apply that as a patch to the least-different-from-bitcoin merged mined coin that has no known bugs or quirks of its own. So, like groupcoin or ixcoin, I guess.

-MarkM-


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: ahmed_bodi on July 20, 2013, 03:35:54 AM
nice thanks


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: doublec on July 20, 2013, 03:40:27 AM
I have a version of the patches required to use bitcoin as a primary chain rebased on top of bitcoin 0.8.1 with the recent security fix and performance improvement patch from 0.8.3 and 0.8.2 respectively cherry picked. It's in the m0.8.1_merged branch of my bitcoin fork on github: https://github.com/doublec/bitcoin/tree/m0.8.1_merged

The commit you're looking for for just the merge mining code is: https://github.com/doublec/bitcoin/commit/7a6e135db4cdbf70c56546da8a5974152ef84e5a

The branch also includes a patch for using libzmq for block notifications which you probably don't want. Although it doesn't include the patches required for an auxilliary chain it should be fairly easy to add those as it'll just be the rpc functions that are needed. The patch also includes some extra stuff I used to use for implementing getblocktemplate with merge mining but you can strip those out if you don't need them.


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: markm on July 20, 2013, 03:49:49 AM
I have a version of the patches required to use bitcoin as a primary chain rebased on top of bitcoin 0.8.1 with the recent security fix and performance improvement patch from 0.8.3 and 0.8.2 respectively cherry picked. It's in the m0.8.1_merged branch of my bitcoin fork on github: https://github.com/doublec/bitcoin/tree/m0.8.1_merged

The commit you're looking for for just the merge mining code is: https://github.com/doublec/bitcoin/commit/7a6e135db4cdbf70c56546da8a5974152ef84e5a

The branch also includes a patch for using libzmq for block notifications which you probably don't want. Although it doesn't include the patches required for an auxilliary chain it should be fairly easy to add those as it'll just be the rpc functions that are needed. The patch also includes some extra stuff I used to use for implementing getblocktemplate with merge mining but you can strip those out if you don't need them.

Its secondary chain we want. Bitcoin cannot act as secondary chain. Doing search and replace on bitcoin to change name rewards etc to make a new coin will result in a coin that can act as primary chain, because bitcoin can. Them merged mined coins need the "be able to act as a secondary chain" patches, those are the ones we need.

Being able to act as primary we get for free from bitcoin directly.

-MarkM-


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: ahmed_bodi on July 20, 2013, 03:52:05 AM
nope i need my coin to act as primary chain and be able to merge mine secondary chains like dvc


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: doublec on July 20, 2013, 03:53:42 AM
Its secondary chain we want.
That's why I wrote "Although it doesn't include the patches required for an auxilliary chain it should be fairly easy to add those as it'll just be the rpc functions that are needed.". That commit does all the hard work. It ports over the auxpow stuff, changes the things required in block creation,etc. You can do the rest if you want it.


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: markm on July 20, 2013, 03:54:23 AM
nope i need my coin to act as primary chain and be able to merge mine secondary chains like dvc

Yes but all coins derived from bitcoin already can act as primary chain, because bitcoin already can.

What we need to add to bitcoin before changing its name and rewards and such to clone all the other coins from it is ONLY the "act as a secondary chain" stuff. it already has everything else except the names icons rewards quirks etc that make each coin different. They all are just bitcoin plus acting as a secondary chain plus what makes them individually unique/different.

-MarkM-


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: ahmed_bodi on July 20, 2013, 03:57:15 AM
right okay i think i understand. So basically i need to apply the aux chain patches to the coin im working on and then it should be able to be merged mined with dvc and ixc etc


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: doublec on July 20, 2013, 03:57:27 AM
Yes but all coins derived from bitcoin already can act as primary chain, because bitcoin already can.
Well, yes and no. If they're using the 'merge mining proxy' they can't as that proxy requires patches to bitcoin. If they're using custom block generation pool software then that software would need to be changed to work with their coin.


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: markm on July 20, 2013, 03:57:37 AM
Its secondary chain we want.
That's why I wrote "Although it doesn't include the patches required for an auxilliary chain it should be fairly easy to add those as it'll just be the rpc functions that are needed.". That commit does all the hard work. It ports over the auxpow stuff, changes the things required in block creation,etc. You can do the rest if you want it.

Okay I am not understanding what you mean then. By use bitcoin as a primary chain, you mean act as a secondary chain?

Of course the identification of which aux you are is unique to each chain so is a separate thing like name icon etc, part of what each coin needs to change to be its own unique different (aux) chain.

-MarkM-


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: doublec on July 20, 2013, 04:00:20 AM
Okay I am not understanding what you mean then. By use bitcoin as a primary chain, you mean act as a secondary chain?
No, I mean as a primary chain using the merge mining proxy software. That software requires extra RPC commands to be patched to bitcoin. This patch ports those extra RPC commands. But those RPC commands also use a bunch of stuff that the secondary chain RPC commands use - so a lot of the porting work to get the secondary chain additional stuff working is also done in this patch.


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: markm on July 20, 2013, 04:00:49 AM
right okay i think i understand. So basically i need to apply the aux chain patches to the coin im working on and then it should be able to be merged mined with dvc and ixc etc

I guess I don't know what each of these differently named patches are supposed to contain.

I had one huge patch that was the difference between bitcoin and a coin that could act as a secondary chain. It originally came from the namecoin dev, but that would maybe have contained a lot of namecoin-specific stuff not useful to other coins unless he himself did what I am proposing, of first adding to bitcoin the merged mining as a secondary chain stuff befroe doing stuff that is specific to a particular other coin such as namecoin. So likely what I used was what doublec had made after he stripped out all the namecoin-specific stuff (if present) to get down to the nitty gritty of just the merged mining without all the namecoin domains etc etc stuff that other coins don't need or want.

-MarkM-


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: ahmed_bodi on July 20, 2013, 04:02:21 AM
basically what im after is modifying the coin im working on to be able to merged mined, likely with something like p2pool with DVC, IXC, I0C, NMC as aux chains


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: markm on July 20, 2013, 04:04:10 AM
basically what im after is modifying the coin im working on to be able to merged mined, likely with something like p2pool with DVC, IXC, I0C, NMC as aux chains

Well maybe find the merged mined coin that is most similar in code/version to the bitcoin version you based your coin on, do a diff between that coin and yours, remove all the parts of the diff that are the coin-specific things making one coin different from another, and what is left should be the parts of merged mining that your coin does not yet have.

-MarkM-


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: doublec on July 20, 2013, 04:04:26 AM
basically what im after is modifying the coin im working on to be able to merged mined, likely with something like p2pool with DVC, IXC, I0C, NMC as aux chains
If you cherry pick the commit I referenced to your coin and use the "merge mining proxy" that is included in the 'contrib' directory that is added by that commit then you can have your coin as a primary chain while mining DVC, etc as secondary chains. You won't be able to mine bitcoin though but from your posts I'm assuming you are fine with that.


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: ahmed_bodi on July 20, 2013, 04:05:37 AM
yep thanks, that seems fine. By cherry pick is there anything in particular i should be applying?


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: doublec on July 20, 2013, 04:07:46 AM
yep thanks, that seems fine. By cherry pick is there anything in particular i should be applying?
From your coin repository, something like:

1. git remote add foo git://github.com/doublec/bitcoin
2. git fetch foo
3. git cherry-pick 7a6e135db4cdbf70c56546da8a5974152ef84e5a
4. Fix any conflicts

If you're stuck I could probably do it for a 50 BTC  bounty or so.


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: markm on July 20, 2013, 04:07:52 AM
Okay I am not understanding what you mean then. By use bitcoin as a primary chain, you mean act as a secondary chain?
No, I mean as a primary chain using the merge mining proxy software. That software requires extra RPC commands to be patched to bitcoin. This patch ports those extra RPC commands. But those RPC commands also use a bunch of stuff that the secondary chain RPC commands use - so a lot of the porting work to get the secondary chain additional stuff working is also done in this patch.

Okay but i don't have to patch bitcoin when I want to use it as a secondary chain, so presumably that part is already in bitcoin nowadays.

I guess the big patch I was using tells the patch program to make changes it sees to be already in place so it jsut ignores them, no rejecting needed, just "already applied" and on it goes, or something.

it also contains th parts that ahve not yet been applied to mainline bitcoin, and those are the parts we need to apply to mainline bitcoin to make a 'bitcoin that can act as a secondary chain" to base all our merged coins' new versions on.

-MarkM-



Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: doublec on July 20, 2013, 04:09:44 AM
Okay but i don't have to patch bitcoin when I want to use it as a secondary chain, so presumably that part is already in bitcoin nowadays.
Assuming you meant 'primary' not 'secondary', you do if you want to use the 'merge mine proxy'. You don't if you use pool software that does internally what merge mine proxy does (eg. eloipool).


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: markm on July 20, 2013, 04:10:27 AM
basically what im after is modifying the coin im working on to be able to merged mined, likely with something like p2pool with DVC, IXC, I0C, NMC as aux chains
If you cherry pick the commit I referenced to your coin and use the "merge mining proxy" that is included in the 'contrib' directory that is added by that commit then you can have your coin as a primary chain while mining DVC, etc as secondary chains. You won't be able to mine bitcoin though but from your posts I'm assuming you are fine with that.

Hmm I don't understand this either. Simply being a bitcoin clone, like Terracoin and Bytecoin, should mean you already can act as primary chain, shouldn't it? Since bitcoin can, that ability should be part of what was inherited from bitcoin?

-MarkM-


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: markm on July 20, 2013, 04:12:18 AM
Okay but i don't have to patch bitcoin when I want to use it as a secondary chain, so presumably that part is already in bitcoin nowadays.
Assuming you meant 'primary' not 'secondary', you do if you want to use the 'merge mine proxy'. You don't if you use pool software that does internally what merge mine proxy does (eg. eloipool).

Yeah I meant when I, as a secondary chain, want to use bitcoin as primary.

I use p2pool to merged mine I guess that is why I don't need to patch bitcoin and can instead just use mainline bitcoin unaltered as primary?

-MarkM-


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: doublec on July 20, 2013, 04:12:53 AM
Hmm I don't understand this either. Simply being a bitcoin clone, like Terracoin and Bytecoin, should mean you already can act as primary chain, shouldn't it? Since bitcoin can, that ability should be part of what was inherited from bitcoin?
Sure, but as I've said more than once already...If you're using the merge mine proxy you need these patches. But the reason I provided the commit is not for the millions of people using the merge mine proxy, it's because it ports a bunch of stuff that the secondary chain code uses and I had thought those interested in that would like using it as a base, or looking at it to see what changes are needed, to porting the other patches.


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: ahmed_bodi on July 20, 2013, 04:49:10 PM
is there any way to check if a coin has had the merged mining patches applied? also ive tried to fork your repo base the coin i made off that, do you think it'll work?


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: ahmed_bodi on July 20, 2013, 07:11:51 PM
anyone have any ideas on how to fix this? http://pastebin.com/3wDUnfby


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: ahmed_bodi on July 20, 2013, 09:57:38 PM
bump!


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: ahmed_bodi on July 20, 2013, 10:51:48 PM
to the top


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: markm on July 20, 2013, 11:21:41 PM
Presumably by putting a definition or template or whatever into the correct place for the context, as it seems to be saying you are trying to use a routine you had not yet told it about or that you told it about outside the context maybe since maybe part of the purpose of contexts is to let it forget about stuff outside the context even if you had, outside the context, told it about them?

I don't actually know C++ beyond what can be deduced by looking at the code and what the compiler says in response to it (and of course what actually happens if it does compile and you run it), do you? If not maybe studying up on C++ contexts might provide clues.

-MarkM-


Title: Re: MergeCoin Help- Trying to merge mine, IXC, I0C,DVC, NMC
Post by: ahmed_bodi on July 20, 2013, 11:25:27 PM
hmm ill have a look, c++ is confusing im a vb.net programmer normally