COMIT is an open protocol facilitating trustless cross-blockchain applications. This is a reference implementation for the COMIT protocol.
The repository contains two main folders: vendor
and application
.
Contains crates that provide general functionality that is not specific to the domain of atomic swaps.
Crates defined in here MUST NOT depend on crates in application
.
They may be separated from the repository at some point (and possibly released on crates.io).
Contains crates specific to our application. Can depend on libraries located in vendor
.
- Install
rustup
:curl https://sh.rustup.rs -sSf | sh
- Install libzmq:
- Ubuntu/Debian:
apt install libzmq3-dev
- Mac (Homebrew)
brew install zeromq
- Ubuntu/Debian:
- Install OpenSSL:
- Ubuntu/Debian:
apt install libssl-dev pkg-config
- Ubuntu/Debian:
cargo build
- Put a
default.toml
config file into~/.config/comit_node
or pass--config <config_path>
with<config_path>
as the folder path to where thedefault.toml
is located. - Put a
default.toml
config file into~/.config/btsieve
or setBTSIEVE_CONFIG_PATH
as folder path to where thedefault.toml
is located - startup bitcoin node (port to be set according to btsieve configuration)
- startup ethereum node (port to be set according to btsieve configuration)
- startup btsieve:
cargo run --bin btsieve
- startup comit_node:
cargo run --bin comit_node
If the [web_gui]
section is specified in the configuration the current release of the user interface comit-i will be served once the comit node started up (served at localhost:8080
as default).
In order to do a swap you will have to start two comit nodes.
- Install
docker
&docker-compose
- Install
node
(check the version required in package.json) &yarn
- Install Rust
nightly-2019-04-30
:rustup install nightly-2019-04-30
(this one is only used forrustfmt
) - Install
rustfmt
fornightly-2019-04-30
:rustup component add rustfmt --toolchain nightly-2019-04-30
- Install
cargo-make
:cargo install cargo-make
- Run
cargo make
in the root folder of the repository, this will install various crates & tools such as clippy
cargo make
runs the whole test suite including integration tests but not end-to-end.cargo make all
also runs the whole test suite, including end-to-end tests.cargo make format
to format Rust codecargo make ts-format
to format Typescript codecargo make btsieve
to run btsieve testscargo make dry
to run COMIT node dry testscargo make api
to run all API testscargo make e2e
to run COMIT node end-to-end testscargo make e2e *btc*
to run COMIT node end-to-end tests withbtc
in the folder name (supports shell glob)
Contributions are welcome, please visit CONTRIBUTING for more details.
This project is licensed under the terms of the GNU GENERAL PUBLIC LICENSE v3.