Blockchain Node - defid
DeFiChain is a distributed network of computers running software (known as nodes). DeFiChain nodes are able to
- Store all blockchain data
- Serve data to lightweight clients
- Validate and propogate blocks and transactions
Every DeFiChain node runs an implementation of the DeFiChain protocol, and can be run on local and cloud machines. The recommended requirements for running the reference defid
node are
- Desktop or laptop hardware running recent versions of Windows, Mac OS X, or Linux.
- Atleast 30 GB of disk space (Minimum: ~8GB)
- Atleast 8 gigabytes of physical memory (RAM) (Minimum: ~1GB, but isn't recommended and sufficient swap is required)
- 4 GB of swap space (Minimum: None, but highly recommended to give room for memory fragmentation spikes)
There are two ways start using the node - using the compiled releases or compiling the souce code on your own.
Using compiled releases
Download the latest available release from Github. Extract the archive by using an archive manager, or running the following command in a terminal
tar xzf <filename>.tar.gz # replace <filename> with the filename downloaded file
You can run the following install command to globally install the DeFiChain binaries.
sudo install -m 0755 -o root -g root -t /usr/local/bin <defichain-path>/bin/* # replace <defichain-path> with the path to the root of the extracted folder
Proceed to Initial Block Download.
Initial Block Download
Once you have the required binaries available, you can start the node by running the following commands in the folder with the executables.
Linux and macOS: ./defid
Windows: defid.exe
This will start the node and the software will begin syncing blockchain data. Your wallets and transaction history will not be visible until the blockchain has been completely synced and up to date with the rest of the nodes. Currently the blockchain takes up around 4GB of disk space.
In order to speed up the process, you can download a snapshot from AWS.
- Stop the
defid
process. - Go to an AWS bucket and copy the filename of the latest (bottom most) snapshot.
- Replace
index.txt
in the URL with the filename from the previous step. - Extract the contents of the downloaded
.zip
file. - Copy the extracted contents into the
.defi
folder.- Windows:
C:\Users\<username>\AppData\Roaming\DeFi Blockchain
- Linux:
~/.defi/
- macOS:
/Users/<username>/Library/Application\ Support/DeFi
- Windows:
- Now restart the
defi
process. There will be a short syncing process to get the node up to date with the rest of the network.
Interacting with the node
Once defid
is running, you interact with the node on a different terminal using the defi-cli
application. You can run ./defi-cli help
to see a list of available commands.
Proceed to Using a wallet to learn how to get started with using the node.