Fullnode
Defichain Fullnode
To stabilize the network, it is possible to setup a Defichain Fullnode on a virtual or physical server with a fixed IP address. A Fullnode hold the whole blockchain without acting as a masternode (no Collateral required) and other Nodes and Wallets in the network can use it to synchronize. Everyone in the community can help make the network more stable with a public Fullnode.
Requirements
General
- Fixed IP-Address
- Port Forwarding enabled on Router (Port 8555)
- 24/7 online
- Stable Internetconnection (Upload)
Hardware
- 100 GB free disk space (SSD recommended)
- 2-4 vCPU
- 4 GB Memory
Software
- Debian 10, 64 Bit
- Ubuntu 16.04 LTS
- Ubuntu 18.04
- CentOS 8
List of Fullnodes
- 45.157.177.82:8555
- 185.244.194.174:8555
- 62.75.139.29:8555
- Blockchain Snapshot Service & How-To: https://62.75.139.29/
- 85.214.187.210:8555
- 202.61.246.71:8555
- ...
to be continued...
Fullnode Installation
Ubuntu 16.04/18.04/20.04
Create Swapfile
recommended for Systems less then 4 GB
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Check the swapfile
sudo swapon --show
make the Swapfile permanent
sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Optimization
sudo sysctl vm.swappiness=10
sudo nano /etc/sysctl.conf
vm.swappiness=10
Install Fullnode
wget https://github.com/DeFiCh/ain/releases/download/v1.5.0/defichain-1.5.0-x86_64-pc-linux-gnu.tar.gz
unzip package
tar -xvzf defichain-1.5.0-x86_64-pc-linux-gnu.tar.gz
copy to directory
mkdir ~/.defi
cp ./defichain-1.5.0/bin/* ~/.defi
Start Fullnode
Start Fullnode
~/.defi/defid -daemon
When you upgrade from a previous version, please reindex the whole blockchaindata
~/.defi/defid -reindex -daemon
Monitor Fullnode
Check Blockcount
.defi/defi-cli getblockcount
Start defid after reboot
sudo crontab -e
* * * * * pidof defid || ~/.defi/defid
Is your node online?
After the node is completely synchronized, check the number of connections with the command below.
~/.defi/defi-cli getconnectioncount
If the number of connections is 8 or less, only outbound connections are active. Check your firewall or router to see whether your full node can be reached from the Internet via port 8555.
More than 8 connections mean that incoming connections are also possible and exist.
Blockchain Snapshot Service
Introduction
A snapshot helps in cases of corrupted blocks not to re-index the blockchain again. You will start from a much closer block to the most recent one. So, usage of a blockchain snapshot saves time and nerves not to verifying each block again and again and again. It can be stored and installed locally, so that in case of issues, you can sync from that point on.
Download sources
DeFiChain Fondation:
Installation guide
1. Backup your wallet |
---|
Before doing anything else, always take a backup from your wallet!
|
2. Remove blockchain files |
---|
We are still in the DeFi Blockchain data directory from step 1.
|
3. Unzip blockchain archive |
---|
|
4. Start DeFi app |
---|
OPTION 1 - New wallet or transaction history is not important
|