Difference between revisions of "Fullnode"

From DeFiChain-Wiki
Line 101: Line 101:
 
''When you upgrade from a previous version, please reindex the whole blockchaindata''
 
''When you upgrade from a previous version, please reindex the whole blockchaindata''
  
<code>~/.defi/bin/defid -reindex -daemon</code>
+
<code>~/.defi/defid -reindex -daemon</code>
  
 
===== Monitor Fullnode =====
 
===== Monitor Fullnode =====
Line 107: Line 107:
 
''Check Blockcount''
 
''Check Blockcount''
  
<code>.defi/bin/defi-cli getblockcount</code>
+
<code>.defi/defi-cli getblockcount</code>
  
  
Line 114: Line 114:
 
<code>sudo crontab -e</code>
 
<code>sudo crontab -e</code>
  
<code>* * * * * pidof defid || ~/.defi/bin/defid</Code>
+
<code>* * * * * pidof defid || ~/.defi/defid</Code>
  
  
Line 121: Line 121:
 
After the node is completely synchronized, check the number of connections with the command below.
 
After the node is completely synchronized, check the number of connections with the command below.
  
<code>~/.defi/bin/defi-cli getconnectioncount</code>
+
<code>~/.defi/defi-cli getconnectioncount</code>
  
  
 
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.
 
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.
 
More than 8 connections mean that incoming connections are also possible and exist.

Revision as of 19:13, 1 March 2021

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

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

Latest Version

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.