Why Full Node?
There is so much buzz around Doge especially after Elon started tweeting about it. Doge community is always talking about how great it is for more people to be running full nodes. So I thought why not try it out, and at the same time get to explore how difficult it is to set up. Let’s face it, this code is ancient in today’s crypto world, but setting this up was actually easier than I thought.
It is overkill to be setting up a full node just to manage your doge coins. Also, if you are planning to use this node to store multiple accounts it is not recommended. If this is what you want to do then you can try at your own risk.
It’s pretty cool that you can run RPC calls quite easily once you get the full node working and synced. This gives devs an opportunity to do some dev. Ideally I’d love to be able to pay for stuff with Doge as opposed to only HODLing. I wasn’t able to find something equivalent to BTCPayServer for Bitcoin, but hopefully there will be an open source project that we can contribute to and use. Have you heard of such project? Contact me on twitter if you have.
How to Set up Doge Full Node on Ubuntu
Requirements
Before creating a Ubuntu instance make sure you have enough memory. I tried this with 1G of memory and it failed for me. I’ve seen options you can set to make it work with less memory but adding more memory worked fine also.
Installing Libraries
First update package repositories then add the following libraries:
apt-get update
apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
Setting Up Doge and Berkley DB
Now fine a place where you want to pull doge source and also Berkley DB.
mkdir /home/doge
cd /home/doge
export DOGECOIN_ROOT=$(pwd)
git clone https://github.com/dogecoin/dogecoin .mkdir -p $BDB_PREFIX
export BDB_PREFIX=”${DOGECOIN_ROOT}/db5"
wget 'http://download.oracle.com/berkeley-db/db-5.1.29.NC.tar.gz'echo '08238e59736d1aacdd47cfb8e68684c695516c37f4fbe1b8267dde58dc3a576c db-5.1.29.NC.tar.gz' | sha256sum -c
You should see db-5.1.29.NC.tar.gz: OK
There is an issue with Berkley DB so you need to do a sed
in one of the files. This is to fix an error that you get which looks like this:
../dist/../dbinc/atomic.h:179:19: error: definition of ‘int __atomic_compare_exchange(db_atomic_t*, atomic_value_t, atomic_value_t)’
tar -xzvf db-5.1.29.NC.tar.gz
sed -i ‘s/__atomic_compare_exchange/__atomic_compare_exchange_db/g’ db-5.1.29.NC/src/dbinc/atomic.h
cd db-5.1.29.NC/build_unix/
../dist/configure — enable-cxx — disable-shared — with-pic — prefix=$BDB_PREFIX
Finally, build doge. This will take some time.
cd $DOGECOIN_ROOT
./autogen.sh
make
make install
Running Doge
Finally you might want to add some nodes to connect to. You don’t have to do this unless you have a preference where you want your node to connect to. I added about 10 that are closer to me from this list. The config file can come from from this template.
mkdir $DOGECOIN_ROOT/.dogecoin
vim $DOGECOIN_ROOT/.dogecoin/dogecoin.conf
My dogecoin.conf
ended up looking like this:
addnode=24.185.36.242:22556
addnode=45.32.157.119:22556
addnode=75.155.199.195:22556
addnode=73.253.117.17:22556
addnode=73.30.38.131:22556
addnode=76.65.65.159:22556
addnode=72.74.162.107:22556
addnode=69.164.196.239:22556
addnode=69.160.54.5:22445
addnode=50.126.69.98:22556
addnode=45.32.216.227:22556
addnode=23.108.102.27:22556
addnode=199.192.18.146:22556
addnode=198.90.87.145:22556
dns=1
port=22556
dbcache=16384
listen=1
Now you want to run dogecoin daemon:
cd $DOGECOIN_ROOT
dogecoind -daemon
The syncing of the entire blockchain will takes a few days. You can always check the status of the connections with:
dogecoin-cli getconnectioncount
That is it!