This is an account of the things that I had to do to set up a full node for Dogecoin. This Gist will remind future me how to perform this task :)
System requirements
sudo 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
System variable
cd ~
git clone https://github.com/dogecoin/dogecoin.git
cd dogecoin
DOGECOIN_ROOT=$(pwd)
BDB_PREFIX="${DOGECOIN_ROOT}/db5"
mkdir -p $BDB_PREFIX
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
Should see db-5.1.29.NC.tar.gz: OK
tar -xzvf db-5.1.29.NC.tar.gz
cd db-5.1.29.NC/build_unix/
Note: Do a static build so that it can be embedded into the executable, instead of having to find a .so at runtime
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
make install
cd $DOGECOIN_ROOT
./autogen.sh
Make a change to avoid an error berkeley db dogecoin error: definition of 'int __atomic_compare_exchange
Reference to this fix is here
sed -i 's/__atomic_compare_exchange/__atomic_compare_exchange_db/g' db-5.1.29.NC/src/dbinc/atomic.h
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/"
make
sudo make install
Create a file called dogecoin.conf
in your dogecoin datadir i.e. /home/your_username/.dogecoin
vi /home/your_username/.dogecoin/dogecoin.conf
Add whatever config you want; use this as a reference to learn more about which config options are available.
Here is an example where you use addnode
, dns
, port
(for p2p), dbcache
(to allow more cache than the default), and listen
to make sure your node is listening for connections on the p2p port. This config does not use RPC whatsoever. If you use port forwarding on your router so that incoming connections can see your Ubuntu 20 machine on port 22556 you will eventually get over 8 active connections (at which point you will be syncing/reading and then when synced you will be contributing to the network as well).
addnode=173.255.204.124:22556
dns=1
port=22556
dbcache=16384
listen=1
If your node is struggling to connect to more than a few nodes, please use this API to find some nodes that you can add to your dogecoin.conf file using the addnode
parameter over and over on separate lines (instead of just once like we showed in the simple example above)
addnode=1.2.3.4:22556
addnode=5.6.7.8:22556 etc ...
/usr/local/bin/dogecoin-qt
You can also use dogecoind
command to start your node. You can read more about dogecoind
here.
https://github.com/dogecoin/dogecoin https://github.com/dogecoin/dogecoin/blob/master/doc/build-unix.md https://www.reddit.com/r/dogecoin/comments/l7q640/why_running_a_full_node_is_the_secondbest/ https://www.reddit.com/r/dogecoin/comments/6do5vz/important_doge_full_node_drive_help_doge_network/ https://old.reddit.com/r/dogecoin/comments/l8b7d4/dogecoin_blockchain/