Currently b_verify is in development and is not ready for production use.
-
Java Version 9 and a Java IDE. Download and install Java Version 9 from Oracle. One good Java IDE is Eclipse
-
Maven. Maven is used to manage builds and dependencies. Can be installed on from the maven website, or on Mac OSx using
brew install maven
and on Linux usingapt-get install maven
. -
Bitcoin. Download and install the official Bitcoin command line client by following these instructions from the Core Developers. The Bitcoin client comes in two pieces -
bitcoind
which is a daemon that syncs with the network and verifies the chain andbitcoin-cli
which you can use to interact with the blockchain. Take a loot at the btc-scripts/README.md for more notes on this. There is also a Bitcoin GUIbitcoin-qt
that can be downloaded. Note that currently b_verify development uses Bitcoin only in regtest mode, so there is no need to download and verify the entire blockchain. To use b_verify trustlessly you will need to download and verify the entire chain 150+gb chain, but once that is done it completely fine to throw old blocks away and run a pruned node that only takes up a few gb of space. -
Google Protobuf. Download and install google protobuf. This is used in b_verify to handle serialization of messages that is efficient and language agnostic. b_verify only defines a message format and Google Protobuf creates code to serialize and deserialize the data.
-
Fastsig. This is an implementation of the history tree datastructure that has been adapted for b_verify. The source code is located here. Clone the repo to a separate folder.
-
jq. One of the testing libraries uses jq - a json command line parses. This can be installed on OSx with
brew install jq
and on Linux withapt-get install jq
.
The building and testing of b_verify is managed by Maven.
-
First you need to install fastsig - the b_verify data structure dependency library. Go into the folder where you have copied the source code and execute the build script
$ sh build.sh
This script will generate the serialization code using google protobuf and install the fastsig library as a dependency using Maven. This script also runs the unit tests for the library and fails the build if any of the tests fail. -
Next in the main project folder run
$ sh setup-bverify.sh
This should configure the environment and install b_verify using Maven. It also runs all unit tests and fails the build if any of the tests fail. You can also re-run any tests by typing$ mvn test
To clean, recompile, test and install run
$ mvn clean install
The various proofs used by b_verify are in their own package and can be ported to any language
There are unit tests written in JUnit for the proofs and for the general system. Integration tests are coming soon.
Benchmarking code for determining the sizes of different objects (e.g. proofs) are in the Benchmarking source folder. There is also benchmarking code for testing throughput. Because of the nature of this code it is in a separate repo called bverify_benchmarking. Throughput benchmarks should be run as stand alone code. All benchmarking results are stored in the analysis folder. The Java benchmarking source code generates CSV output files which are stored in the anaylsis/benchmarking folder. Additionally there are python scripts to analyze the benchmarking results and visualize the data in the analysis/datavisscripts folder.