Building the Ledger
Prerequisites
- Go 1.17+ (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:
Then select the particular tag version you want to build, ie:
Then build the code with the command:
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:
This will install the binaries in the directory specified by your $GOBIN
environment variable (default to ~/go/bin
).
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 install
failed 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:
and reload it with:
You can also verify that you are running the correct 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: