Measuring Shielded Adoption

Hello,

For now we have been using blocksci. The initial setup takes quite some time and is not straight forward. Other folks have just used big query depending on their requirements.

Below is a fairly standard approach/configs you will need:

  1. Building Blocksci:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt install cmake libtool autoconf libboost-filesystem-dev libboost-iostreams-dev \
libboost-serialization-dev libboost-thread-dev libboost-test-dev  libssl-dev libjsoncpp-dev \
libcurl4-openssl-dev libjsoncpp-dev libjsonrpccpp-dev libsnappy-dev zlib1g-dev libbz2-dev \
liblz4-dev libzstd-dev libjemalloc-dev libsparsehash-dev python3-dev python3-pip
git clone git@github.com:cryptolu/BlockSci.git
cd BlockSci
mkdir release
cd release
CC=gcc-7 CXX=g++-7 cmake -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
cd ..
CC=gcc-7 CXX=g++-7 sudo -H pip3 install -e blockscipy

This setup will likely vary depending on your system. This was tested on Ubuntu 18.04 and 20.04.

  1. Ensure the given zcash.conf has atleast these two params:
txindex=1
insightexplorer=1

Important note: this will increase the expected chain size on disk compared to a default zcash.conf and this chain needs to be ran with nodes matching the above config only to avoid reindexing.

  1. Start zcashd and ensure the node is on current height of the given chain
  2. While zcashd is still running, issue the following in another terminal to use values in your zcash.conf
blocksci_parser --output-directory zcash-data update --max-block -100 rpc --username your-rpc-username --password your-rpc-password --address 127.0.0.1 --port 8232

This will take a long time (8+hours) to create the folder called zcash-data, but once you have that archive for the chain you can re run blocksci_parser as needed to quickly update zcash-data

  1. Code examples above using blocksci module can query the zcash-data as needed to get metrics
    Outputs aggregated metrics from the Zcash blockchain ยท GitHub

Depending on your requirements, this tool can be ideal for off-chain metrics rather than on-chain metrics.

6 Likes