Bug with name_new and name_firstupdate interaction

Namecoin, NMControl
Post Reply
spirals
Posts: 5
Joined: Tue Jun 28, 2011 10:07 pm
os: linux

Bug with name_new and name_firstupdate interaction

Post by spirals »

Posting this here because I couldn't find an issue tracker for namecoin on github. Here's what's happening for me and others:

Problem: If a successful name_new command is allowed to mature via ~12 block confirmations, the random number given with that name_new transaction is not subsequently recognized by name_firstupdate.

Workaround: run name_new a second time for the same name, and then run name_firstupdate *immediately* with the random number from the second name_new - this is successful.

Here is the relevant input and output to illustrate the problem, from my command history. I've edited out everything except the (real) transaction ID for the problematic name_new, in case more clues can be found in the blockchain.

Here I run a name_new for a domain that's not registered:

Code: Select all

namecoind.exe name_new domain
[
    "c82990d0249f578c3e3fb149f9c94912eb4fac168f7251da4b82abce0a3fd38d",
    "[random]"
]
I then waited a long time (11 blocks specifically, but also tried at 12, 13, 14 blocks etc with same result) and ran the following to attempt name_firstupdate, but this failed:

Code: Select all

namecoind.exe name_firstupdate d/domain <random> 
c82990d0249f578c3e3fb149f9c94912eb4fac168f7251da4b82abce0a3fd38d "{\"map\": {\"\": \"0.0.0.0\", \"subdomain\": \"0.0.0.0\"}}"
error: {"code":-1,"message":"previous tx used a different random value"}
During the troubleshooting of this problem on IRC, users "oneman" and "teathsch" also reported experiencing identical behavior in the last 24 hours where waiting 12 blocks from name_new to name_update did not work, but back-to-back name_new and name_updates did work.

Client versions reported to reproduce this issue:
- 6/18 Windows binary release from dot-bit wiki front page.
- Current vinced git source build (6/30/11) on Linux.
http://NMCWatch.com - Namecoin Technical Market Charts

someguy123
Posts: 1
Joined: Tue Jun 05, 2012 2:19 am
os: linux

Re: Bug with name_new and name_firstupdate interaction

Post by someguy123 »

A year later... this problem still applies to the latest git build from khalahan on linux.
I'd love to see a fix for this.

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

Re: Bug with name_new and name_firstupdate interaction

Post by phelix »

someguy123 wrote:A year later... this problem still applies to the latest git build from khalahan on linux.
I'd love to see a fix for this.
never ran into this (on windows). and I have registered a couple of domains.

as for spiral's post above: one time he used the name "domain" and the other time he used "d/domain" - hopefully only in the post.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

khal
Site Admin
Posts: 708
Joined: Mon May 09, 2011 5:09 pm
os: linux

Re: Bug with name_new and name_firstupdate interaction

Post by khal »

That's the problem with that bug...
I've registered about 400 names and I have no problems (even with some recent tests).

I met that about 1 year ago too, but i'm not sure.
I'm currently doing some tests with Someguy on a problematic name.
We'll see the results :p
NamecoinID: id/khal
GPG : 9CC5B92E965D69A9
NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T

Register Namecoin domains with BTC
My bitcoin Identity - Send messages to bitcoin users
Charity Ad - Make a good deed without paying a cent

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

Re: Bug with name_new and name_firstupdate interaction

Post by phelix »

ok I ran into something odd, too:
>C:\Program Files\namecoin>namecoind name_new d/namecoinzeee
[
"64416f0e7b54714c1945789af98f8ffb232ca9f8ed4c671db81238341e81b9d1",
"97133369734f17d700"
]

>C:\Program Files\namecoin>namecoind name_firstupdate d/namecoinzeee 97133369734f17d700 >64416f0e7b54714c1945789af98f8ffb232ca9f8ed4c671db81238341e81b9d1
44cf165ceadbbd7b9dd848a881c0c348e2d4b7b5bd36fc93e431f41f3989f5c7

>C:\Program Files\namecoin>namecoind name_firstupdate d/namecoinzeee 97133369734f17d700
error: {"code":-1,"message":"name_firstupdate <name> <rand> [<tx>] <value>\nPerform a first update after a name_new reservation.\nNote that the first update will go into a block 12 blocks after the name_new, at the soonest."}
the second command should give the same error message as the third... tried a rescan but still the same.

all three within a minute or so.

uh oh?

unfortunately I do not own the domain :mrgreen:

{
"account" : "",
"address" : "name_new: cfc4b1bb8ae52e6b5ea4bb797c36ed907950d882",
"category" : "receive",
"amount" : 0.01000000,
"confirmations" : 0,
"txid" : "64416f0e7b54714c1945789af98f8ffb232ca9f8ed4c671db81238341e81b9d1",
"time" : 1338998193
},
{
"account" : "",
"address" : "name_new: cfc4b1bb8ae52e6b5ea4bb797c36ed907950d882",
"category" : "send",
"amount" : -0.01000000,
"fee" : -0.00500000,
"confirmations" : 0,
"txid" : "64416f0e7b54714c1945789af98f8ffb232ca9f8ed4c671db81238341e81b9d1",
"time" : 1338998193
},
{
"account" : "",
"address" : "name_firstupdate: d/namecoinzeee",
"category" : "receive",
"amount" : 0.01000000,
"confirmations" : 0,
"txid" : "44cf165ceadbbd7b9dd848a881c0c348e2d4b7b5bd36fc93e431f41f3989f5c7",
"time" : 1338998237
},
{
"account" : "",
"address" : "network fee",
"category" : "send",
"amount" : -0.01000000,
"fee" : 0.00500000,
"confirmations" : 0,
"txid" : "44cf165ceadbbd7b9dd848a881c0c348e2d4b7b5bd36fc93e431f41f3989f5c7",
"time" : 1338998237
},
{
"account" : "",
"address" : "name_firstupdate: d/namecoinzeee",
"category" : "send",
"amount" : -0.01000000,
"fee" : 0.00500000,
"confirmations" : 0,
"txid" : "44cf165ceadbbd7b9dd848a881c0c348e2d4b7b5bd36fc93e431f41f3989f5c7",
"time" : 1338998237
}
]
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

khal
Site Admin
Posts: 708
Joined: Mon May 09, 2011 5:09 pm
os: linux

Re: Bug with name_new and name_firstupdate interaction

Post by khal »

I've tracked that bug and launched in a loop name_new and name_firstupdate all the night and i wasn't able to reproduce the bug (on a 64bits and on a 32 bits computer).

What i discovered is that by adding "00" to the end of the random number, i am able to do the name_firstupdate. So, this could be used for now, instead of doing a new name_new.

What I suspect is a problem with signed/unsigned char, so, using a different method to generate the random number may solve the problem.
NamecoinID: id/khal
GPG : 9CC5B92E965D69A9
NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T

Register Namecoin domains with BTC
My bitcoin Identity - Send messages to bitcoin users
Charity Ad - Make a good deed without paying a cent

khal
Site Admin
Posts: 708
Joined: Mon May 09, 2011 5:09 pm
os: linux

Re: Bug with name_new and name_firstupdate interaction

Post by khal »

I've commited a patch to try to avoid the bug :
https://github.com/khalahan/namecoin/co ... d3d0b832d6

Please, use it and report if you still have problems or not :)
NamecoinID: id/khal
GPG : 9CC5B92E965D69A9
NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T

Register Namecoin domains with BTC
My bitcoin Identity - Send messages to bitcoin users
Charity Ad - Make a good deed without paying a cent

Post Reply