https://defichain-wiki.com/api.php?action=feedcontributions&user=Kuno&feedformat=atomDeFiChain-Wiki - User contributions [en]2024-03-29T08:29:40ZUser contributionsMediaWiki 1.35.0https://defichain-wiki.com/index.php?title=Fullnode&diff=2662Fullnode2022-05-24T14:16:10Z<p>Kuno: /* Download sources */</p>
<hr />
<div>== Defichain Fullnode ==<br />
<br />
To stabilize the network, it is possible to setup a Defichain Fullnode on a virtual or physical server with a fixed IP address.<br />
A Fullnode holds the whole blockchain without acting as a masternode (no Collateral required) and other Nodes and Wallets in the network can use it to synchronize.<br />
Everyone in the community can help make the network more stable with a public Fullnode.<br />
<br />
== Requirements ==<br />
<br />
=== General ===<br />
* Fixed IP address<br />
* Port forwarding enabled on router (Port 8555)<br />
* 24/7 online<br />
* Stable internet connection (Upload)<br />
<br />
=== Hardware ===<br />
* 100 GB free disk space (SSD recommended)<br />
* 2-4 vCPU<br />
* 4 GB Memory<br />
<br />
=== Software ===<br />
* Debian 10, 64 Bit<br />
* Ubuntu 18.04 or 20.04<br />
* CentOS 8<br />
<br />
Ubuntu 16.04 is no longer supported with Version 1.7.0 and higher.<br />
<br />
== List of Fullnodes ==<br />
<br />
*[http://status.defichain-masternode.com/ 195.90.210.76:8555] (Germany, Berlin)<br />
* [http://status.defichain-masternode.com/ 85.214.187.210:8555] (Germany, Berlin)<br />
*[http://status.defichain-masternode.com/ 85.214.55.116:8555] (Germany, Berlin)<br />
* [http://status.defichain-masternode.com/ 45.157.177.82:8555] (Germany, Karlsruhe)<br />
* [http://status.defichain-masternode.com/ 185.244.194.174:8555] (Germany, Karlsruhe)<br />
*[http://status.defichain-masternode.com/ 202.61.246.71:8555] (Germany, Karlsruhe)<br />
*[http://status.defichain-masternode.com/ 81.30.156.13:8555] (Germany, Düsseldorf)<br />
*[http://status.defichain-masternode.com/ 24.134.79.25:8555] (Germany, Würzburg)<br />
*[http://status.defichain-masternode.com/ 77.56.65.5:8555] (Switzerland, Greifensee)<br />
*...<br />
<br />
to be continued...<br />
<br />
== Fullnode Installation ==<br />
<br />
==== Ubuntu 18.04/20.04 ====<br />
<br />
===== Create Swapfile =====<br />
<br />
''recommended for Systems less then 4 GB''<br />
<br />
<code>sudo fallocate -l 4G /swapfile</code><br />
<br />
<code>sudo chmod 600 /swapfile</code><br />
<br />
<code>sudo mkswap /swapfile</code><br />
<br />
<code>sudo swapon /swapfile</code><br />
<br />
<br />
''Check the swapfile''<br />
<br />
<code>sudo swapon --show</code><br />
<br />
<br />
''make the Swapfile permanent''<br />
<br />
<code>sudo cp /etc/fstab /etc/fstab.bak</code><br />
<br />
<code>echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab</code><br />
<br />
<br />
''Optimization''<br />
<br />
<code>sudo sysctl vm.swappiness=10</code><br />
<br />
<code>sudo nano /etc/sysctl.conf</code><br />
<br />
<code>vm.swappiness=10</code><br />
<br />
<br />
===== Install Fullnode =====<br />
<br />
[https://github.com/DeFiCh/ain/releases/latest Latest Version]<br />
<br />
<code>wget https://github.com/DeFiCh/ain/releases/download/v2.3.0/defichain-2.3.0-x86_64-pc-linux-gnu.tar.gz</code><br />
<br />
<br />
''unzip package''<br />
<br />
<code>tar -xvzf defichain-2.3.0-x86_64-pc-linux-gnu.tar.gz</code><br />
<br />
<br />
''copy to directory''<br />
<br />
<code>mkdir ~/.defi</code><br />
<br />
<code>cp ./defichain-2.3.0/bin/* ~/.defi</code><br />
<br />
===== Start Fullnode =====<br />
<br />
''Start Fullnode''<br />
<br />
<code>~/.defi/defid -daemon</code><br />
<br />
<br />
''When you upgrade from a previous version, please reindex the whole blockchaindata''<br />
<br />
<code>~/.defi/defid -reindex -daemon</code><br />
<br />
===== Monitor Fullnode =====<br />
<br />
''Check Blockcount''<br />
<br />
<code>.defi/defi-cli getblockcount</code><br />
<br />
<br />
''Start defid after reboot''<br />
<br />
<code>sudo crontab -e</code><br />
<br />
<code>* * * * * pidof defid || ~/.defi/defid</Code><br />
<br />
<br />
''Is your node online?''<br />
<br />
After the node is completely synchronized, check the number of connections with the command below.<br />
<br />
<code>~/.defi/defi-cli getconnectioncount</code><br />
<br />
<br />
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.<br />
More than 8 connections mean that incoming connections are also possible and exist.<br />
<br />
== Create and use backup for blockchain data ==<br />
<br />
=== Problem description ===<br />
[[File:Photo 2021-03-02 22-27-44.jpg|center|thumb|600x600px|Corrupted block database]]<br />
Some users report that this error message occurs again and again. Afterwards, the entire blockchain has to be reloaded, which is very tedious. The cause of this problem lies in the incorrect termination of the DeFi app. It is important that the app is always shut down correctly. <br />
<br />
As a remedy, it is recommended to work with backup solutions. Then the entire blockchain does not have to be reloaded, but only the blocks after creating the backup. <br />
<br />
=== Create backup ===<br />
<br />
# Close the DeFi app<br />
# Go to the folder with the blockchain data On Windows: <code>C:\Users\%username%\AppData\Roaming\DeFi Blockchain</code> On Mac: <code>/Users/%username%/Library/Application Support/DeFi/</code> On Linux: <code>~/.defi</code><br />
# Copy the following 3 folders to another location. This is your blockchain backup. <code>blocks</code> <code>enhancedcs</code> <code>chainstate</code><br />
# The backup is thus created. <br />
[[File:2021-03-20 23.33.38.png|center|thumb|830x830px|enhancedcs blocks chainstate|alt=]]<br />
<br />
=== Restore backup ===<br />
<br />
# Launch the DeFi app and make sure the app has started syncing. <br />
# Exit the DeFi App<br />
# Go to the folder with the blockchain data On Windows: <code>C:\Users\%username%\AppData\Roaming\DeFi Blockchain</code> On Mac: <code>/Users/%username%/Library/Application Support/DeFi/</code> On Linux: <code>~/.defi</code><br />
# Delete the following folders <code>blocks</code> <code>enhancedcs</code> <code>chainstate</code><br />
# Copy the 3 folders from your backup to this folder<br />
# Restart the computer<br />
# Launch the DeFi App<br />
# The app should now continue at the state of the last backup. <br />
<br />
<br />
# <br />
<br />
== Blockchain Snapshot Service ==<br />
<br />
=== Introduction ===<br />
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 verify 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.<br />
<br />
=== Download sources ===<br />
<u>DeFiChain Fondation:</u> <br />
<br />
Asia: https://defi-snapshots.s3-ap-southeast-1.amazonaws.com/snapshot-mainnet-1578261.zip <br />
<br />
Europe: https://defi-snapshots-europe.s3.eu-central-1.amazonaws.com/snapshot-mainnet-1894199.zip <br />
<br />
To get the most recent snapshot:<br />
<br />
Manually browse to https://defi-snapshots-europe.s3.eu-central-1.amazonaws.com/index.txt<br />
<br />
Extract last line, it's the most recent snapshot.<br />
<br />
Append the filename to the base URL:<br />
<br />
https://defi-snapshots-europe.s3.eu-central-1.amazonaws.com/<br />
<br />
Example of snapshot URL:<br />
<br />
[https://defi-snapshots-europe.s3.eu-central-1.amazonaws.com/snapshot-mainnet-1430890.zip https://defi-snapshots-europe.s3.eu-central-1.amazonaws.com/snapshot-mainnet-1572520.zip]<br />
<br />
<u>mydefichain.com</u><br />
<br />
List all available Snapshots:<br />
<br />
Mainnet: http://snapshot-de.mydefichain.com/index.txt<br />
<br />
Testnet: http://testnet.snapshot-de.mydefichain.com/index.txt<br />
<br />
Download latest Snapshots (ZIP):<br />
<br />
Mainnet: http://snapshot-de.mydefichain.com/latest/<br />
<br />
Testnet: http://testnet.snapshot-de.mydefichain.com/latest/<br />
<br />
=== Installation guide ===<br />
{| class="wikitable"<br />
!1. Backup your wallet<br />
|-<br />
|Before doing anything else, always take a backup from your wallet!<br />
<br />
# In case your DeFi app is running, please close it gracefully.<br />
# Locate the DeFi Blockchain data directory:<br />
## Windows: C:\Users\%username%\AppData\Roaming\DeFi Blockchain<br />
## Linux: ~/.defi<br />
## Mac OS: /Users/%username%/Library/Application Support/DeFi/<br />
# Make a copy from the directory: wallets<br />
|}<br />
{| class="wikitable"<br />
!2. Remove blockchain files<br />
|-<br />
|We are still in the DeFi Blockchain data directory from step 1.<br />
<br />
# Windows: Select and delete all files and directories, excepting: wallets<br />
# Linux: Delete all files and directories, excepting: wallets<br />
# Mac OS: Delete all files and directories, excepting: wallets<br />
|}<br />
{| class="wikitable"<br />
!3. Unzip blockchain archive<br />
|-<br />
|<br />
# Copy the downloaded blockchain archive to the DeFi Blockchain data directory.<br />
# Unzip the archive and check that it is not been asked to replace any existing files. In case check steps before.<br />
# You will see, that removed directories been created again.<br />
|}<br />
{| class="wikitable"<br />
!4. Start DeFi app<br />
|-<br />
|'''OPTION 1''' - New wallet or transaction history is not important<br />
<br />
# You can start DeFi app directly and you will see that starting block for sync is close to the last block.<br />
# Happy DEXing :)<br />
<br />
<br />
'''OPTION 2''' - Re-Index to get full transaction history back<br />
<br />
# 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.<br />
# This will take a while. Take a drink and relax until it is finished.<br />
# Happy DEXing :)<br />
|}<br />
<br />
====Example commands for Linux====<br />
Just replace the snapshot file with the current version from above.<br />
<br />
The following steps assume that defid was installed under ~/.defi and you're logged in with the user created to run defid -> adjust it in case your environment is different!<br />
# create a new temporary folder for the snapshot in the current user's home folder<br />
cd ~<br />
mkdir snapshot<br />
cd snapshot<br />
<br />
# download the snapshot & unzip it (if needed install the unzip package first via your package manager like apt etc.)<br />
wget <nowiki>https://defi-snapshots-europe.s3.eu-central-1.amazonaws.com/snapshot-mainnet-1430890.zip</nowiki><br />
unzip snapshot-mainnet-1430890.zip<br />
<br />
# remove the snapshot archive to save space<br />
rm snapshot-mainnet-1430890.zip<br />
<br />
# only if you're using crontab to restart defid automatically: comment the corresponding line (add a "#" in front of it)<br />
# otherwise the node will restart again and you can not copy all directories successfully<br />
crontab -e<br />
<br />
# stop defid<br />
~/.defi/defi-cli stop<br />
<br />
# remove old blockchain data (be very careful with that command!)<br />
rm -rf ~/.defi/anchors ~/.defi/blocks ~/.defi/burn ~/.defi/chainstate ~/.defi/enhancedcs ~/.defi/history ~/.defi/indexes ~/.defi/spv<br />
<br />
# move snapshot files to the folder where defid can find them (usually ~/.defi)<br />
mv ./* ~/.defi/<br />
<br />
# start defid: choose option A or B but not both!<br />
# option A: only if you ARE using crontab: uncomment the corresponding line (remove "#" from the beginning of the line)<br />
crontab -e<br />
<br />
# option B: only if you do NOT use crontab -> you have to start defid manually<br />
# otherwise cron will periodically check and start defid<br />
~/.defi/defid<br />
<br />
# check that defid is running again & check that everything is working<br />
tail -fn50 ~/.defi/debug.log</div>Kunohttps://defichain-wiki.com/index.php?title=Kill_defid_Daemon&diff=2081Kill defid Daemon2021-10-27T12:56:42Z<p>Kuno: /* Mac */</p>
<hr />
<div>{{DISPLAYTITLE:Kill defid Daemon}}<br />
<br />
== Kill defid on Mac ==<br />
If you need to stop a running DefiChain Daemon (defid), you need to kill the corresponding process. You can do that by looking for the current PID in the terminal running the command 'top'.<br />
<br />
Why you should need to stop it manually? Just in case an error occured e.g. in the DefiChain Wallet App or another app like defi-portfolio which I stopped somehow wrong and the Daemon was still running afterwards.<br />
<br />
The top command is listing all current processes on your mac. There you can look for defid in the COMMAND column. The pick the corresponding PID you will need to run the 'kill' command. After stopping the top command pressing 'q' you can run the command<br />
<br />
<code>kill pid-from-defid</code> (e.g. 'kill 15913')<br />
<br />
This will stop the DefiChain Daemon process as you can verify in the debug.log (normally using <code>tail -f ./Library/Application\ Support/DeFi/debug.log</code>)</div>Kunohttps://defichain-wiki.com/index.php?title=Kill_dfid_Daemon&diff=2080Kill dfid Daemon2021-10-27T12:55:34Z<p>Kuno: Kuno moved page Kill dfid Daemon to Kill defid Daemon: Miss spelling</p>
<hr />
<div>#REDIRECT [[Kill defid Daemon]]</div>Kunohttps://defichain-wiki.com/index.php?title=Kill_defid_Daemon&diff=2079Kill defid Daemon2021-10-27T12:55:34Z<p>Kuno: Kuno moved page Kill dfid Daemon to Kill defid Daemon: Miss spelling</p>
<hr />
<div>{{DISPLAYTITLE:Kill defid Daemon}}<br />
<br />
== Mac ==<br />
If you need to stop a running DefiChain Daemon (defid), you need to kill the corresponding process. You can do that by looking for the current PID in the terminal running the command 'top'.<br />
<br />
Why you should need to stop it manually? Just in case an error occured e.g. in the DefiChain Wallet App or another app like defi-portfolio which I stopped somehow wrong and the Daemon was still running afterwards.<br />
<br />
The top command is listing all current processes on your mac. There you can look for defid in the COMMAND column. The pick the corresponding PID you will need to run the 'kill' command. After stopping the top command pressing 'q' you can run the command<br />
<br />
<code>kill pid-from-defid</code> (e.g. 'kill 15913')<br />
<br />
This will stop the DefiChain Daemon process as you can verify in the debug.log (normally using <code>tail -f ./Library/Application\ Support/DeFi/debug.log</code>)</div>Kunohttps://defichain-wiki.com/index.php?title=Kill_defid_Daemon&diff=2078Kill defid Daemon2021-10-27T12:54:13Z<p>Kuno: </p>
<hr />
<div>{{DISPLAYTITLE:Kill defid Daemon}}<br />
<br />
== Mac ==<br />
If you need to stop a running DefiChain Daemon (defid), you need to kill the corresponding process. You can do that by looking for the current PID in the terminal running the command 'top'.<br />
<br />
Why you should need to stop it manually? Just in case an error occured e.g. in the DefiChain Wallet App or another app like defi-portfolio which I stopped somehow wrong and the Daemon was still running afterwards.<br />
<br />
The top command is listing all current processes on your mac. There you can look for defid in the COMMAND column. The pick the corresponding PID you will need to run the 'kill' command. After stopping the top command pressing 'q' you can run the command<br />
<br />
<code>kill pid-from-defid</code> (e.g. 'kill 15913')<br />
<br />
This will stop the DefiChain Daemon process as you can verify in the debug.log (normally using <code>tail -f ./Library/Application\ Support/DeFi/debug.log</code>)</div>Kunohttps://defichain-wiki.com/index.php?title=DeFi_Wallet&diff=2077DeFi Wallet2021-10-27T12:52:43Z<p>Kuno: </p>
<hr />
<div>{| class="wikitable"<br />
!'''Installation'''<br />
!'''Security'''<br />
|-<br />
|[[App on Windows Cloud Server|App on Windows cloud server]]<br />
|[[Wallet Encryption]]<br />
|-<br />
|[[App on Raspberry-Pi|App on Raspberry-Pi]]<br />
|[[Backup Wallet|Wallet Backup]]<br />
|-<br />
|[[Saiive.live|Light Wallet - saiive.live]]<br />
|[[Restore Wallet]]<br />
|-<br />
|<br />
|[[Password Setting]]<br />
|-<br />
|<br />
|<br />
|-<br />
!'''Usage'''<br />
!'''Advanced Usage'''<br />
|-<br />
|[[How to use the app]]<br />
|[[API]]<br />
|-<br />
|[[Adresse erstellen]]<br />
|[[Cli commands]]<br />
|-<br />
|[[Alle Adressen mit Guthaben anzeigen lassen]]<br />
|[[Bitcoin Anchoring]]<br />
|-<br />
|[[Suggestion for using the DeFi app]]<br />
|[[Blockchain folder]]<br />
|-<br />
|[[Masternode]]<br />
|[[Dual setup (App + Node)]]<br />
|-<br />
|[[Fullnode#Create and use backup for blockchain data|Create and use backup for blockchain data]]<br />
|[[Fullnode]]<br />
|-<br />
|[[Fullnode#Blockchain%20Snapshot%20Service|Blockchain Snapshot Service]]<br />
|[[Kritik]]<br />
|-<br />
|<br />
|[[Main Page old]]<br />
|-<br />
|<br />
|[[Masternode installation extended]]<br />
|-<br />
|<br />
|[[Private key read out of the app]]<br />
|-<br />
|<br />
|[[Atomic Swap]] (under construction)<br />
|-<br />
!'''Problems'''<br />
!Version Specific Hints<br />
|-<br />
|[[Debug.log]]<br />
|[[V2.3.2|Version 2.3.2]]<br />
|-<br />
|[[App error messages]]<br />
|[[V2.3.1|Version 2.3.1]]<br />
|-<br />
|[[Show hidden folders]]<br />
|<br />
|-<br />
|[[Unable to start blockchain]]<br />
|<br />
|-<br />
|[[Add old address]]<br />
|<br />
|-<br />
|[[Addnode]]<br />
|<br />
|-<br />
|[[Obsolete errors]]<br />
|<br />
|-<br />
|[[Wallet.dat corrupt salvage failed]]<br />
|<br />
|-<br />
|[[Delete DeFi App]]<br />
|<br />
|-<br />
|[[Kill dfid Daemon|Kill defid Daemon]]<br />
|<br />
|}</div>Kunohttps://defichain-wiki.com/index.php?title=Kill_defid_Daemon&diff=2076Kill defid Daemon2021-10-27T12:50:42Z<p>Kuno: </p>
<hr />
<div>== Mac ==<br />
If you need to stop a running DefiChain Daemon (defid), you need to kill the corresponding process. You can do that by looking for the current PID in the terminal running the command 'top'.<br />
<br />
Why you should need to stop it manually? Just in case an error occured e.g. in the DefiChain Wallet App or another app like defi-portfolio which I stopped somehow wrong and the Daemon was still running afterwards.<br />
<br />
The top command is listing all current processes on your mac. There you can look for defid in the COMMAND column. The pick the corresponding PID you will need to run the 'kill' command. After stopping the top command pressing 'q' you can run the command<br />
<br />
<code>kill pid-from-defid</code> (e.g. 'kill 15913')<br />
<br />
This will stop the DefiChain Daemon process as you can verify in the debug.log (normally using <code>tail -f ./Library/Application\ Support/DeFi/debug.log</code>)</div>Kunohttps://defichain-wiki.com/index.php?title=Kill_defid_Daemon&diff=2075Kill defid Daemon2021-10-27T12:49:43Z<p>Kuno: New page</p>
<hr />
<div>== Mac ==<br />
If you need to stop a running DefiChain Daemon (defid), you need to kill the corresponding process. You can do that by looking for the current PID in the terminal running the command 'top'.<br />
<br />
Why you should need to stop it manually? Just in case an error occured e.g. in the DefiChain Wallet App or another app like defi-portfolio which I stopped somehow wrong and the Daemon was still running afterwards.<br />
<br />
The top command is listing all current processes on your mac. There you can look for defid in the COMMAND column. The pick the corresponding PID you will need to run the 'kill' command. After stopping the top command pressing 'q' you can run the command<br />
<br />
<code>kill pid-from-defid (</code>e.g. 'kill 15913')<br />
<br />
This will stop the DefiChain Daemon process as you can verify in the debug.log (normally using <code>tail -f ./Library/Application\ Support/DeFi/debug.log</code>)</div>Kunohttps://defichain-wiki.com/index.php?title=Fullnode&diff=1624Fullnode2021-06-11T09:57:19Z<p>Kuno: /* Download sources */ Updated to current snapshot</p>
<hr />
<div>== Defichain Fullnode ==<br />
<br />
To stabilize the network, it is possible to setup a Defichain Fullnode on a virtual or physical server with a fixed IP address.<br />
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.<br />
Everyone in the community can help make the network more stable with a public Fullnode.<br />
<br />
== Requirements ==<br />
<br />
=== General ===<br />
* Fixed IP-Address<br />
* Port Forwarding enabled on Router (Port 8555)<br />
* 24/7 online<br />
* Stable Internetconnection (Upload)<br />
<br />
=== Hardware ===<br />
* 100 GB free disk space (SSD recommended)<br />
* 2-4 vCPU<br />
* 4 GB Memory<br />
<br />
=== Software ===<br />
* Debian 10, 64 Bit<br />
* Ubuntu 18.04<br />
* CentOS 8<br />
<br />
Ubuntu 16.04 is no longer supported with Version 1.7.0 and higher.<br />
<br />
== List of Fullnodes ==<br />
<br />
* [http://status.defichain-masternode.com/ 45.157.177.82:8555]<br />
* [http://status.defichain-masternode.com/ 185.244.194.174:8555]<br />
* [http://status.defichain-masternode.com/ 85.214.187.210:8555]<br />
* [http://status.defichain-masternode.com/ 202.61.246.71:8555]<br />
* [http://status.defichain-masternode.com/ 24.134.79.25:8555]<br />
* [http://status.defichain-masternode.com/ 77.56.65.5:8555]<br />
*[http://status.defichain-masternode.com/ 195.90.210.76:8555]<br />
*[http://status.defichain-masternode.com/ 85.214.55.116:8555]<br />
* ...<br />
<br />
to be continued...<br />
<br />
== Fullnode Installation ==<br />
<br />
==== Ubuntu 18.04/20.04 ====<br />
<br />
===== Create Swapfile =====<br />
<br />
''recommended for Systems less then 4 GB''<br />
<br />
<code>sudo fallocate -l 4G /swapfile</code><br />
<br />
<code>sudo chmod 600 /swapfile</code><br />
<br />
<code>sudo mkswap /swapfile</code><br />
<br />
<code>sudo swapon /swapfile</code><br />
<br />
<br />
''Check the swapfile''<br />
<br />
<code>sudo swapon --show</code><br />
<br />
<br />
''make the Swapfile permanent''<br />
<br />
<code>sudo cp /etc/fstab /etc/fstab.bak</code><br />
<br />
<code>echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab</code><br />
<br />
<br />
''Optimization''<br />
<br />
<code>sudo sysctl vm.swappiness=10</code><br />
<br />
<code>sudo nano /etc/sysctl.conf</code><br />
<br />
<code>vm.swappiness=10</code><br />
<br />
<br />
===== Install Fullnode =====<br />
<br />
[https://github.com/DeFiCh/ain/releases/latest Latest Version]<br />
<br />
<code>wget https://github.com/DeFiCh/ain/releases/download/v1.5.0/defichain-1.5.0-x86_64-pc-linux-gnu.tar.gz</code><br />
<br />
<br />
''unzip package''<br />
<br />
<code>tar -xvzf defichain-1.5.0-x86_64-pc-linux-gnu.tar.gz</code><br />
<br />
<br />
''copy to directory''<br />
<br />
<code>mkdir ~/.defi</code><br />
<br />
<code>cp ./defichain-1.5.0/bin/* ~/.defi</code><br />
<br />
===== Start Fullnode =====<br />
<br />
''Start Fullnode''<br />
<br />
<code>~/.defi/defid -daemon</code><br />
<br />
<br />
''When you upgrade from a previous version, please reindex the whole blockchaindata''<br />
<br />
<code>~/.defi/defid -reindex -daemon</code><br />
<br />
===== Monitor Fullnode =====<br />
<br />
''Check Blockcount''<br />
<br />
<code>.defi/defi-cli getblockcount</code><br />
<br />
<br />
''Start defid after reboot''<br />
<br />
<code>sudo crontab -e</code><br />
<br />
<code>* * * * * pidof defid || ~/.defi/defid</Code><br />
<br />
<br />
''Is your node online?''<br />
<br />
After the node is completely synchronized, check the number of connections with the command below.<br />
<br />
<code>~/.defi/defi-cli getconnectioncount</code><br />
<br />
<br />
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.<br />
More than 8 connections mean that incoming connections are also possible and exist.<br />
<br />
== Create and use backup for blockchain data ==<br />
<br />
=== Problem description ===<br />
[[File:Photo 2021-03-02 22-27-44.jpg|center|thumb|600x600px|Corrupted block database]]<br />
Some users report that this error message occurs again and again. Afterwards, the entire blockchain has to be reloaded, which is very tedious. The cause of this problem lies in the incorrect termination of the DeFi app. It is important that the app is always shut down correctly. <br />
<br />
As a remedy, it is recommended to work with backup solutions. Then the entire blockchain does not have to be reloaded, but only the blocks after creating the backup. <br />
<br />
=== Create backup ===<br />
<br />
# Close the DeFi app<br />
# Go to the folder with the blockchain data On Windows: <code>C:\Users\%username%\AppData\Roaming\DeFi Blockchain</code> On Mac: <code>/Users/%username%/Library/Application Support/DeFi/</code> On Linux: <code>~/.defi</code><br />
# Copy the following 3 folders to another location. This is your blockchain backup. <code>blocks</code> <code>enhancedcs</code> <code>chainstate</code><br />
# The backup is thus created. <br />
[[File:2021-03-20 23.33.38.png|center|thumb|830x830px|enhancedcs blocks chainstate|alt=]]<br />
<br />
=== Restore backup ===<br />
<br />
# Launch the DeFi app and make sure the app has started syncing. <br />
# Exit the DeFi App<br />
# Go to the folder with the blockchain data On Windows: <code>C:\Users\%username%\AppData\Roaming\DeFi Blockchain</code> On Mac: <code>/Users/%username%/Library/Application Support/DeFi/</code> On Linux: <code>~/.defi</code><br />
# Delete the following folders <code>blocks</code> <code>enhancedcs</code> <code>chainstate</code><br />
# Copy the 3 folders from your backup to this folder<br />
# Restart the computer<br />
# Launch the DeFi App<br />
# The app should now continue at the state of the last backup. <br />
<br />
<br />
# <br />
<br />
== Blockchain Snapshot Service ==<br />
<br />
=== Introduction ===<br />
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.<br />
<br />
=== Download sources ===<br />
DeFiChain Fondation: <br />
<br />
Asia: https://defi-snapshots.s3-ap-southeast-1.amazonaws.com/snapshot-mainnet-897577.zip <br />
<br />
Europe: https://defi-snapshots-europe.s3.eu-central-1.amazonaws.com/snapshot-mainnet-913128.zip<br />
<br />
=== Installation guide ===<br />
{| class="wikitable"<br />
!1. Backup your wallet<br />
|-<br />
|Before doing anything else, always take a backup from your wallet!<br />
<br />
# In case your DeFi app is running, please close it gracefully.<br />
# Locate the DeFi Blockchain data directory:<br />
## Windows: C:\Users\%username%\AppData\Roaming\DeFi Blockchain<br />
## Linux: ~/.defi<br />
## Mac OS: /Users/%username%/Library/Application Support/DeFi/<br />
# Make a copy from the directory: wallets<br />
|}<br />
{| class="wikitable"<br />
!2. Remove blockchain files<br />
|-<br />
|We are still in the DeFi Blockchain data directory from step 1.<br />
<br />
# Windows: Select and delete all files and directories, excepting: wallets<br />
# Linux: Delete all files and directories, excepting: wallets<br />
# Mac OS: Delete all files and directories, excepting: wallets<br />
|}<br />
{| class="wikitable"<br />
!3. Unzip blockchain archive<br />
|-<br />
|<br />
# Copy the downloaded blockchain archive to the DeFi Blockchain data directory.<br />
# Unzip the archive and check that it is not been asked to replace any existing files. In case check steps before.<br />
# You will see, that removed directories been created again.<br />
|}<br />
{| class="wikitable"<br />
!4. Start DeFi app<br />
|-<br />
|'''OPTION 1''' - New wallet or transaction history is not important<br />
<br />
# You can start DeFi app directly and you will see that starting block for sync is close to the last block.<br />
# Happy DEXing :)<br />
<br />
<br />
'''OPTION 2''' - Re-Index to get full transaction history back<br />
<br />
# 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.<br />
# This will take a while. Take a drink and relax until it is finished.<br />
# Happy DEXing :)<br />
|}<br />
<br />
====Example commands for Linux====<br />
(Just replace the snapshot file with the current version from above.)<br />
cd<br />
mkdir snapshot<br />
cd snapshot<br />
wget <nowiki>https://defi-snapshots-europe.s3.eu-central-1.amazonaws.com/snapshot-mainnet-913128.zip</nowiki><br />
unzip snapshot-mainnet-913128.zip<br />
rm snapshot-mainnet-913128.zip<br />
crontab -e # only if you're using crontab to restart defid automatically: comment the corresponding line, otherwise the node will restart again and you can not copy all directory succesfully<br />
~/.defi/defi-cli stop<br />
rm -Rf ~/.defi/chainstate ~/.defi/enhancedcs ~/.defi/blocks<br />
mv ./* ~/.defi/<br />
~/.defi/defid # only if you do not use crontab, otherwise use next command below<br />
crontab -e # if you are using crontab: uncomment the corresponding line</div>Kunohttps://defichain-wiki.com/index.php?title=Fullnode&diff=1618Fullnode2021-06-07T14:05:17Z<p>Kuno: /* Example commands for Linux */ Changeed to current snapshot.</p>
<hr />
<div>== Defichain Fullnode ==<br />
<br />
To stabilize the network, it is possible to setup a Defichain Fullnode on a virtual or physical server with a fixed IP address.<br />
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.<br />
Everyone in the community can help make the network more stable with a public Fullnode.<br />
<br />
== Requirements ==<br />
<br />
=== General ===<br />
* Fixed IP-Address<br />
* Port Forwarding enabled on Router (Port 8555)<br />
* 24/7 online<br />
* Stable Internetconnection (Upload)<br />
<br />
=== Hardware ===<br />
* 100 GB free disk space (SSD recommended)<br />
* 2-4 vCPU<br />
* 4 GB Memory<br />
<br />
=== Software ===<br />
* Debian 10, 64 Bit<br />
* Ubuntu 18.04<br />
* CentOS 8<br />
<br />
Ubuntu 16.04 is no longer supported with Version 1.7.0 and higher.<br />
<br />
== List of Fullnodes ==<br />
<br />
* [http://status.defichain-masternode.com/ 45.157.177.82:8555]<br />
* [http://status.defichain-masternode.com/ 185.244.194.174:8555]<br />
* [http://status.defichain-masternode.com/ 85.214.187.210:8555]<br />
* [http://status.defichain-masternode.com/ 202.61.246.71:8555]<br />
* [http://status.defichain-masternode.com/ 24.134.79.25:8555]<br />
* [http://status.defichain-masternode.com/ 77.56.65.5:8555]<br />
*[http://status.defichain-masternode.com/ 195.90.210.76:8555]<br />
*[http://status.defichain-masternode.com/ 85.214.55.116:8555]<br />
* ...<br />
<br />
to be continued...<br />
<br />
== Fullnode Installation ==<br />
<br />
==== Ubuntu 18.04/20.04 ====<br />
<br />
===== Create Swapfile =====<br />
<br />
''recommended for Systems less then 4 GB''<br />
<br />
<code>sudo fallocate -l 4G /swapfile</code><br />
<br />
<code>sudo chmod 600 /swapfile</code><br />
<br />
<code>sudo mkswap /swapfile</code><br />
<br />
<code>sudo swapon /swapfile</code><br />
<br />
<br />
''Check the swapfile''<br />
<br />
<code>sudo swapon --show</code><br />
<br />
<br />
''make the Swapfile permanent''<br />
<br />
<code>sudo cp /etc/fstab /etc/fstab.bak</code><br />
<br />
<code>echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab</code><br />
<br />
<br />
''Optimization''<br />
<br />
<code>sudo sysctl vm.swappiness=10</code><br />
<br />
<code>sudo nano /etc/sysctl.conf</code><br />
<br />
<code>vm.swappiness=10</code><br />
<br />
<br />
===== Install Fullnode =====<br />
<br />
[https://github.com/DeFiCh/ain/releases/latest Latest Version]<br />
<br />
<code>wget https://github.com/DeFiCh/ain/releases/download/v1.5.0/defichain-1.5.0-x86_64-pc-linux-gnu.tar.gz</code><br />
<br />
<br />
''unzip package''<br />
<br />
<code>tar -xvzf defichain-1.5.0-x86_64-pc-linux-gnu.tar.gz</code><br />
<br />
<br />
''copy to directory''<br />
<br />
<code>mkdir ~/.defi</code><br />
<br />
<code>cp ./defichain-1.5.0/bin/* ~/.defi</code><br />
<br />
===== Start Fullnode =====<br />
<br />
''Start Fullnode''<br />
<br />
<code>~/.defi/defid -daemon</code><br />
<br />
<br />
''When you upgrade from a previous version, please reindex the whole blockchaindata''<br />
<br />
<code>~/.defi/defid -reindex -daemon</code><br />
<br />
===== Monitor Fullnode =====<br />
<br />
''Check Blockcount''<br />
<br />
<code>.defi/defi-cli getblockcount</code><br />
<br />
<br />
''Start defid after reboot''<br />
<br />
<code>sudo crontab -e</code><br />
<br />
<code>* * * * * pidof defid || ~/.defi/defid</Code><br />
<br />
<br />
''Is your node online?''<br />
<br />
After the node is completely synchronized, check the number of connections with the command below.<br />
<br />
<code>~/.defi/defi-cli getconnectioncount</code><br />
<br />
<br />
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.<br />
More than 8 connections mean that incoming connections are also possible and exist.<br />
<br />
== Create and use backup for blockchain data ==<br />
<br />
=== Problem description ===<br />
[[File:Photo 2021-03-02 22-27-44.jpg|center|thumb|600x600px|Corrupted block database]]<br />
Some users report that this error message occurs again and again. Afterwards, the entire blockchain has to be reloaded, which is very tedious. The cause of this problem lies in the incorrect termination of the DeFi app. It is important that the app is always shut down correctly. <br />
<br />
As a remedy, it is recommended to work with backup solutions. Then the entire blockchain does not have to be reloaded, but only the blocks after creating the backup. <br />
<br />
=== Create backup ===<br />
<br />
# Close the DeFi app<br />
# Go to the folder with the blockchain data On Windows: <code>C:\Users\%username%\AppData\Roaming\DeFi Blockchain</code> On Mac: <code>/Users/%username%/Library/Application Support/DeFi/</code> On Linux: <code>~/.defi</code><br />
# Copy the following 3 folders to another location. This is your blockchain backup. <code>blocks</code> <code>enhancedcs</code> <code>chainstate</code><br />
# The backup is thus created. <br />
[[File:2021-03-20 23.33.38.png|center|thumb|830x830px|enhancedcs blocks chainstate|alt=]]<br />
<br />
=== Restore backup ===<br />
<br />
# Launch the DeFi app and make sure the app has started syncing. <br />
# Exit the DeFi App<br />
# Go to the folder with the blockchain data On Windows: <code>C:\Users\%username%\AppData\Roaming\DeFi Blockchain</code> On Mac: <code>/Users/%username%/Library/Application Support/DeFi/</code> On Linux: <code>~/.defi</code><br />
# Delete the following folders <code>blocks</code> <code>enhancedcs</code> <code>chainstate</code><br />
# Copy the 3 folders from your backup to this folder<br />
# Restart the computer<br />
# Launch the DeFi App<br />
# The app should now continue at the state of the last backup. <br />
<br />
<br />
# <br />
<br />
== Blockchain Snapshot Service ==<br />
<br />
=== Introduction ===<br />
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.<br />
<br />
=== Download sources ===<br />
DeFiChain Fondation: <br />
<br />
Asia: https://defi-snapshots.s3-ap-southeast-1.amazonaws.com/snapshot-mainnet-897577.zip <br />
<br />
Europe: https://defi-snapshots-europe.s3.eu-central-1.amazonaws.com/snapshot-mainnet-897577.zip<br />
<br />
=== Installation guide ===<br />
{| class="wikitable"<br />
!1. Backup your wallet<br />
|-<br />
|Before doing anything else, always take a backup from your wallet!<br />
<br />
# In case your DeFi app is running, please close it gracefully.<br />
# Locate the DeFi Blockchain data directory:<br />
## Windows: C:\Users\%username%\AppData\Roaming\DeFi Blockchain<br />
## Linux: ~/.defi<br />
## Mac OS: /Users/%username%/Library/Application Support/DeFi/<br />
# Make a copy from the directory: wallets<br />
|}<br />
{| class="wikitable"<br />
!2. Remove blockchain files<br />
|-<br />
|We are still in the DeFi Blockchain data directory from step 1.<br />
<br />
# Windows: Select and delete all files and directories, excepting: wallets<br />
# Linux: Delete all files and directories, excepting: wallets<br />
# Mac OS: Delete all files and directories, excepting: wallets<br />
|}<br />
{| class="wikitable"<br />
!3. Unzip blockchain archive<br />
|-<br />
|<br />
# Copy the downloaded blockchain archive to the DeFi Blockchain data directory.<br />
# Unzip the archive and check that it is not been asked to replace any existing files. In case check steps before.<br />
# You will see, that removed directories been created again.<br />
|}<br />
{| class="wikitable"<br />
!4. Start DeFi app<br />
|-<br />
|'''OPTION 1''' - New wallet or transaction history is not important<br />
<br />
# You can start DeFi app directly and you will see that starting block for sync is close to the last block.<br />
# Happy DEXing :)<br />
<br />
<br />
'''OPTION 2''' - Re-Index to get full transaction history back<br />
<br />
# 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.<br />
# This will take a while. Take a drink and relax until it is finished.<br />
# Happy DEXing :)<br />
|}<br />
<br />
====Example commands for Linux====<br />
(Just replace the snapshot file with the current version from above.)<br />
cd<br />
mkdir snapshot<br />
cd snapshot<br />
wget https://defi-snapshots-europe.s3.eu-central-1.amazonaws.com/snapshot-mainnet-897577.zip<br />
unzip snapshot-mainnet-897577.zip<br />
rm snapshot-mainnet-897577.zip<br />
crontab -e # only if you're using crontab to restart defid automatically: comment the corresponding line, otherwise the node will restart again and you can not copy all directory succesfully<br />
~/.defi/defi-cli stop<br />
rm -Rf ~/.defi/chainstate ~/.defi/enhancedcs ~/.defi/blocks<br />
mv ./* ~/.defi/<br />
~/.defi/defid # only if you do not use crontab, otherwise use next command below<br />
crontab -e # if you are using crontab: uncomment the corresponding line</div>Kunohttps://defichain-wiki.com/index.php?title=Fullnode&diff=1617Fullnode2021-06-07T14:01:14Z<p>Kuno: /* Download sources */ Updated snapshot corresponding to the latest in the DeFi Wallet App</p>
<hr />
<div>== Defichain Fullnode ==<br />
<br />
To stabilize the network, it is possible to setup a Defichain Fullnode on a virtual or physical server with a fixed IP address.<br />
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.<br />
Everyone in the community can help make the network more stable with a public Fullnode.<br />
<br />
== Requirements ==<br />
<br />
=== General ===<br />
* Fixed IP-Address<br />
* Port Forwarding enabled on Router (Port 8555)<br />
* 24/7 online<br />
* Stable Internetconnection (Upload)<br />
<br />
=== Hardware ===<br />
* 100 GB free disk space (SSD recommended)<br />
* 2-4 vCPU<br />
* 4 GB Memory<br />
<br />
=== Software ===<br />
* Debian 10, 64 Bit<br />
* Ubuntu 18.04<br />
* CentOS 8<br />
<br />
Ubuntu 16.04 is no longer supported with Version 1.7.0 and higher.<br />
<br />
== List of Fullnodes ==<br />
<br />
* [http://status.defichain-masternode.com/ 45.157.177.82:8555]<br />
* [http://status.defichain-masternode.com/ 185.244.194.174:8555]<br />
* [http://status.defichain-masternode.com/ 85.214.187.210:8555]<br />
* [http://status.defichain-masternode.com/ 202.61.246.71:8555]<br />
* [http://status.defichain-masternode.com/ 24.134.79.25:8555]<br />
* [http://status.defichain-masternode.com/ 77.56.65.5:8555]<br />
*[http://status.defichain-masternode.com/ 195.90.210.76:8555]<br />
*[http://status.defichain-masternode.com/ 85.214.55.116:8555]<br />
* ...<br />
<br />
to be continued...<br />
<br />
== Fullnode Installation ==<br />
<br />
==== Ubuntu 18.04/20.04 ====<br />
<br />
===== Create Swapfile =====<br />
<br />
''recommended for Systems less then 4 GB''<br />
<br />
<code>sudo fallocate -l 4G /swapfile</code><br />
<br />
<code>sudo chmod 600 /swapfile</code><br />
<br />
<code>sudo mkswap /swapfile</code><br />
<br />
<code>sudo swapon /swapfile</code><br />
<br />
<br />
''Check the swapfile''<br />
<br />
<code>sudo swapon --show</code><br />
<br />
<br />
''make the Swapfile permanent''<br />
<br />
<code>sudo cp /etc/fstab /etc/fstab.bak</code><br />
<br />
<code>echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab</code><br />
<br />
<br />
''Optimization''<br />
<br />
<code>sudo sysctl vm.swappiness=10</code><br />
<br />
<code>sudo nano /etc/sysctl.conf</code><br />
<br />
<code>vm.swappiness=10</code><br />
<br />
<br />
===== Install Fullnode =====<br />
<br />
[https://github.com/DeFiCh/ain/releases/latest Latest Version]<br />
<br />
<code>wget https://github.com/DeFiCh/ain/releases/download/v1.5.0/defichain-1.5.0-x86_64-pc-linux-gnu.tar.gz</code><br />
<br />
<br />
''unzip package''<br />
<br />
<code>tar -xvzf defichain-1.5.0-x86_64-pc-linux-gnu.tar.gz</code><br />
<br />
<br />
''copy to directory''<br />
<br />
<code>mkdir ~/.defi</code><br />
<br />
<code>cp ./defichain-1.5.0/bin/* ~/.defi</code><br />
<br />
===== Start Fullnode =====<br />
<br />
''Start Fullnode''<br />
<br />
<code>~/.defi/defid -daemon</code><br />
<br />
<br />
''When you upgrade from a previous version, please reindex the whole blockchaindata''<br />
<br />
<code>~/.defi/defid -reindex -daemon</code><br />
<br />
===== Monitor Fullnode =====<br />
<br />
''Check Blockcount''<br />
<br />
<code>.defi/defi-cli getblockcount</code><br />
<br />
<br />
''Start defid after reboot''<br />
<br />
<code>sudo crontab -e</code><br />
<br />
<code>* * * * * pidof defid || ~/.defi/defid</Code><br />
<br />
<br />
''Is your node online?''<br />
<br />
After the node is completely synchronized, check the number of connections with the command below.<br />
<br />
<code>~/.defi/defi-cli getconnectioncount</code><br />
<br />
<br />
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.<br />
More than 8 connections mean that incoming connections are also possible and exist.<br />
<br />
== Create and use backup for blockchain data ==<br />
<br />
=== Problem description ===<br />
[[File:Photo 2021-03-02 22-27-44.jpg|center|thumb|600x600px|Corrupted block database]]<br />
Some users report that this error message occurs again and again. Afterwards, the entire blockchain has to be reloaded, which is very tedious. The cause of this problem lies in the incorrect termination of the DeFi app. It is important that the app is always shut down correctly. <br />
<br />
As a remedy, it is recommended to work with backup solutions. Then the entire blockchain does not have to be reloaded, but only the blocks after creating the backup. <br />
<br />
=== Create backup ===<br />
<br />
# Close the DeFi app<br />
# Go to the folder with the blockchain data On Windows: <code>C:\Users\%username%\AppData\Roaming\DeFi Blockchain</code> On Mac: <code>/Users/%username%/Library/Application Support/DeFi/</code> On Linux: <code>~/.defi</code><br />
# Copy the following 3 folders to another location. This is your blockchain backup. <code>blocks</code> <code>enhancedcs</code> <code>chainstate</code><br />
# The backup is thus created. <br />
[[File:2021-03-20 23.33.38.png|center|thumb|830x830px|enhancedcs blocks chainstate|alt=]]<br />
<br />
=== Restore backup ===<br />
<br />
# Launch the DeFi app and make sure the app has started syncing. <br />
# Exit the DeFi App<br />
# Go to the folder with the blockchain data On Windows: <code>C:\Users\%username%\AppData\Roaming\DeFi Blockchain</code> On Mac: <code>/Users/%username%/Library/Application Support/DeFi/</code> On Linux: <code>~/.defi</code><br />
# Delete the following folders <code>blocks</code> <code>enhancedcs</code> <code>chainstate</code><br />
# Copy the 3 folders from your backup to this folder<br />
# Restart the computer<br />
# Launch the DeFi App<br />
# The app should now continue at the state of the last backup. <br />
<br />
<br />
# <br />
<br />
== Blockchain Snapshot Service ==<br />
<br />
=== Introduction ===<br />
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.<br />
<br />
=== Download sources ===<br />
DeFiChain Fondation: <br />
<br />
Asia: https://defi-snapshots.s3-ap-southeast-1.amazonaws.com/snapshot-mainnet-897577.zip <br />
<br />
Europe: https://defi-snapshots-europe.s3.eu-central-1.amazonaws.com/snapshot-mainnet-897577.zip<br />
<br />
=== Installation guide ===<br />
{| class="wikitable"<br />
!1. Backup your wallet<br />
|-<br />
|Before doing anything else, always take a backup from your wallet!<br />
<br />
# In case your DeFi app is running, please close it gracefully.<br />
# Locate the DeFi Blockchain data directory:<br />
## Windows: C:\Users\%username%\AppData\Roaming\DeFi Blockchain<br />
## Linux: ~/.defi<br />
## Mac OS: /Users/%username%/Library/Application Support/DeFi/<br />
# Make a copy from the directory: wallets<br />
|}<br />
{| class="wikitable"<br />
!2. Remove blockchain files<br />
|-<br />
|We are still in the DeFi Blockchain data directory from step 1.<br />
<br />
# Windows: Select and delete all files and directories, excepting: wallets<br />
# Linux: Delete all files and directories, excepting: wallets<br />
# Mac OS: Delete all files and directories, excepting: wallets<br />
|}<br />
{| class="wikitable"<br />
!3. Unzip blockchain archive<br />
|-<br />
|<br />
# Copy the downloaded blockchain archive to the DeFi Blockchain data directory.<br />
# Unzip the archive and check that it is not been asked to replace any existing files. In case check steps before.<br />
# You will see, that removed directories been created again.<br />
|}<br />
{| class="wikitable"<br />
!4. Start DeFi app<br />
|-<br />
|'''OPTION 1''' - New wallet or transaction history is not important<br />
<br />
# You can start DeFi app directly and you will see that starting block for sync is close to the last block.<br />
# Happy DEXing :)<br />
<br />
<br />
'''OPTION 2''' - Re-Index to get full transaction history back<br />
<br />
# 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.<br />
# This will take a while. Take a drink and relax until it is finished.<br />
# Happy DEXing :)<br />
|}<br />
<br />
====Example commands for Linux====<br />
(Just replace the snapshot file with the current version from above.)<br />
cd<br />
mkdir snapshot<br />
cd snapshot<br />
wget https://defi-snapshots-europe.s3-eu-central-1.amazonaws.com/snapshot-mainnet-879413.zip<br />
unzip snapshot-mainnet-879413.zip<br />
rm snapshot-mainnet-879413.zip<br />
crontab -e # only if you're using crontab to restart defid automatically: comment the corresponding line, otherwise the node will restart again and you can not copy all directory succesfully<br />
~/.defi/defi-cli stop<br />
rm -Rf ~/.defi/chainstate ~/.defi/enhancedcs ~/.defi/blocks<br />
mv ./* ~/.defi/<br />
~/.defi/defid # only if you do not use crontab, otherwise use next command below<br />
crontab -e # if you are using crontab: uncomment the corresponding line</div>Kunohttps://defichain-wiki.com/index.php?title=Fullnode&diff=1616Fullnode2021-06-06T19:19:45Z<p>Kuno: /* Example commands for Linux */ typo</p>
<hr />
<div>== Defichain Fullnode ==<br />
<br />
To stabilize the network, it is possible to setup a Defichain Fullnode on a virtual or physical server with a fixed IP address.<br />
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.<br />
Everyone in the community can help make the network more stable with a public Fullnode.<br />
<br />
== Requirements ==<br />
<br />
=== General ===<br />
* Fixed IP-Address<br />
* Port Forwarding enabled on Router (Port 8555)<br />
* 24/7 online<br />
* Stable Internetconnection (Upload)<br />
<br />
=== Hardware ===<br />
* 100 GB free disk space (SSD recommended)<br />
* 2-4 vCPU<br />
* 4 GB Memory<br />
<br />
=== Software ===<br />
* Debian 10, 64 Bit<br />
* Ubuntu 18.04<br />
* CentOS 8<br />
<br />
Ubuntu 16.04 is no longer supported with Version 1.7.0 and higher.<br />
<br />
== List of Fullnodes ==<br />
<br />
* [http://status.defichain-masternode.com/ 45.157.177.82:8555]<br />
* [http://status.defichain-masternode.com/ 185.244.194.174:8555]<br />
* [http://status.defichain-masternode.com/ 85.214.187.210:8555]<br />
* [http://status.defichain-masternode.com/ 202.61.246.71:8555]<br />
* [http://status.defichain-masternode.com/ 24.134.79.25:8555]<br />
* [http://status.defichain-masternode.com/ 77.56.65.5:8555]<br />
*[http://status.defichain-masternode.com/ 195.90.210.76:8555]<br />
*[http://status.defichain-masternode.com/ 85.214.55.116:8555]<br />
* ...<br />
<br />
to be continued...<br />
<br />
== Fullnode Installation ==<br />
<br />
==== Ubuntu 18.04/20.04 ====<br />
<br />
===== Create Swapfile =====<br />
<br />
''recommended for Systems less then 4 GB''<br />
<br />
<code>sudo fallocate -l 4G /swapfile</code><br />
<br />
<code>sudo chmod 600 /swapfile</code><br />
<br />
<code>sudo mkswap /swapfile</code><br />
<br />
<code>sudo swapon /swapfile</code><br />
<br />
<br />
''Check the swapfile''<br />
<br />
<code>sudo swapon --show</code><br />
<br />
<br />
''make the Swapfile permanent''<br />
<br />
<code>sudo cp /etc/fstab /etc/fstab.bak</code><br />
<br />
<code>echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab</code><br />
<br />
<br />
''Optimization''<br />
<br />
<code>sudo sysctl vm.swappiness=10</code><br />
<br />
<code>sudo nano /etc/sysctl.conf</code><br />
<br />
<code>vm.swappiness=10</code><br />
<br />
<br />
===== Install Fullnode =====<br />
<br />
[https://github.com/DeFiCh/ain/releases/latest Latest Version]<br />
<br />
<code>wget https://github.com/DeFiCh/ain/releases/download/v1.5.0/defichain-1.5.0-x86_64-pc-linux-gnu.tar.gz</code><br />
<br />
<br />
''unzip package''<br />
<br />
<code>tar -xvzf defichain-1.5.0-x86_64-pc-linux-gnu.tar.gz</code><br />
<br />
<br />
''copy to directory''<br />
<br />
<code>mkdir ~/.defi</code><br />
<br />
<code>cp ./defichain-1.5.0/bin/* ~/.defi</code><br />
<br />
===== Start Fullnode =====<br />
<br />
''Start Fullnode''<br />
<br />
<code>~/.defi/defid -daemon</code><br />
<br />
<br />
''When you upgrade from a previous version, please reindex the whole blockchaindata''<br />
<br />
<code>~/.defi/defid -reindex -daemon</code><br />
<br />
===== Monitor Fullnode =====<br />
<br />
''Check Blockcount''<br />
<br />
<code>.defi/defi-cli getblockcount</code><br />
<br />
<br />
''Start defid after reboot''<br />
<br />
<code>sudo crontab -e</code><br />
<br />
<code>* * * * * pidof defid || ~/.defi/defid</Code><br />
<br />
<br />
''Is your node online?''<br />
<br />
After the node is completely synchronized, check the number of connections with the command below.<br />
<br />
<code>~/.defi/defi-cli getconnectioncount</code><br />
<br />
<br />
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.<br />
More than 8 connections mean that incoming connections are also possible and exist.<br />
<br />
== Create and use backup for blockchain data ==<br />
<br />
=== Problem description ===<br />
[[File:Photo 2021-03-02 22-27-44.jpg|center|thumb|600x600px|Corrupted block database]]<br />
Some users report that this error message occurs again and again. Afterwards, the entire blockchain has to be reloaded, which is very tedious. The cause of this problem lies in the incorrect termination of the DeFi app. It is important that the app is always shut down correctly. <br />
<br />
As a remedy, it is recommended to work with backup solutions. Then the entire blockchain does not have to be reloaded, but only the blocks after creating the backup. <br />
<br />
=== Create backup ===<br />
<br />
# Close the DeFi app<br />
# Go to the folder with the blockchain data On Windows: <code>C:\Users\%username%\AppData\Roaming\DeFi Blockchain</code> On Mac: <code>/Users/%username%/Library/Application Support/DeFi/</code> On Linux: <code>~/.defi</code><br />
# Copy the following 3 folders to another location. This is your blockchain backup. <code>blocks</code> <code>enhancedcs</code> <code>chainstate</code><br />
# The backup is thus created. <br />
[[File:2021-03-20 23.33.38.png|center|thumb|830x830px|enhancedcs blocks chainstate|alt=]]<br />
<br />
=== Restore backup ===<br />
<br />
# Launch the DeFi app and make sure the app has started syncing. <br />
# Exit the DeFi App<br />
# Go to the folder with the blockchain data On Windows: <code>C:\Users\%username%\AppData\Roaming\DeFi Blockchain</code> On Mac: <code>/Users/%username%/Library/Application Support/DeFi/</code> On Linux: <code>~/.defi</code><br />
# Delete the following folders <code>blocks</code> <code>enhancedcs</code> <code>chainstate</code><br />
# Copy the 3 folders from your backup to this folder<br />
# Restart the computer<br />
# Launch the DeFi App<br />
# The app should now continue at the state of the last backup. <br />
<br />
<br />
# <br />
<br />
== Blockchain Snapshot Service ==<br />
<br />
=== Introduction ===<br />
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.<br />
<br />
=== Download sources ===<br />
DeFiChain Fondation: <br />
<br />
Asia: https://defi-snapshots.s3-ap-southeast-1.amazonaws.com/snapshot-mainnet-879413.zip <br />
<br />
Europe: https://defi-snapshots-europe.s3-eu-central-1.amazonaws.com/snapshot-mainnet-879413.zip<br />
<br />
=== Installation guide ===<br />
{| class="wikitable"<br />
!1. Backup your wallet<br />
|-<br />
|Before doing anything else, always take a backup from your wallet!<br />
<br />
# In case your DeFi app is running, please close it gracefully.<br />
# Locate the DeFi Blockchain data directory:<br />
## Windows: C:\Users\%username%\AppData\Roaming\DeFi Blockchain<br />
## Linux: ~/.defi<br />
## Mac OS: /Users/%username%/Library/Application Support/DeFi/<br />
# Make a copy from the directory: wallets<br />
|}<br />
{| class="wikitable"<br />
!2. Remove blockchain files<br />
|-<br />
|We are still in the DeFi Blockchain data directory from step 1.<br />
<br />
# Windows: Select and delete all files and directories, excepting: wallets<br />
# Linux: Delete all files and directories, excepting: wallets<br />
# Mac OS: Delete all files and directories, excepting: wallets<br />
|}<br />
{| class="wikitable"<br />
!3. Unzip blockchain archive<br />
|-<br />
|<br />
# Copy the downloaded blockchain archive to the DeFi Blockchain data directory.<br />
# Unzip the archive and check that it is not been asked to replace any existing files. In case check steps before.<br />
# You will see, that removed directories been created again.<br />
|}<br />
{| class="wikitable"<br />
!4. Start DeFi app<br />
|-<br />
|'''OPTION 1''' - New wallet or transaction history is not important<br />
<br />
# You can start DeFi app directly and you will see that starting block for sync is close to the last block.<br />
# Happy DEXing :)<br />
<br />
<br />
'''OPTION 2''' - Re-Index to get full transaction history back<br />
<br />
# 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.<br />
# This will take a while. Take a drink and relax until it is finished.<br />
# Happy DEXing :)<br />
|}<br />
<br />
====Example commands for Linux====<br />
(Just replace the snapshot file with the current version from above.)<br />
cd<br />
mkdir snapshot<br />
cd snapshot<br />
wget https://defi-snapshots-europe.s3-eu-central-1.amazonaws.com/snapshot-mainnet-879413.zip<br />
unzip snapshot-mainnet-879413.zip<br />
rm snapshot-mainnet-879413.zip<br />
crontab -e # only if you're using crontab to restart defid automatically: comment the corresponding line, otherwise the node will restart again and you can not copy all directory succesfully<br />
~/.defi/defi-cli stop<br />
rm -Rf ~/.defi/chainstate ~/.defi/enhancedcs ~/.defi/blocks<br />
mv ./* ~/.defi/<br />
~/.defi/defid # only if you do not use crontab, otherwise use next command below<br />
crontab -e # if you are using crontab: uncomment the corresponding line</div>Kunohttps://defichain-wiki.com/index.php?title=Fullnode&diff=1615Fullnode2021-06-06T19:19:08Z<p>Kuno: /* Installation guide */ added an example command set for Linux</p>
<hr />
<div>== Defichain Fullnode ==<br />
<br />
To stabilize the network, it is possible to setup a Defichain Fullnode on a virtual or physical server with a fixed IP address.<br />
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.<br />
Everyone in the community can help make the network more stable with a public Fullnode.<br />
<br />
== Requirements ==<br />
<br />
=== General ===<br />
* Fixed IP-Address<br />
* Port Forwarding enabled on Router (Port 8555)<br />
* 24/7 online<br />
* Stable Internetconnection (Upload)<br />
<br />
=== Hardware ===<br />
* 100 GB free disk space (SSD recommended)<br />
* 2-4 vCPU<br />
* 4 GB Memory<br />
<br />
=== Software ===<br />
* Debian 10, 64 Bit<br />
* Ubuntu 18.04<br />
* CentOS 8<br />
<br />
Ubuntu 16.04 is no longer supported with Version 1.7.0 and higher.<br />
<br />
== List of Fullnodes ==<br />
<br />
* [http://status.defichain-masternode.com/ 45.157.177.82:8555]<br />
* [http://status.defichain-masternode.com/ 185.244.194.174:8555]<br />
* [http://status.defichain-masternode.com/ 85.214.187.210:8555]<br />
* [http://status.defichain-masternode.com/ 202.61.246.71:8555]<br />
* [http://status.defichain-masternode.com/ 24.134.79.25:8555]<br />
* [http://status.defichain-masternode.com/ 77.56.65.5:8555]<br />
*[http://status.defichain-masternode.com/ 195.90.210.76:8555]<br />
*[http://status.defichain-masternode.com/ 85.214.55.116:8555]<br />
* ...<br />
<br />
to be continued...<br />
<br />
== Fullnode Installation ==<br />
<br />
==== Ubuntu 18.04/20.04 ====<br />
<br />
===== Create Swapfile =====<br />
<br />
''recommended for Systems less then 4 GB''<br />
<br />
<code>sudo fallocate -l 4G /swapfile</code><br />
<br />
<code>sudo chmod 600 /swapfile</code><br />
<br />
<code>sudo mkswap /swapfile</code><br />
<br />
<code>sudo swapon /swapfile</code><br />
<br />
<br />
''Check the swapfile''<br />
<br />
<code>sudo swapon --show</code><br />
<br />
<br />
''make the Swapfile permanent''<br />
<br />
<code>sudo cp /etc/fstab /etc/fstab.bak</code><br />
<br />
<code>echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab</code><br />
<br />
<br />
''Optimization''<br />
<br />
<code>sudo sysctl vm.swappiness=10</code><br />
<br />
<code>sudo nano /etc/sysctl.conf</code><br />
<br />
<code>vm.swappiness=10</code><br />
<br />
<br />
===== Install Fullnode =====<br />
<br />
[https://github.com/DeFiCh/ain/releases/latest Latest Version]<br />
<br />
<code>wget https://github.com/DeFiCh/ain/releases/download/v1.5.0/defichain-1.5.0-x86_64-pc-linux-gnu.tar.gz</code><br />
<br />
<br />
''unzip package''<br />
<br />
<code>tar -xvzf defichain-1.5.0-x86_64-pc-linux-gnu.tar.gz</code><br />
<br />
<br />
''copy to directory''<br />
<br />
<code>mkdir ~/.defi</code><br />
<br />
<code>cp ./defichain-1.5.0/bin/* ~/.defi</code><br />
<br />
===== Start Fullnode =====<br />
<br />
''Start Fullnode''<br />
<br />
<code>~/.defi/defid -daemon</code><br />
<br />
<br />
''When you upgrade from a previous version, please reindex the whole blockchaindata''<br />
<br />
<code>~/.defi/defid -reindex -daemon</code><br />
<br />
===== Monitor Fullnode =====<br />
<br />
''Check Blockcount''<br />
<br />
<code>.defi/defi-cli getblockcount</code><br />
<br />
<br />
''Start defid after reboot''<br />
<br />
<code>sudo crontab -e</code><br />
<br />
<code>* * * * * pidof defid || ~/.defi/defid</Code><br />
<br />
<br />
''Is your node online?''<br />
<br />
After the node is completely synchronized, check the number of connections with the command below.<br />
<br />
<code>~/.defi/defi-cli getconnectioncount</code><br />
<br />
<br />
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.<br />
More than 8 connections mean that incoming connections are also possible and exist.<br />
<br />
== Create and use backup for blockchain data ==<br />
<br />
=== Problem description ===<br />
[[File:Photo 2021-03-02 22-27-44.jpg|center|thumb|600x600px|Corrupted block database]]<br />
Some users report that this error message occurs again and again. Afterwards, the entire blockchain has to be reloaded, which is very tedious. The cause of this problem lies in the incorrect termination of the DeFi app. It is important that the app is always shut down correctly. <br />
<br />
As a remedy, it is recommended to work with backup solutions. Then the entire blockchain does not have to be reloaded, but only the blocks after creating the backup. <br />
<br />
=== Create backup ===<br />
<br />
# Close the DeFi app<br />
# Go to the folder with the blockchain data On Windows: <code>C:\Users\%username%\AppData\Roaming\DeFi Blockchain</code> On Mac: <code>/Users/%username%/Library/Application Support/DeFi/</code> On Linux: <code>~/.defi</code><br />
# Copy the following 3 folders to another location. This is your blockchain backup. <code>blocks</code> <code>enhancedcs</code> <code>chainstate</code><br />
# The backup is thus created. <br />
[[File:2021-03-20 23.33.38.png|center|thumb|830x830px|enhancedcs blocks chainstate|alt=]]<br />
<br />
=== Restore backup ===<br />
<br />
# Launch the DeFi app and make sure the app has started syncing. <br />
# Exit the DeFi App<br />
# Go to the folder with the blockchain data On Windows: <code>C:\Users\%username%\AppData\Roaming\DeFi Blockchain</code> On Mac: <code>/Users/%username%/Library/Application Support/DeFi/</code> On Linux: <code>~/.defi</code><br />
# Delete the following folders <code>blocks</code> <code>enhancedcs</code> <code>chainstate</code><br />
# Copy the 3 folders from your backup to this folder<br />
# Restart the computer<br />
# Launch the DeFi App<br />
# The app should now continue at the state of the last backup. <br />
<br />
<br />
# <br />
<br />
== Blockchain Snapshot Service ==<br />
<br />
=== Introduction ===<br />
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.<br />
<br />
=== Download sources ===<br />
DeFiChain Fondation: <br />
<br />
Asia: https://defi-snapshots.s3-ap-southeast-1.amazonaws.com/snapshot-mainnet-879413.zip <br />
<br />
Europe: https://defi-snapshots-europe.s3-eu-central-1.amazonaws.com/snapshot-mainnet-879413.zip<br />
<br />
=== Installation guide ===<br />
{| class="wikitable"<br />
!1. Backup your wallet<br />
|-<br />
|Before doing anything else, always take a backup from your wallet!<br />
<br />
# In case your DeFi app is running, please close it gracefully.<br />
# Locate the DeFi Blockchain data directory:<br />
## Windows: C:\Users\%username%\AppData\Roaming\DeFi Blockchain<br />
## Linux: ~/.defi<br />
## Mac OS: /Users/%username%/Library/Application Support/DeFi/<br />
# Make a copy from the directory: wallets<br />
|}<br />
{| class="wikitable"<br />
!2. Remove blockchain files<br />
|-<br />
|We are still in the DeFi Blockchain data directory from step 1.<br />
<br />
# Windows: Select and delete all files and directories, excepting: wallets<br />
# Linux: Delete all files and directories, excepting: wallets<br />
# Mac OS: Delete all files and directories, excepting: wallets<br />
|}<br />
{| class="wikitable"<br />
!3. Unzip blockchain archive<br />
|-<br />
|<br />
# Copy the downloaded blockchain archive to the DeFi Blockchain data directory.<br />
# Unzip the archive and check that it is not been asked to replace any existing files. In case check steps before.<br />
# You will see, that removed directories been created again.<br />
|}<br />
{| class="wikitable"<br />
!4. Start DeFi app<br />
|-<br />
|'''OPTION 1''' - New wallet or transaction history is not important<br />
<br />
# You can start DeFi app directly and you will see that starting block for sync is close to the last block.<br />
# Happy DEXing :)<br />
<br />
<br />
'''OPTION 2''' - Re-Index to get full transaction history back<br />
<br />
# 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.<br />
# This will take a while. Take a drink and relax until it is finished.<br />
# Happy DEXing :)<br />
|}<br />
<br />
====Example commands for Linux====<br />
(Just replace the snapshot file with the current local version from above.)<br />
cd<br />
mkdir snapshot<br />
cd snapshot<br />
wget https://defi-snapshots-europe.s3-eu-central-1.amazonaws.com/snapshot-mainnet-879413.zip<br />
unzip snapshot-mainnet-879413.zip<br />
rm snapshot-mainnet-879413.zip<br />
crontab -e # only if you're using crontab to restart defid automatically: comment the corresponding line, otherwise the node will restart again and you can not copy all directory succesfully<br />
~/.defi/defi-cli stop<br />
rm -Rf ~/.defi/chainstate ~/.defi/enhancedcs ~/.defi/blocks<br />
mv ./* ~/.defi/<br />
~/.defi/defid # only if you do not use crontab, otherwise use next command below<br />
crontab -e # if you are using crontab: uncomment the corresponding line</div>Kunohttps://defichain-wiki.com/index.php?title=Cli_commands&diff=1614Cli commands2021-06-06T19:01:58Z<p>Kuno: /* Network */ added the Link for Addnode</p>
<hr />
<div>== Accounts ==<br />
#accounthistorycount ( "owner" {"no_rewards":bool,"token":"str","txtype":"str"} )<br />
#accounttoaccount "from" {"address":"str"} ( [{"txid":"hex","vout":n},...] )<br />
##Explanation: AccountToAccount sends from one account to many accounts. AnyAccountsToAccount can send from many accounts to many accounts<br />
#accounttoutxos "from" {"address":"str"} ( [{"txid":"hex","vout":n},...] )<br />
#getaccount "owner" ( {"start":"str","including_start":bool,"limit":n} indexed_amounts )<br />
#gettokenbalances ( {"start":"str","including_start":bool,"limit":n} indexed_amounts symbol_lookup )<br />
#listaccounthistory ( "owner" {"maxBlockHeight":n,"depth":n,"no_rewards":bool,"token":"str","txtype":"str","limit":n} )<br />
#listaccounts ( {"start":"str","including_start":bool,"limit":n} verbose indexed_amounts is_mine_only )<br />
#listcommunitybalances<br />
#sendtokenstoaddress {"address":"str"} {"address":"str"} ( "selectionMode" )<br />
#utxostoaccount {"address":"str"} ( [{"txid":"hex","vout":n},...] )<br />
<br />
== Blockchain ==<br />
#clearmempool<br />
#getbestblockhash<br />
#getblock "blockhash" ( verbosity )<br />
#getblockchaininfo<br />
#getblockcount<br />
#getblockfilter "blockhash" ( "filtertype" )<br />
#getblockhash height<br />
#getblockheader "blockhash" ( verbose )<br />
#getblockstats hash_or_height ( stats )<br />
#getchaintips<br />
#getchaintxstats ( nblocks "blockhash" )<br />
#getdifficulty<br />
#getgov "name"<br />
#getmempoolancestors "txid" ( verbose )<br />
#getmempooldescendants "txid" ( verbose )<br />
#getmempoolentry "txid"<br />
#getmempoolinfo<br />
#getrawmempool ( verbose )<br />
#gettxout "txid" n ( include_mempool )<br />
#gettxoutproof ["txid",...] ( "blockhash" )<br />
#gettxoutsetinfo<br />
#isappliedcustomtx ( "txid" blockHeight )<br />
#preciousblock "blockhash"<br />
#pruneblockchain height<br />
#savemempool<br />
#scantxoutset "action" [scanobjects,...]<br />
#setgov {"name":"str"} ( [{"txid":"hex","vout":n},...] )<br />
#verifychain ( checklevel nblocks )<br />
#verifytxoutproof "proof"<br />
<br />
== Control ==<br />
#getmemoryinfo ( "mode" )<br />
#getrpcinfo<br />
#help ( "command" )<br />
#logging ( ["include_category",...] ["exclude_category",...] )<br />
#stop<br />
#uptime<br />
<br />
== Generating ==<br />
#generatetoaddress nblocks "address" ( maxtries )<br />
<br />
== Masternodes ==<br />
#createmasternode "ownerAddress" ( "operatorAddress" [{"txid":"hex","vout":n},...] )<br />
#getanchorteams ( blockHeight )<br />
#getmasternode "mn_id"<br />
#getmasternodeblocks ( {"id":"hex","ownerAddress":"str","operatorAddress":"str"} depth )<br />
#listanchors<br />
#listcriminalproofs ( {"start":"hex","including_start":bool,"limit":n} )<br />
#listmasternodes ( {"start":"hex","including_start":bool,"limit":n} verbose )<br />
#resignmasternode "mn_id" ( [{"txid":"hex","vout":n},...] )<br />
<br />
== Mining ==<br />
#getblocktemplate ( "template_request" )<br />
#getmintinginfo<br />
#getnetworkhashps ( nblocks height )<br />
#prioritisetransaction "txid" ( dummy ) fee_delta<br />
#submitblock "hexdata" ( "dummy" )<br />
#submitheader "hexdata"<br />
<br />
== Network ==<br />
#[[addnode]] "node" "command"<br />
#clearbanned<br />
#disconnectnode ( "address" nodeid )<br />
#getaddednodeinfo ( "node" )<br />
#getconnectioncount<br />
#getnettotals<br />
#getnetworkinfo<br />
#getnodeaddresses ( count )<br />
#getpeerinfo<br />
#listbanned<br />
#ping<br />
#setban "subnet" "command" ( bantime absolute )<br />
#setnetworkactive state<br />
<br />
== Poolpair ==<br />
#addpoolliquidity {"address":"str"} "shareAddress" ( [{"txid":"hex","vout":n},...] )<br />
#createpoolpair ( {"tokenA":"str","tokenB":"str","commission":n,"status":bool,"ownerAddress":"str","customRewards":"str","pairSymbol":"str"} [{"txid":"hex","vout":n},...] )<br />
#getpoolpair "key" ( verbose )<br />
#listpoolpairs ( {"start":n,"including_start":bool,"limit":n} verbose )<br />
#listpoolshares ( {"start":n,"including_start":bool,"limit":n} verbose is_mine_only )<br />
#poolswap {"from":"str","tokenFrom":"str","amountFrom":n,"to":"str","tokenTo":"str","maxPrice":n} ( [{"txid":"hex","vout":n},...] )<br />
#removepoolliquidity "from" "amount" ( [{"txid":"hex","vout":n},...] )<br />
#testpoolswap ( {"from":"str","tokenFrom":"str","amountFrom":n,"to":"str","tokenTo":"str","maxPrice":n} )<br />
#updatepoolpair ( {"pool":"str","status":bool,"commission":n,"ownerAddress":"str","customRewards":"str"} [{"txid":"hex","vout":n},...] )<br />
<br />
== Rawtransactions ==<br />
#analyzepsbt "psbt"<br />
#combinepsbt ["psbt",...]<br />
#combinerawtransaction ["hexstring",...]<br />
#converttopsbt "hexstring" ( permitsigdata iswitness )<br />
#createpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable)<br />
#createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable )<br />
#decodepsbt "psbt"<br />
#decoderawtransaction "hexstring" ( iswitness )<br />
#decodescript "hexstring"<br />
#finalizepsbt "psbt" ( extract )<br />
#fundrawtransaction "hexstring" ( options iswitness )<br />
#getrawtransaction "txid" ( verbose "blockhash" )<br />
#joinpsbts ["psbt",...]<br />
#sendrawtransaction "hexstring" ( maxfeerate )<br />
#signrawtransactionwithkey "hexstring" ["privatekey",...] ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )<br />
#testmempoolaccept ["rawtx",...] ( maxfeerate )<br />
#utxoupdatepsbt "psbt" ( ["",{"desc":"str","range":n or [n,n]},...] )<br />
<br />
== Spv ==<br />
#spv_createanchor ( [{"txid":"hex","vout":n,"amount":n,"privkey":"str"},...] ) "rewardAddress" ( send feerate )<br />
#spv_createanchortemplate "rewardAddress"<br />
#spv_estimateanchorcost ( feerate )<br />
#spv_gettxconfirmations "txhash"<br />
#spv_listanchorauths<br />
#spv_listanchorrewardconfirms<br />
#spv_listanchorrewards<br />
#spv_listanchors ( minBtcHeight maxBtcHeight minConfs maxConfs )<br />
#spv_listanchorspending<br />
#spv_listanchorsunrewarded<br />
#spv_rescan ( height )<br />
#spv_sendrawtx "rawtx"<br />
#spv_splitutxo parts ( amount )<br />
#spv_syncstatus<br />
<br />
== Tokens ==<br />
#createtoken ( {"symbol":"str","name":"str","isDAT":bool,"decimal":n,"limit":n,"mintable":bool,"tradeable":bool,"collateralAddress":"str"} [{"txid":"hex","vout":n},...] )<br />
#getcustomtx "txid" ( "blockhash" )<br />
#gettoken "key"<br />
#listtokens ( {"start":n,"including_start":bool,"limit":n} verbose )<br />
#minttokens "amounts" ( [{"txid":"hex","vout":n},...] )<br />
#updatetoken "token" ( {"symbol":"str","name":"str","isDAT":bool,"mintable":bool,"tradeable":bool,"finalize":bool} [{"txid":"hex","vout":n},...] )<br />
<br />
== Util ==<br />
#createmultisig nrequired ["key",...] ( "address_type" )<br />
#deriveaddresses "descriptor" ( range )<br />
#estimatesmartfee conf_target ( "estimate_mode" )<br />
#getdescriptorinfo "descriptor"<br />
#signmessagewithprivkey "privkey" "message"<br />
#validateaddress "address"<br />
#verifymessage "address" "signature" "message"<br />
<br />
== Wallet ==<br />
#abandontransaction "txid"<br />
#abortrescan<br />
#addmultisigaddress nrequired ["key",...] ( "label" "address_type" )<br />
#backupwallet "destination"<br />
#bumpfee "txid" ( options )<br />
#createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse )<br />
#dumpprivkey "address"<br />
#dumpwallet "filename"<br />
#encryptwallet "passphrase"<br />
#getaddressesbylabel "label"<br />
#getaddressinfo "address"<br />
#getbalance ( "dummy" minconf include_watchonly avoid_reuse with_tokens )<br />
#getbalances ( with_tokens )<br />
#getnewaddress ( "label" "address_type" )<br />
#getrawchangeaddress ( "address_type" )<br />
#getreceivedbyaddress "address" ( minconf )<br />
#getreceivedbylabel "label" ( minconf )<br />
#gettransaction "txid" ( include_watchonly )<br />
#getunconfirmedbalance ( with_tokens )<br />
#getwalletinfo ( with_tokens )<br />
#importaddress "address" ( "label" rescan p2sh )<br />
#importmulti "requests" ( "options" )<br />
#importprivkey "privkey" ( "label" rescan )<br />
#importprunedfunds "rawtransaction" "txoutproof"<br />
#importpubkey "pubkey" ( "label" rescan )<br />
#importwallet "filename"<br />
#keypoolrefill ( newsize )<br />
#listaddressgroupings<br />
#listlabels ( "purpose" )<br />
#listlockunspent<br />
#listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" )<br />
#listreceivedbylabel ( minconf include_empty include_watchonly )<br />
#listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed )<br />
#listtransactions ( "label" count skip include_watchonly exclude_custom_tx )<br />
#listunspent ( minconf maxconf ["address",...] include_unsafe query_options )<br />
#listwalletdir<br />
#listwallets<br />
#loadwallet "filename"<br />
#lockunspent unlock ( [{"txid":"hex","vout":n},...] )<br />
#removeprunedfunds "txid"<br />
#rescanblockchain ( start_height stop_height )<br />
#sendmany "" {"address":amount} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode" )<br />
#sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode"avoid_reuse )<br />
#sethdseed ( newkeypool "seed" )<br />
#setlabel "address" "label"<br />
#settxfee amount<br />
#setwalletflag "flag" ( value )<br />
#signmessage "address" "message"<br />
#signrawtransactionwithwallet "hexstring" ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )<br />
#unloadwallet ( "wallet_name" )<br />
#walletcreatefundedpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime options bip32derivs )<br />
#walletlock<br />
#walletpassphrase "passphrase" timeout<br />
#walletpassphrasechange "oldpassphrase" "newpassphrase"<br />
#walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs )<br />
<br />
== Zmq ==<br />
#getzmqnotifications</div>Kunohttps://defichain-wiki.com/index.php?title=Addnode&diff=1613Addnode2021-06-06T18:55:26Z<p>Kuno: added the addnode example for the defi.conf file</p>
<hr />
<div>Sometimes the Wallet-APP in Windows, Mac or Linux need a long time to sync the whole blockchain.<br />
<br />
In this case you can manually add some Fullnodes with a high and stable Internet Connection to your Peerlist to give the sync a "boost".<br />
<br />
[[File:Cli addnode.jpg|thumb|addnode|alt=|none]]<br />
<br />
To do this, open the CLI in the APP and type the following Command:<br />
<br />
<code>addnode "ipaddress:port" add</code><br />
<br />
Click Enter and and when the output is 'null', the command was successfull.<br />
<br />
If you like you can also add lines in the defi.conf file to make sure, every restart after an update or installed snapshot has these nodes set as peers, e.g.(see [https://github.com/DeFiCh/ain/blob/master/share/examples/default.conf github] for examples and documentation):<br />
<br />
<code>addnode=seed.mydeficha.in:8555</code><br />
<br />
A list of Fullnodes can you find [[Fullnode#List_of_Fullnodes|here]].<br />
<br />
<br />
The project [https://mydeficha.in/ mydeficha.in] offers a seed you can add. This will in fact add many addresses at once.<br />
<br />
Simple type<br />
<br />
<code>addnode "seed.mydeficha.in:8555" add</code><br />
<br />
in the command line.<br />
<br />
If you get a "Method not found" you probably have a typo or forget a " " (space/blank) after addnode.</div>Kuno