This week I got to know about namecoin and got quite excited about its idea and possibilities. (see: ) Me myself, I work as a mostly nomadic living IT-consultant between Europe and Asia. Sometimes I call myself an independent fullstack web and mobile developer.
I'd like to write about my experiences with namecoin, while I am thinking on:
- using it as a decentralized DNS for some of my domains
- saving encrypted information inside the namecoin blockchain for a possible other project
Here is how it went:
Installation
first try: I had an Ubuntu 17.04 Server running here and thought I could just install everything via apt-get. For some reason it did't work since the repository only supports Ubuntu 16.04. I tried compiling the sources but, what ever I did the 'make' never went through, without a clear statement what was missing. In fact I wasted a lot of time. Well its necessary sometimes. I'd like to mention Michael McKinnons Howto here which was a very big help but didn't work with Ubuntu 17.04 so far. https://michael.mckinnon.id.au/2016/05/13/building-a-namecoin-server-with-ubuntu-16-04/. )second step: I used a docker image from https://hub.docker.com/r/acejam/namecoin/. It downloaded the namecoin blockchain but it didn't help me with the namecoin-gui which I wanted to see.- this morning I put a 16.04 live ubuntu system on my external hard drive and used 'apt-get' like described in the namecoin setup guide https://wiki.namecoin.org/index.php?title=Install_and_Configure_Namecoin#1_Download_.26_Install and namecoind suddenly worked perfectly.
Communicating with the blockchain via RPC
- I setup a project with MeteorJS
meteor create meteor-namecoin
and added the namecoin npm packagemeteor npm add namcoin
- replaced the correct username and password in the provided example code
- executed
client.getInfo(function(err,result) {console.log(result);});
(see namecoin API doc) successfully and other things: - 25.12.2017 Here is my example project on Github https://github.com/inspiraluna/meteor-namecoin
- I setup a project with MeteorJS
Registering a .bit domain name
- first of all you need some NMC which I tried to buy on bisq.network. Great fantastic decentralized exchange, but no success since bitcoin is too expensive for sending it around for some technology tests right now.
- somebody send me some namecoin on a paper wallet. I imported the private key with MeteorJS through namecoin rpc with: (let the namecoin blockchain download completely otherwise you might receive an error here)
client.importPrivKey('privatekeyfrompaperwallet', 'paperwallet', true, function(err, result) { if (err) return console.log(err); console.log('importPrivKey:', result); });
- registered then my first domain name via namecoin-gui
namecoin &
(on command line) like so: https://wiki.namecoin.org/index.php?title=Register_and_Configure_.bit_Domains
Setting up a decentralized DNS
- (installed but not yet successfully tested yet) https://github.com/namecoin/nmcontrol
- (last one seems to be outdated better use that one: https://github.com/namecoin/ncdns
- (to be tested) https://github.com/okTurtles/dnschain
Writing into the namecoin blockchain using
- I found NameId https://wiki.namecoin.info/index.php?title=Identity - i added my here: https://namecha.in/name/id/inspiraluna
- also interesting: a namecoin based messaging system on how to write messages into the blockchain https://wiki.namecoin.info/index.php?title=Messaging_System (I send a christmas message to a friend of mine! https://namecha.in/name/m/weihnachten2017)
Stumble stones (26.12.2017)
- everything worked great until some of my transactions did not got confirmed by the network (I wanted to send some of my Christmas greets over the namecoin blockchain)
- I found this thread in the namecoin forum: https://forum.namecoin.org/viewtopic.php?f=2&t=2628&p=16943&hilit=name_update&sid=40e1fb6ad87451d23594fc410bba3d4a#p16943 naturally the version installed by apt-get from the repository installed 0.3.80 (!) which is the too old one as written here!
- I cloned namecore from github and used build notes from the wiki this time! (why I didn't see this first time?) https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md (which makes a good impression so far - its compiling right now)
- three transactions got stuck and two got negative confirmations. I removed them with
namecoin-cli abandontransaction <tx>
- added the transaction back to the wallet which got accepted this time with the new namecoind