vrancurel / dcss

Decentralized Secure Storage with the Ethereum Blockchain
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

DCSS

CircleCI

A Decentralized Storage with the Ethereum Blockchain

Build from source

Install the dependencies

Build

mkdir build
cd build
CXX=/usr/bin/clang++ cmake -G 'Unix Makefiles' ..
make

Targets

The following targets are available:

Code coverage

By default the code coverage is not enabled.

To generate the code coverage reports:

  1. set the option ENABLE_COVERAGE to ON.
  2. recompile with make.
  3. run the tests with make check.
  4. extract coverage data with make gcov.
  5. generate a report with make lcov.
  6. 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).

How to use it:

$ ./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.

Graphical Output of Simulator

Logging configuration

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:

For more details on how to configure the loggers, see the official documentation of EasyLogging