Changing merge-mining format for BIP9

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

Re: Changing merge-mining format for BIP9

Post by phelix »

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: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Changing merge-mining format for BIP9

Post by domob »

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: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: Changing merge-mining format for BIP9

Post by phelix »

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: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Changing merge-mining format for BIP9

Post by domob »

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: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: Changing merge-mining format for BIP9

Post by biolizard89 »

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: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: Changing merge-mining format for BIP9

Post by phelix »

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: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: Changing merge-mining format for BIP9

Post by phelix »

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: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Changing merge-mining format for BIP9

Post by domob »

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: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: Changing merge-mining format for BIP9

Post by phelix »

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: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: Changing merge-mining format for BIP9

Post by phelix »

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