Skip to content

Instantly share code, notes, and snippets.

Last active May 5, 2020 08:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
How to run the BCHN vs ABC benchmarks quick and dirty guide

Quick and Dirty Guide to Running the ABC vs BCHN Mining Benchmarks

This is in reference to the results published here:

The benchmarks were thrown together quickly for me to characterize our progress. As such, these instructions are for advanced users. I am posting these instructions in the interests of transparency and so you can "see for yourself". These instructions assume Linux or OSX and do not work on Windows, as far as I know.

Requires: python3, cmake, ninja, boost, and libbdbdev. I forget what these are called on Linux packages -- consult our docs about how to build and requirements.

  1. Clone my BCHN repo:
    $ git clone -b lgbt_bench
    $ cd bitcoin-cash-node && mkdir build
  2. Run cmake. You may need to adjust these options:
    $ cd build
  3. If the above works ok, build with ninja. If it doesn't, figure out why (likely boost or berkeley db libs are not found).
    $ ninja

How to run the test against BCHN:

The below will run the basic getblocktemplate test versus your BCHN node that you just built, using a regtest network. Run this while still in the build/ directory you created above and built the node in.

$ test/functional/ bchn-bench-gbtl

It will run for a while and mention some .xml log file it created. You need to read this log file to see the results of the test. It's usually in a directory of the form: test/tmp/bitcoin_test_runner_YYYYMMDD_HHmmSS. View this file and see the bench timing.

How to run the test against ABC:

  1. Obtain bitcoin-abc binaries from somewhere, say
  2. Unpack the archive somewhere and remember the path to their bitcoind
  3. Run the above test, but this time specifying their BITCOIND as an env var:
$ BITCOIND=/path/to/abc/bitcoind test/functional/ bchn-bench-gbtl
  1. Do the same as the previous section -- find where the log file got put (its path will be printed on the console), and examine the numbers in the file.

Questions? Comments? /u/NilacTheGrim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment