COMIT is an open protocol facilitating trustless cross-blockchain applications. This is a reference implementation for the COMIT protocol.
- Extensive testing on mainnet from our side still remains to be done
- Several features for achieving production-ready robustness are still under works
- Once we consider comit-rs production ready, we will release version 1.0.0
This repository is a cargo workspace:
- Crates at the top level are where the main work happens. Consult the respective
Cargo.toml
for a description of what they do. - Crates inside the internal folder are considered to be private to this repository. They are used for sharing code between other crates in this repository. There is an ongoing effort to get rid of these crates because path dependencies block us from releasing any of the other crates to crates.io.
libp2p-comit
: implementation of the comit messaging protocol on top of libp2p
All you need is love rust: curl https://sh.rustup.rs -sSf | sh
make install
- startup bitcoin node with
-regtest
and-rest
- startup ethereum node with JSON-RPC interface exposed at
localhost:8545
- startup cnd:
cnd
(or./target/release/cnd
if you do not have the~/.cargo/bin
folder in your$PATH
)
Keep in mind that in order to do a swap locally you will need to start two instances of cnd.
Please see cnd --help
for help with command line options.
- Install
docker
- Install
node
(check the version required in api_tests/package.json) &yarn
- Run
make
in the root folder of the repository, this will install various crates & tools such as clippy
make test
is just a wrapper aroundcargo test --all
make e2e
will run all the end-to-end tests
To run individual end-to-end tests, use yarn
inside the api_tests
folder:
yarn run test
: run all testsyarn run test <directory>
: run all tests in the directoryyarn run test <path to test file>
: run all tests in this test file, supports shell glob on the pathyarn run fix
: run prettier and linter to fix formatyarn run check
: run tsc (to check validity of TypeScript code) and verify format
Contributions are welcome, please visit CONTRIBUTING for more details.
If you have any question please reach out to the team in our Gitter chat!
This project is licensed under the terms of the GNU GENERAL PUBLIC LICENSE v3.