Page 1 of 1
Check domain availability
Posted: Thu Dec 05, 2013 3:25 am
by dave111223
How do I check domain availability via command line?
For example I tried:
Output:
Code: Select all
{
"name" : "d/bitcoin",
"value" : "{\"info\":{\"registrar\":\"http://register.dot-bit.org\"},\"email\": \"register@dot-bit.org\",\"ns\":[\"ns0.web-sweet-web.net\",\"ns1.web-sweet-web.net\"],\"map\":{\"\":{\"ns\":[\"ns0.web-sweet-web.net\",\"ns1.web-sweet-web.net\"]}}}",
"txid" : "75e7f4bbccf673d755dd2b1e4a302c15f716c1f5b5d1d8f80d94d3d805ed64d1",
"address" : "NJpHX9pHiApFtBtCMLxpEd9n4v47G2useU",
"expires_in" : -101275,
"expired" : 1
}
As you can see it shows as "Expired", when actually according to this, it is not expired:
http://coinname.org/namecoin-whois.php
Other domains show up as "failed to read from name DB (code -4)"
Even though they are registered (for example d/paynow).
Re: Check domain availability
Posted: Thu Dec 05, 2013 6:23 am
by domob
name_show is the (a possible) way to do it, and is at least how I do it myself as well as in some projects I develop. What I do get for d/bitcoin is this:
Code: Select all
{
"name" : "d/bitcoin",
"value" : "{\"info\":{\"registrar\":\"http://register.dot-bit.org\"},\"email\": \"register@dot-bit.org\",\"ns\":[\"ns0.web-sweet-web.net\",\"ns1.web-sweet-web.net\"],\"map\":{\"\":{\"ns\":[\"ns0.web-sweet-web.net\",\"ns1.web-sweet-web.net\"]}}}",
"txid" : "0bd0d194dfec880211d281fdf0efec28f36fc0a969ea2f437d56766e945fcccb",
"address" : "MvuWVugaAAoU5CUq1ycggsQjYeeBwJ2nE6",
"expires_in" : 15669
}
So it is not expired. (Maybe you haven't updated your client for the upcoming hard fork yet? I don't know whether this can cause this problem, but d/bitcoin was one of the names played around with during the bug, so maybe.)
The error code -4 you mention really means that the name does not exist (and never existed).
Re: Check domain availability
Posted: Thu Dec 05, 2013 6:28 am
by dave111223
I get the same thing for all kind of domains (not just d/bitcoin)
I'm using latest version 3.72:
http://namecoin.info/files/namecoin_win_vQ.3.72.zip
And my client is fully synced.
Other example:
13:27:11
name_show d/google
13:27:11
{
"name" : "d/google",
"value" : "{\"email\":\"
xertrov@gmail.com\",\"map\": {\"\": \"8.8.8.8\", \"dl\": \"129.78.78.221\"}}",
"txid" : "f2fef098b1c76dd7517182ad698bc9276b31f0986411e879154d6b8f8b99adbc",
"address" : "NKVUhhNKXor5ZvjxQSG3XmtotpV8Xdtng6",
"expires_in" : -95281,
"expired" : 1
}
Re: Check domain availability
Posted: Thu Dec 05, 2013 7:57 am
by domob
Hm ok, that's weird. I have no idea what the problem could be in this case; for me this works very well to check domain availability.
Re: Check domain availability
Posted: Thu Dec 05, 2013 7:56 pm
by phelix
domob wrote:Hm ok, that's weird. I have no idea what the problem could be in this case; for me this works very well to check domain availability.
this
Code: Select all
{
"name" : "d/bitcoin",
"value" : "{\"info\":{\"registrar\":\"http://register.dot-bit.org\"},\"email\": \"register@dot-bit.org\",\"ns\":[\"ns0.web-sweet-web.net\",\"ns1.web-sweet-web.net\"],\"map\":{\"\":{\"ns\":[\"ns0.web-sweet-web.net\",\"ns1.web-sweet-web.net\"]}}}",
"txid" : "0bd0d194dfec880211d281fdf0efec28f36fc0a969ea2f437d56766e945fcccb",
"address" : "MvuWVugaAAoU5CUq1ycggsQjYeeBwJ2nE6",
"expires_in" : 15577
}
sure you are synced?
Re: Check domain availability
Posted: Mon Dec 09, 2013 2:51 am
by snailbrain
stop client
delete nameindex.dat
restart client (will take a long time to start, not as long as downloading blockchain)
it seems that maybe swapping versions or in rare circumstances, it can get corrupted/not work
If this doesn't work, download the whole chain
Re: Check domain availability
Posted: Sat Dec 21, 2013 9:40 am
by cassini
snailbrain wrote:it seems that maybe swapping versions or in rare circumstances, it can get corrupted/not work
Confirmed. I recently started 0.3.51/HardforkPatch in a directory with blockchain data from a 0.3.27 version. Everything looked perfect, except it didn't want to synchronize past block 149868. (Reminds me of the same problem with bitcoind switching from 0.7.x to 0.8.x).
namecoind -rescan didn't help, but
namecoind -reindex solved the problem. The -reindex param has probably the same effect as deleteing nameindex.dat.
It took less than 15 minutes on an external SSD. I tried the same thing on a harddisk, and it took around 2 hours (still much faster than downloading the whole blockchain).
BTW, do all the namecoind parameters exist in Namecoin-Qt, like -reindex, -rescan, -printtoconsole, -datadir, -conf?