GithubHelp home page GithubHelp logo

arsulegai / comit-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from comit-network/comit-rs

0.0 1.0 0.0 5.26 MB

Reference implementation of COMIT, an open protocol facilitating trustless cross-blockchain applications.

License: GNU General Public License v3.0

Shell 0.10% TypeScript 24.50% Rust 75.37% Dockerfile 0.03%

comit-rs's Introduction

COMIT-rs

CircleCI

COMIT is an open protocol facilitating trustless cross-blockchain applications. This is a reference implementation for the COMIT protocol.

WARNING - We do not recommend running COMIT on mainnet for now!!!

Structure

The repository contains two main folders: vendor and application.

Vendor

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).

Application

Contains crates specific to our application. Can depend on libraries located in vendor.

Setup build environment

  1. Install rustup: curl https://sh.rustup.rs -sSf | sh
  2. Install libzmq:
    • Ubuntu/Debian: apt install libzmq3-dev
    • Mac (Homebrew) brew install zeromq
  3. Install OpenSSL:
    • Ubuntu/Debian: apt install libssl-dev pkg-config

Build & Run

  1. cargo build
  2. Put a default.toml config file into ~/.config/comit_node or pass --config <config_path> with <config_path> as the folder path to where the default.toml is located.
  3. Put a default.toml config file into ~/.config/btsieve or set BTSIEVE_CONFIG_PATH as folder path to where the default.toml is located
  4. startup bitcoin node (port to be set according to btsieve configuration)
  5. startup ethereum node (port to be set according to btsieve configuration)
  6. startup btsieve: cargo run --bin btsieve
  7. 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.

Setup testing/dev environment

  1. Install docker & docker-compose
  2. Install node (check the version required in package.json) & yarn
  3. Install Rust nightly-2019-04-30: rustup install nightly-2019-04-30 (this one is only used for rustfmt)
  4. Install rustfmt for nightly-2019-04-30: rustup component add rustfmt --toolchain nightly-2019-04-30
  5. Install cargo-make: cargo install cargo-make
  6. Run cargo make in the root folder of the repository, this will install various crates & tools such as clippy

Testing

  • 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 code
  • cargo make ts-format to format Typescript code
  • cargo make btsieve to run btsieve tests
  • cargo make dry to run COMIT node dry tests
  • cargo make api to run all API tests
  • cargo make e2e to run COMIT node end-to-end tests
  • cargo make e2e *btc* to run COMIT node end-to-end tests with btc in the folder name (supports shell glob)

Contributing

Contributions are welcome, please visit CONTRIBUTING for more details.

License

This project is licensed under the terms of the GNU GENERAL PUBLIC LICENSE v3.

comit-rs's People

Contributors

bonomat avatar d4nte avatar da-kami avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar elpiel avatar llfourn avatar luckysori avatar mergify[bot] avatar rex4539 avatar tcharding avatar thomaseizinger avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.