Changing merge-mining format for BIP9

phelix
Posts: 1626
Joined: Thu Aug 18, 2011 6:59 am

Re: Changing merge-mining format for BIP9

Post by phelix » Fri Jan 01, 2016 10:10 pm

ok, then I guess one minimal solution would be:

0. all blocks must be merge mined
1. auxPOW nonce must always be chainID
2. parent nonce must never be chainID

:mrgreen: :?:
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

domob
Posts: 1083
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Changing merge-mining format for BIP9

Post by domob » Sat Jan 02, 2016 10:00 am

phelix wrote:ok, then I guess one minimal solution would be:

0. all blocks must be merge mined
1. auxPOW nonce must always be chainID
2. parent nonce must never be chainID

:mrgreen: :?:
Yes, this is what I'm thinking about. Except that 2) is not necessary, because 0) already ensures that PoW cannot be reused - at least, I think so. Do I miss anything? Restricting the allowed nonce could lead to confusion with miners, even though the chance of actually hitting exactly the forbidden nonce while mining is negligible.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

phelix
Posts: 1626
Joined: Thu Aug 18, 2011 6:59 am

Re: Changing merge-mining format for BIP9

Post by phelix » Sat Jan 02, 2016 2:55 pm

domob wrote:
phelix wrote:ok, then I guess one minimal solution would be:

0. all blocks must be merge mined
1. auxPOW nonce must always be chainID
2. parent nonce must never be chainID

:mrgreen: :?:
Yes, this is what I'm thinking about. Except that 2) is not necessary, because 0) already ensures that PoW cannot be reused - at least, I think so. Do I miss anything? Restricting the allowed nonce could lead to confusion with miners, even though the chance of actually hitting exactly the forbidden nonce while mining is negligible.
Yeah, probably you are right.

So we have 0.) to distinguish between parent and auxPOW blocks and 1.) to distinguish between different auxPOW chains/chain variants (which is only necessary for spv chain fragments or Huntercoin).
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

domob
Posts: 1083
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Changing merge-mining format for BIP9

Post by domob » Sat Jan 02, 2016 4:26 pm

phelix wrote:
domob wrote:
phelix wrote:ok, then I guess one minimal solution would be:

0. all blocks must be merge mined
1. auxPOW nonce must always be chainID
2. parent nonce must never be chainID

:mrgreen: :?:
Yes, this is what I'm thinking about. Except that 2) is not necessary, because 0) already ensures that PoW cannot be reused - at least, I think so. Do I miss anything? Restricting the allowed nonce could lead to confusion with miners, even though the chance of actually hitting exactly the forbidden nonce while mining is negligible.
Yeah, probably you are right.

So we have 0.) to distinguish between parent and auxPOW blocks and 1.) to distinguish between different auxPOW chains/chain variants (which is only necessary for spv chain fragments or Huntercoin).
Exactly, these two changes are what I was thinking about as well. If there are no objections / issues uncovered in the near future, I'll start working on a patch. This probably requires a bit of refactoring, but is otherwise straight-forward (I guess).
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

biolizard89
Posts: 1933
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: Changing merge-mining format for BIP9

Post by biolizard89 » Mon Jan 04, 2016 3:54 am

Should I ping Luke-Jr and see what he thinks about this topic? He's always given us good advice, and he's knowledgeable about merged mining.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

phelix
Posts: 1626
Joined: Thu Aug 18, 2011 6:59 am

Re: Changing merge-mining format for BIP9

Post by phelix » Mon Jan 04, 2016 3:59 pm

biolizard89 wrote:Should I ping Luke-Jr and see what he thinks about this topic? He's always given us good advice, and he's knowledgeable about merged mining.
Sure can't hurt.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

phelix
Posts: 1626
Joined: Thu Aug 18, 2011 6:59 am

Re: Changing merge-mining format for BIP9

Post by phelix » Mon Jan 04, 2016 4:05 pm

Created a separate thread for MM2: https://forum.namecoin.info/viewtopic.php?p=16183

Should we call the (intermediate) solution above MM1b?
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

domob
Posts: 1083
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Changing merge-mining format for BIP9

Post by domob » Sun Jan 10, 2016 12:32 pm

One more thing: I initially thought that we could still allow ordinary mining for testnet and regtest mode (where it does not matter that you may get two blocks at once by merge-mining with Namecoin itself). But I think this makes things more complicated, thus I suggest that we remove ordinary PoW completely.

For this, I will change the "generate" and "setgenerate" mining commands to automatically create a minimal auxpow in the background. I also plan to remove "getblocktemplate", as it seems to make no sense for a merge-mined coin. Is that ok for everyone?
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

phelix
Posts: 1626
Joined: Thu Aug 18, 2011 6:59 am

Re: Changing merge-mining format for BIP9

Post by phelix » Tue Jan 12, 2016 9:57 am

domob wrote:One more thing: I initially thought that we could still allow ordinary mining for testnet and regtest mode (where it does not matter that you may get two blocks at once by merge-mining with Namecoin itself). But I think this makes things more complicated, thus I suggest that we remove ordinary PoW completely.
yep
For this, I will change the "generate" and "setgenerate" mining commands to automatically create a minimal auxpow in the background. I also plan to remove "getblocktemplate", as it seems to make no sense for a merge-mined coin. Is that ok for everyone?
ACK
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

phelix
Posts: 1626
Joined: Thu Aug 18, 2011 6:59 am

Re: Changing merge-mining format for BIP9

Post by phelix » Tue Jan 19, 2016 10:45 am

sipa: ok, i think bip9 is moved a bit back in priority
So we probably will have more time for the hardfork.

http://bitcoinstats.com/irc/bitcoin-dev ... 52193219.0
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

Post Reply