Check domain availability

Post Reply
dave111223
Posts: 4
Joined: Thu Dec 05, 2013 3:15 am
Contact:

Check domain availability

Post by dave111223 »

How do I check domain availability via command line?

For example I tried:

Code: Select all

namecoind name_show d/bitcoin
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).

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

Re: Check domain availability

Post 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).
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

dave111223
Posts: 4
Joined: Thu Dec 05, 2013 3:15 am
Contact:

Re: Check domain availability

Post 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
}

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

Re: Check domain availability

Post 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.
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: Check domain availability

Post 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?

Code: Select all


>>>getblockcount
149535

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

snailbrain
Posts: 309
Joined: Tue Jul 19, 2011 9:33 pm

Re: Check domain availability

Post 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

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

Re: Check domain availability

Post 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?

Post Reply