A zero-knowledge proof system to asses cryptocurrency exchange solvency.
CredibleCoin can be broken into the following core modules:
exchange/
: everything that an exchange needs to be considered as such by our library. This includes a generic exchange interface which all cryptocurrency exchange types need to implementutils/
: a collection of utilities used by the library and some of the binaries.accumulator
: CredibleCoin's accumulator algorithms:uint_typecast
: A set of helper functions to help themerkle_rs
crate accept arbitrary integer types (and soon maybe strongs if needed)binary accumulator
: A binary accumulator module (TODO)
bin
: CredibleCoin's generated CLI/shell binaries:publisher
: The CLI/shell program the publisher (the cryptocurrency exchange itself) uses to answer and recieve queries from the asset keepers (the companies)
cli/
: everything that our CLI's need to function (There are distinct folders for the types and functions each CLI uses)
Stable Rust is all that is needed to build credible-coin
. To build simply run
See Running our binaries
section below for details
To run the test suite, use:
$ cargo test
NOTE: The redis unit test is ignored by default so to run it when connected to the redis server run:
$ cargo test --ignored
Build and open the documentation with:
$ cargo doc --open
$ cargo run --bin publisher [CMD] <ARGS>
$ cargo run --bin exchange [CMD] <ARGS>
Our backemd of choice to store data for all of the system components (exchange private keys, proofs, etc) is Redis for its simplicity
$ brew install redis
We have 2 Redis instances (one for the exchange, and one for the verifier and customer). To run the exchange's Redis instance:
$ redis-server ../credible_coin/redis-conf/redis-exchange.conf
To run the verifier's Redis instance:
$ redis-server ../credible_coin/redis-conf/redis-proof.conf
The exchange instance runs on port 6380 and the proof instance runs oon port 6381.
To connect to the instance using the cli run (in this case this is the exchange instance):
$ redis-cli -p 6380
# NOTE: the argument after the '-p' is the port number the instance should be running on