Difference between revisions of "Fullnode"
Robin Torque (talk | contribs) (Snapshot hinzugefügt) |
|||
Line 126: | Line 126: | ||
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. | ||
+ | |||
+ | == 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: | ||
+ | |||
+ | * Block 680117 http://snapshots.defichain.com/snapshot-mainnet-680117.tar.gz | ||
+ | |||
+ | |||
+ | [https://github.com/Darkwinde Philipp Darkwinde:] | ||
+ | |||
+ | * 1. 3.2021 https://62.75.139.29/downloads/DeFiChain_2021-03-01_1614594780.zip | ||
+ | |||
+ | === Installation guide === | ||
+ | {| class="wikitable" | ||
+ | !1. Backup your wallet | ||
+ | |- | ||
+ | |Before doing anything else, always take a backup from your wallet! | ||
+ | |||
+ | # In case your DeFi app is running, please close it gracefully. | ||
+ | # Locate the DeFi Blockchain data directory: | ||
+ | ## Windows: C:\Users\%username%\AppData\Roaming\DeFi Blockchain | ||
+ | ## Linux: ~/.defi | ||
+ | ## Mac OS: /Users/%username%/Library/Application Support/DeFi/ | ||
+ | # Make a copy from the directory: wallets | ||
+ | |} | ||
+ | {| class="wikitable" | ||
+ | !2. Remove blockchain files | ||
+ | |- | ||
+ | |We are still in the DeFi Blockchain data directory from step 1. | ||
+ | |||
+ | # Windows: Select and delete all files and directories, excepting: wallets | ||
+ | # Linux: Delete all files and directories, excepting: wallets | ||
+ | # Mac OS: Delete all files and directories, excepting: wallets | ||
+ | |} | ||
+ | {| class="wikitable" | ||
+ | !3. Unzip blockchain archive | ||
+ | |- | ||
+ | | | ||
+ | # Copy the downloaded blockchain archive to the DeFi Blockchain data directory. | ||
+ | # Unzip the archive and check that it is not been asked to replace any existing files. In case check steps before. | ||
+ | # You will see, that removed directories been created again. | ||
+ | |} | ||
+ | {| class="wikitable" | ||
+ | !4. Start DeFi app | ||
+ | |- | ||
+ | |OPTION 1 - New wallet or transaction history is not important | ||
+ | |||
+ | # You can start DeFi app directly and you will see that starting block for sync is close to the last block. | ||
+ | # Happy DEXing :) | ||
+ | |||
+ | OPTION 2 - Re-Index to get full transaction history back | ||
+ | |||
+ | # If you already have a wallet from previous installation, you need to perform a "reindex" action by selecting the according option in the settings menu of the app OR you can start your local node headless on the command line with <code>defid.exe -reindex</code>. Defid is located within your apps installation directory. | ||
+ | # This will take a while. Take a drink and relax until it is finished. | ||
+ | # Happy DEXing :) | ||
+ | |} |
Revision as of 18:30, 2 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
- 45.157.177.82:8555
- 185.244.194.174:8555
- 62.75.139.29:8555
- 85.214.187.210:8555
- Blockchain Snapshot Service & How-To: https://62.75.139.29/
- ...
- ...
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
OPTION 2 - Re-Index to get full transaction history back
|