Comment on page

Local Development Network Setup

This guide walks through how to deploy a local blockchain instance for software development and testing purposes. Alternatively, developers can also develop and test on Anvil Testnet.

1. Prerequisites

i) Install Golang

Tips for Linux (Ubuntu)
#first command needs to be run as root, rest as your normal user
sudo su
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz
#exit root now
#add to path. For more permanent you should add this line to bottom of your ~/.profile
export PATH=$PATH:/usr/local/go/bin
#check go version
go version

ii) Install Rust

If already installed, please update to 1.59 or newer
rustup update

iii) Install System Specific Dependencies

sudo apt update && \
sudo apt upgrade -y && \
sudo apt install -y build-essential libleveldb-dev libssl-dev pkg-config clang libclang-dev librocksdb-dev
brew install openssl leveldb

2. Build Required Binaries

Findora blockchain can run on both MacOS or Linux. The commands below will build all required binaries to start a local Findora blockchain.
git clone -b v0.3.19-release &&
cd platform &&
make build_release
Please make sure to add all below 3 binaries to your $PATH. By default, they will be copied to ~/.cargo/bin/ which should already be in your $PATH.
  • stt: The tool to initialize Findora blockchain.
  • abcid: Findora core protocol.
  • tendermint: Tendermint consensus engine.

3. Install Python3 and toml-cli

Findora devnet tools are written in Python3 and use toml-cli to manipulate configuration files. Install Python3 if not already installed. Also, install toml-cli using the command below:
pip3 install toml-cli
and then copy newly installed toml cli tool to /usr/local/bin to make it visible
cp /Library/Python/3.x/site-packages/toml /usr/local/bin

4. Run Devnet

Inside your platform directory, execute make devnet in the terminal.

i) What's in devnet?

The validator
The fullnode
The key pair that holds FRA

ii) How to control devnet?

The local blockchain can be stopped and restarted anytime during development and tests.
  • Stop Blockchain: ./tools/devnet/
  • Restart Blockchain: ./tools/devnet/
  • Start Over: make devnet again.

5. Devnet URLs and Ports

connects to Web3 HTTP
connects to Web3 WebSocket

6. Troubleshoot

  • Problem 1
    • Error Message:
      • make build_release fails with go:linkname must refer to declared function or variable
  • Solution
    • Update your
      # go to platform/tools/tendermint run following to update
      go get -u

  • Problem 2
    • .findora file is missing
  • Solution
    • manually add .findora to your home directory (i.e. directory ~)