Multiple updates of the same name in a single block

Post Reply
domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Multiple updates of the same name in a single block

Post by domob »

I somehow have the vague impression that it is not valid to update / "touch" the same name multiple times in a single block. However, I can not find the corresponding check in the code right now. Does anyone know about this? Maybe I'm just confused and this rule doesn't exist at all. ;)
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: Multiple updates of the same name in a single block

Post by phelix »

domob wrote:I somehow have the vague impression that it is not valid to update / "touch" the same name multiple times in a single block. However, I can not find the corresponding check in the code right now. Does anyone know about this? Maybe I'm just confused and this rule doesn't exist at all. ;)
It is not be possible to use the same input twice :mrgreen:

Or do you mean something else?
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

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

Re: Multiple updates of the same name in a single block

Post by domob »

Of course. It is also not possible for two people to "firstupdate" the same name - but what I'm unsure about is whether you can update one name twice in a single block (with chained transactions). Of course, the client doesn't allow it due to the "there are pending operations on this name" thing. But at the moment it looks like this is only a front-end check and no block validation rule ... or if it is, I'm missing the check.

Not a big deal and no security problem, but I just wanted to check because I really thought it was there. :)
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: Multiple updates of the same name in a single block

Post by biolizard89 »

domob wrote:Of course. It is also not possible for two people to "firstupdate" the same name - but what I'm unsure about is whether you can update one name twice in a single block (with chained transactions). Of course, the client doesn't allow it due to the "there are pending operations on this name" thing. But at the moment it looks like this is only a front-end check and no block validation rule ... or if it is, I'm missing the check.

Not a big deal and no security problem, but I just wanted to check because I really thought it was there. :)
I don't see any reason to block such usage anyway; it would prevent 10 minutes of downtime if someone accidentally issued a name operation that messed up their domain. I never understood why the client blocks it by default; there's no security risk from double-spending your own name, so waiting for a confirmation seems redundant.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

signup292
Posts: 79
Joined: Sun Mar 02, 2014 11:02 pm

.

Post by signup292 »

.
Last edited by signup292 on Sun Feb 22, 2015 1:06 am, edited 1 time in total.

cassini
Posts: 336
Joined: Sun May 26, 2013 6:36 pm

Re: Multiple updates of the same name in a single block

Post by cassini »

domob wrote:Not a big deal and no security problem,
Looks like you've just discovered a method for creating a blockchain fork! :shock:
Bitcoin has already seen a similar situation in the past: the March 2012 chain fork. 0.7.x miners and 0.8.x miners handled one of the blocks differently. In that case it was triggered by a db software problem in combination with the large block size. However, it could have easily been a malformed transaction or similar if the mining pools' software versions react in different ways.
Imagine one of the big NMC mining pools runs a BDB and another pool runs a LevelDB namecoin client. Then someone issues several name_update transactions on a name during one block (using a tweaked namecoind).
One of the DB variants may not be happy with this block for some reason (e.g. different sorting algorithm), and we are in for a major blockchain disaster.

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

Re: Multiple updates of the same name in a single block

Post by domob »

cassini wrote:
domob wrote:Not a big deal and no security problem,
Looks like you've just discovered a method for creating a blockchain fork! :shock:
Bitcoin has already seen a similar situation in the past: the March 2012 chain fork. 0.7.x miners and 0.8.x miners handled one of the blocks differently. In that case it was triggered by a db software problem in combination with the large block size. However, it could have easily been a malformed transaction or similar if the mining pools' software versions react in different ways.
Imagine one of the big NMC mining pools runs a BDB and another pool runs a LevelDB namecoin client. Then someone issues several name_update transactions on a name during one block (using a tweaked namecoind).
One of the DB variants may not be happy with this block for some reason (e.g. different sorting algorithm), and we are in for a major blockchain disaster.
I don't think this is a big problem. It is already now possible to spend the same "coin" multiple times, and the DB doesn't have a problem with it. I see no reason why it could be different if the same name is updated multiple times. (However, of course the March 2013 problem could occur also in Namecoin if we had a LevelDB miner. But that's not related to the question here. BTW, for Huntercoin, the BDB lock limit was already reached in the past and we increased it together with another fork.)

So it seems that there's indeed no such hard condition, thanks for the clarification!
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

Post Reply