Building the Ledger
Prerequisites
- Go 1.18+ (installation instructions available here)
- Packages:
make,gcc(on Ubuntu, install them withsudo apt-get update && sudo apt-get install -y make gcc)
Building the code
Download the latest released version from github and build the project using the following commands:
git clone https://github.com/fetchai/fetchd.git && cd fetchd
Then build the code with the command:
make build
This will generate the ./build/fetchd binary.
For non-developer users we recommend that the user installs the binaries into their system. This can be done with the following command:
make install
This will install the binaries in the directory specified by your $GOBIN environment variable (default to ~/go/bin).
which fetchd
This should return a path such as ~/go/bin/fetchd (might be different depending on your actual go installation).
If you get no output, or an error such as
which: no fetchd in ..., possible cause can either be thatmake installfailed with some errors or that your go binary folder (default: ~/go/bin) is not in yourPATH.To add the ~/go/bin folder to your PATH, add this line at the end of your ~/.bashrc:
export PATH=$PATH:~/go/binand reload it with:
source ~/.bashrc
You can also verify that you are running the correct version
fetchd version
This should print a version number that must be compatible with the network you're connecting to (see the network page for the list of supported versions per network).
FAQ
- Error: failed to parse log level (main:info,state:info,:error): Unknown Level String: 'main:info,state:info,:error', defaulting to NoLevel
This means you had a pre-stargate version of fetchd (<= v0.7.x), and just installed a stargate version (>= v0.8.x), you'll need to remove the previous configuration files with:
rm ~/.fetchd/config/app.toml ~/.fetchd/config/config.toml