1. Install TrueBlocks
TrueBlocks runs on Linux and Mac. There is no official Windows support. Some users have had success using WSL─you're on your own!
These instructions assume you can navigate directories with the command line and edit configuration files. If you need help with a step, see the installation’s troubleshooting section.
- ☑ Install the latest version of Go.
- ☑ Install the other dependencies with your command line:
Compile from the codebase
git clone -b develop https://github.com/trueblocks/trueblocks-core cd trueblocks-core mkdir build && cd build cmake ../src make
(You may use
make -j nprocto parallelize the build.)
trueblocks-core/binto your shell PATH.
Find your TrueBlocks configuration directory. It should be in one of these places:
- On linux at
- On mac at
- If you’ve configured it, wherever the location of
- On linux at
In the configuration directory, edit
trueblocks.tomlto add your RPC and API keys. It should look something like this:
[settings] rpcProvider = "<url-to-rpc-endpoint>"
Test a command!
chifra blocks 12345
- To make deep data queries, get the index
- To explore the data visually, install the explorer application.
Here are some problems users have run into at each step. If you’re still having trouble, create an issue, or ask us on discord.
How do I check my Go version?
Run this command
TrueBlocks needs version 1.12.x or later.
How do I install packages on the command line?
sudo apt install build-essential git cmake python python-dev libcurl3-dev clang-format jq
For best results, we recommend running MacOS Big Sur or later.
brew install cmake brew install git brew install clang-format brew install jq
How many cores can I use to make TrueBlocks?
When you run
make, you can speed up the build by parallelizing with
make -j <ncores>
<ncores> represents the number of cores to devote to the job.
How many cores can you use? That depends on many factors. A handy tool is
which identifies the machine’s number of available processing units.
If you have
nproc installed, you can safely parallelize the build with this command
make -j `nproc`
How do I know if compilation was successful?
trueblocks-core directory, test your install with this command:
You should get a version string similar to this:
If nothing outputs, the build has failed. Try repeating the instructions. If it still fails, make an issue.
How do I export to PATH?
chifra only works if its underlying tools are found in your
To find the full path, run this from the top of the
cd bin && pwd && cd -
Add the result of that command to your shell’s
How you do that depends on your system.
In Bash, you’re probably going to put something like this in your
If you are confused, a Google search may be in order…
How do I add my local RPC?
By default, TrueBlocks checks for an RPC on
If you are running a local node on a different port, simply change the port.
How do I add external RPCs and etherscan?
If you are using an external RPC, you to need add its endpoint.
Similarly, for deep exploration of ABI data, some tool interfaces have an
articulate option requires an EtherScan API key.
We are working on removing this centralized dependency.
In your config file, the specific RPC path will differ depending on the service.
Here’s an example for Infura and EtherScan, with <key_value> being replaced by a hash string.
[settings] rpcProvider = "https://mainnet.infura.io/v3/<key_value>" etherscan_key = "<key_value>"
Why should I get an index?
When you query basic transaction data, you don’t need an index. However, most people want to explore entire histories of addresses, calls, and traces. Doing that requires an index.
There are multiple options, which the How Can I Get the Index? article covers in more detail.
No matter what method, getting the index will take somewhere between 10 minutes and a few days. So you might want to play around with some chifra blockchain commands first.
What if my node doesn’t have tracing or archiving?
If you don’t have a node with tracing or archiving, you might get an error when you run some chifra commands. Something like
--accounting requires historical balances. The RPC server does not have them. Quitting...
TrueBlocks lets you disable these checks.
To disable, make a file in your TrueBlocks config directory called
Add the following settings:
[requires] tracing = false archive = false