TrueBlocks allows you to build local-first, fully-decentralized applications using data directly from an Ethereum node. It does this through two mechanisms:
- A lightning-fast index of every appearance of every addresses on the chain, and
- A binary cache of only the data your application extracts.
Local-first means your application is private by default, the client-side cache means your application is fast, and extraction-on-demand means your application will remain minimal.
Before building TrueBlocks, you need to make sure you have git, cmake, clang-format, and go available.
Follow these instructions for installing golang on your system.
Complete these commands to install git, cmake, and clang-format:
sudo apt install build-essential git cmake python python-dev libcurl3-dev clang-format jq
brew install cmake
brew install git
brew install clang-format
brew install jq
Currently, you must build TrueBlocks from source:
git clone git@github.com:TrueBlocks/trueblocks-core.git
cd trueblocks-core
mkdir build && cd build
cmake ../src
make
This will create a series of executables in the ./bin folder at the top of the repo. The following instructions assume you've added this folder to your $PATH.
Does TrueBlocks Work on Windows?
After building TrueBlocks, you may test your configuration with this command:
chifra --version
For a complete list of available commands, run this command:
chifra --help
Next, let's see if you can get a block from your Ethereum node. Enter this command:
chifra blocks 1000
This should return valid JSON data for block 1,000 (type getBlock --help for more options on this tool.) If you get an error, such as this:
Warning: The Ethereum RPC: 'http://localhost:8545' was not found. Quitting...
You need to edit the file ~/.quickBlocks/quickBlocks.toml to provide the URL of an available Ethereum RPC provider. Enter this text (adding the settings sections if it's not present):
[settings]
rpcProvider="<url-to-your-rpc-provider>
Once you get chifra blocks to return JSON data, you are ready to test your installtion. While optional, one of the tools (ethslurp) requires an Etherscan key. Get an EtherScan API key now, then run:
make tests
The chifra tool is the basis for everything related to TrueBlocks. (chifra is derived from the Arabic word for chipher.) It helps you decipher chain data.
Please see information about our work flow before proceeding.
- Fork this repository into your own repo.
- Create a branch:
git checkout -b <branch_name>. - Make changes and commit them:
git commit -m '<commit_message>' - Push to the original branch:
git push origin TrueBlocks/trueblocks-core - Create the pull request.
Thanks to the following people who have contributed to this project:
If you have specific requests, contact us here info@quickblocks.io.
This project licensed under the Apache License Version 2.0.