A Decentralized Storage with the Ethereum Blockchain
- OpenSSL
- readline
- libjson-rpc-cpp
- QuadIron
mkdir build
cd build
CXX=/usr/bin/clang++ cmake -G 'Unix Makefiles' ..
make
The following targets are available:
doc
: build the documentation using Doxygenformat
: fix code source formattinglint
: run the linterfix-lint
: run the linter and try to apply the proposed fixesdcss
: build the DCSS binaryshared
: build the DCSS shared librarystatic
: build the DCSS static libraryunit_tests
: build the unit testscheck
: run the test suite
By default the code coverage is not enabled.
To generate the code coverage reports:
- set the option
ENABLE_COVERAGE
toON
. - recompile with
make
. - run the tests with
make check
. - extract coverage data with
make gcov
. - generate a report with
make lcov
. - open the report in
${CMAKE_BINARY_DIR}/lcov/html/all_targets
.
Note that, even though code coverage is supported by both Clang and GCC, result with GCC seems more reliable (not surprising as we are using gcov).
$ ./dcss -h
usage: dcss
-l path to the logging configuration
-b n_bits
-k Kademlia K parameter
-a Kademlia alpha parameter
-n number of nodes
-c initial number of connections per node
-N number of files
-S random seed
$ ./dcss -n 100 -k 5
initialize files
checking files
file adfa681fd77852ae who was referenced by 30a3d70a3d70a3d4 was not found
1/5000 files wrongly stored
dcss>
In the example above, a replication factor of 5 is not sufficient to guarantee a 100% hit on 100 nodes.
DCSS uses EasyLogging as a logging framework and the loggers can be
configured through a dedicated configuration file (which you can specify by
using the option -l
, if not provided a default configuration will be applied).
DCSS has three loggers that can be configured independently:
- "simulator": logging for the simulated network.
- "ethereum": logging for the Ethereum transactions.
- "DHT": logging for the DHT layer.
For more details on how to configure the loggers, see the official documentation of EasyLogging