Run a Full-Node

Step-by-step guide to running a full-node for interacting with the MetaChain network.

This guide aims to provide a comprehensive, step-by-step walkthrough for developers interested in running a full node on MetaChain's Floppynet. By following this guide, you'll be able to set up, compile, and run a MetaChain node, monitor its synchronization progress, and even connect it to MetaMask.

Requirements

  • Linux-based machine (MacOS and Windows support is under development)

  • Docker installed and running

  • Basic knowledge of command-line operations

Step 1: Get the Source Code

  1. Clone the feature/evm branch of the official DeFiChain node repository:

git clone -b feature/evm https://github.com/DeFiCh/ain.git
cd ain

Step 2: Compile the Node

Note: This build process is currently operational on Linux. MacOS and Windows processes are under development.

  1. Ensure Docker is installed and running on your machine. Follow the official guide to install, configure, and run Docker.

  2. Use the make.sh script for efficient compilation of the node:

./make.sh

This command compiles the node dependencies and the node itself inside a Docker container. The first run may take some time as it downloads necessary source code and Docker images.

Step 3: Running the Node

  1. After a successful build, find the binaries in ./build/defichain-latest/bin/.

  2. Run the node and connect it to Floppynet with the following command:

./defid -connect=35.187.53.161

The -connect=35.187.53.161 flag connects your local node to a public node maintained by the core developers, initiating synchronization with other nodes in Floppynet.

Step 4: Monitor Synchronization Progress

  1. To see the progress of the syncing, run:

./defi-cli getblockchaininfo

When blocks and headers are equal and verificationprogress is 1, your node is synced.

Step 5: Check Node Logs

  1. To check the logs, navigate to the data folder specific to your OS and open the debug.log inside the devnet/ folder with your preferred text editor.

Step 6: Display Rust Debug Logs

  1. To display the Rust debug logs, first stop the node:

./defi-cli stop
  1. Then start the node with RUST_LOG=debug:

RUST_LOG=debug ./defid

Step 7: Connect Metamask to Floppynet

For detailed steps on how to connect Metamask to Floppynet, refer to this guide.

Conclusion

Running a full node on MetaChain's Floppynet is an excellent way for developers to familiarize themselves with the MetaChain environment. This guide provides a step-by-step approach to setting up a node, from source code retrieval to node synchronization and log checking.

Please Note: Floppynet is in its ALPHA stage and is subject to changes and potential data persistence issues.

Last updated