Difference between revisions of "Namecoin"

From Organic Design wiki
(BitcoinTrader)
m (See also)
Line 106: Line 106:
 
*[http://www.bluishcoder.co.nz/2011/05/12/namecoin-a-dns-alternative-based-on-bitcoin.html Namecoin] ''- a DNS alternative based on Bitcoin''
 
*[http://www.bluishcoder.co.nz/2011/05/12/namecoin-a-dns-alternative-based-on-bitcoin.html Namecoin] ''- a DNS alternative based on Bitcoin''
 
*[[Bitcoin]]
 
*[[Bitcoin]]
 +
*[[Namecoin SPA]]
 
*[https://github.com/nphyx/nodenmc NodeNMC] ''- A basic nodejs-based web frontend for namecoin. Displays info in friendly searchable, sortable, paginated tables where applicable''
 
*[https://github.com/nphyx/nodenmc NodeNMC] ''- A basic nodejs-based web frontend for namecoin. Displays info in friendly searchable, sortable, paginated tables where applicable''
 
*[https://bitmessage.org/forum/index.php/topic,2563.0.html Namecoin and Bitmessage project proposal] ''- using Namecoin to make [[Bitmessage]] addresses human-readable''
 
*[https://bitmessage.org/forum/index.php/topic,2563.0.html Namecoin and Bitmessage project proposal] ''- using Namecoin to make [[Bitmessage]] addresses human-readable''

Revision as of 15:53, 14 August 2014

Namecoin.png

Namecoin is a peer-to-peer generic name/value datastore system based on the bitcoin technology (a decentralized Cryptocurrency). Namecoin allows you to securely register names (domains for example) with no possible censorship, and trade namecoins, the digital currency NMC.

Dot-BIT, the first project using namecoin, is building a domain name system (DNS) using the .bit top-level-domain (TLD). Their goal is to spread .bit domains by providing resources and tools to the community, from developers to end users.

It is very useful to build the DNS system into the currency system because both are prone to corruption and control when they require a central authority to manage them. By making these decentralised and removing the requirement for a central authority we can have the foundation of a secure private internet and domain-name system which has the payment and registration system built in to it.

Namecoin exchanges

The best way to get namecoins is with bitcoins since it's still very early days for namecoin which means there's not much support for buying them with standard currencies like there is with bitcoin.

Installation and usage

Currently it's all done in shell with the namecoind daemon. Even though there's no GUI, it's very simple installation and usage which is described here. It's simply a matter of downloading namecoind, creating a simple configuration file in ~/.namecoin/bitcoin.conf.

rpcuser=your_user
rpcpassword=your_pass
rpcport=8336
daemon=1


Then you can execute the downloaded file (it's easiest if you move the file into /bin so that you don't need to specify any pathnames to refer to it in future) and it will start as a daemon in the background. When the daemon is running you can use the system by issuing commands preceded by namecoind, the most common being namecoind help and namecoind getinfo which will return useful information such as the number of blocks read and your current balance. Here's an example of the info returned.

    "version" : 35000,
    "balance" : 452.89500000,
    "blocks" : 69744,
    "connections" : 8,
    "proxy" : "",
    "generate" : false,
    "genproclimit" : -1,
    "difficulty" : 950949.83040234,
    "hashespersec" : 0,
    "testnet" : false,
    "keypoololdest" : 1344723121,
    "paytxfee" : 0.00000000,
    "mininput" : 0.00010000,
    "errors" : ""

The Namecoin wallet

As with Bitcoin, Namecoin has a file called ~/.namecoin/wallet.dat in which all your coins are stored, but in the case of Namecoin, all your domain names (and any other kinds of names you've created) are also stored in this file as special kinds of coin that can't be spent. You must take care to back this file up and keep it safe from prying eyes because if you lose this data, you lose all your coins and names!

If you use PGP email (which you should) then the simplest way to get a secure backup is to make a tar file of your wallet (you can do you Bitcoin wallet at the same time if you like) and send it to yourself as an encrypted email. This way it's stored off-site in your IMAP folder but cannot be viewed without having access to your private key. To create a tar file of your Namecoin and Bitcoin wallets, do the following.

<bash>tar -cf ~/.namecoin/wallet.dat ~/.bitcoin/wallet.dat</bash>

You should delete this file after sending it since it's not encrypted.

Note: If you need to reinstall the system, start the daemon and then stop it again to create the .namecoin directory, then overwrite the wallet.dat file with your backed up wallet and restart the daemon. Your balance will show as zero or negative until the blockchain has loaded which could take a few hours or more depending on your bandwidth.

Namecoin domain names

There are various registration sites around for registering Namecoin domains for people, but it's highly recommended to do it yourself becasue the cost is practically nothing and is only a one-off cost. If you do it through a third-party, the cost is a much higher annual cost and you don't have full control of your name. When you register a name it's created as a special kind of un-spendable coin that goes into your wallet with your normal spendable coins.

Manual name registration example

First reserve the name,

namecoind name_new d/organicdesign


This will output something like the following,

[
  "0e0e03510b0b0b7dbba6e301e519693f68062121b29f3cd3a6652c238360d0d0",
  "9f213ff4a582fd65"
]


Then after twelve blocks (which could take a few hours or more - check the current block here) register the name (you'll need a small NMC balance for this). This example shows a mapping of the naked domain and all subdomains to the Organic Design servers IP address. The hex number is the shorter of the two returned from the previous reservation command.

namecoind name_firstupdate d/organicdesign 9f213ff4a582fd65 '{"map":{"":"69.64.87.188","*":"69.64.87.188"}}'


This may take a few blocks time to take effect, but when it does you'll be able to get info on it:

namecoind name_show d/organicdesign


Which will return something like the following:

{
    "name" : "d/organicdesign",
    "value" : "{\"map\":{\"\":\"69.64.87.188\",\"*\":\"69.64.87.188\"}}",
    "txid" : "c7b968a68e83937f1b149b4374fdd968bd383d57f854381aab81f1ce26942377",
    "address" : "Mw8iR8UkobpV5armgxg1Y2Q2V3Y7VAYuNv",
    "expires_in" : 35989
}


Configuring your local DNS to resolve .bit domains

The easiest way to allow your local system to resolve dotBit domain name is to change your network settings to use a dotBit DNS server. I used dns.bit (178.32.31.41), some of the other servers in the list are no longer active.

Unicode names

You can register full unicode dotBit names no problem, but the DNS system will convert them to punycode. Most modern browsers support punycode, but only certain domains and names are whitelisted by default because unicode characters open up massive potential for phishing attacks by linking unsuspecting users to fake sites with very similar characters in their domain to the real site. Some TLD configurations have protection against this so the browsers can whitelist the whole TLD be default, whereas others that do not only have some specific domain names in the whitelist.

To view the currentl TLDs and domains in Firefox's configuration, go to about:config in the browser and filter the listing with the term "IDN". To whitelist dotBit domains, add a new boolean value called network.IDN.whitelist.bit with the value true.

Note servers handling requests for domains containing unicode characters need to be configured with the punycode version of the name not the unicode version. For example, the domain 道.bit resolves to this site but is converted to the punycode name of xn--8b4a.bit and will only display as unicode in browsers that have made the whitelist change mentioned in the previous paragraph.

Some dotBit sites

These sites are only available if you have configured your system to resolve dotBit domains.

See also