Install TrueBlocks core
TrueBlocks runs on Linux and Mac. We do not support Windows
These instructions assume you can navigate the command line and edit configuration files. If you need help with a particular step, see the installation’s troubleshooting section.
- Update GoLang installation
- If your version is less than 1.16, install Go
Check other build dependancies or install
Clone the repo and compile from the codebase.
While TrueBlocks is still alpha, use the
developbranch (we hope to release beta by January, 2022).
git clone -b develop https://github.com/trueblocks/trueblocks-core cd trueblocks-core git checkout develop 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.16.x or later. If you to install or update Go, see here.
How do I install packages on the command line?
sudo apt install build-essential git cmake ninja-build python python-dev libcurl3-dev clang-format jq
For best results, we recommend running MacOS Big Sur or later.
brew install cmake ninja 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…
Where is the configuration?
Where your configuration folder is depends on your operating system and environment.
XDG_CONFIG_HOMEis set, your configuration is there
- Otherwise, on Linux:
- Otherwise, on Mac:
- Otherwise, you’re out of luck–we only support Linux and Mac
The primary or base configuration file (
trueBlocks.toml) must exist at one
of the above locations for
chifra to work.
With the recent addition of support for multi-chain, there has arisen the need
for per-chain configuration as well (for example, values such as
remoteExplorer are unique per chain).
This issue is discussed here TODO: PLACE_HOLDER.
How do I specify an RPC endpoint?
By default, TrueBlocks looks for the RPC at
If you are using a remote RPC such as Infura or your own local RPC at a different port, you will need to modify that value.
As is true of all configuration values, you coudl use an environment
variable as described above, but you may also edit
The format of that file is documented TODO: PLACE_HOLDER.
How do I add a EtherScan key?
Some small part of TrueBlocks requires an EtherScan API key. In particular
this is the
--articulate option. We are working
hard to remove this centralized dependency, but in the mean time you
may get a warning of a missing key.
Here’s an example of a remote RPC for Infura and an EtherScan API key. Warning: see the note below
[settings] default_chain=mainnet etherscan_key = "<key_value>" [mainnet] rpcProvider = "https://mainnet.infura.io/v3/<key_value>"
Note: Until mutli-chain is fully supported, put the
Note: The EtherScan key is not per-chain.
Why do I need the index of appearances?
If you’re only querying basic block or transaction data, you don’t really need the index of appearances.
However, most of our users with to explore the entire history of their own addresses. If you wish to do that, you will need the index.
There are multiple options for getting the index, which the How Can I Get the Index? article covers in more detail.
No matter which method you use, downloading or creating the index will take somewhere between a few minutes and a day or two. So you might want to play around with some chifra blockchain commands first.
What if my node doesn’t have tracing or archiving?
If the node you’re running does not support OpenEthereum style tracing or it is not an archive node, you may get an error telling you such.
--accounting requires historical balances. The RPC server does not have them. Quitting...
You may disable this warning by editing a configuration file. Find the file
blockScrape.toml in your configuration folder (in a multi-chain environment
this will be in the chain-specific config file, otherwise at the top level).
Add the following setting to the file (which you may create if it doesn’t exist):
[requires] tracing = false archive = false