Giter VIP home page Giter VIP logo

bifrost-clients's Introduction

interBTC Clients

interBTC Clients

Faucet, Oracle & Vault / Relayer

This project is currently under active development.

Getting started

Prerequisites

curl https://sh.rustup.rs -sSf | sh

Please also install the following dependencies:

  • cmake
  • clang (>=10.0.0)
  • clang-dev
  • libc6-dev
  • libssl-dev
  • pkg-config (on Ubuntu)

Installation

Faucet

The testnet may use a faucet to allow users and vaults to self-fund up to a daily limit.

To start the Faucet follow the instructions contained in the Faucet README.

Oracle

The interBTC bridge requires a price oracle to calculate collateralization rates, for local development we can run this client to automatically update the exchange rate at a pre-determined time interval.

To start the Oracle follow the instructions contained in the Oracle README.

Vault

The Vault client is used to intermediate assets between Bitcoin and the BTC Parachain. It is also capable of submitting Bitcoin block headers to the BTC Parachain.

To start the Vault follow the instructions contained in the Vault README.

Development

Building requires a specific rust toolchain and nightly compiler version. The requirements are specified in the ./rust-toolchain.toml override file.

Running rustup show from the root directory of this repo should be enough to set up the toolchain and you can inspect the output to verify that it matches the version specified in the override file.

Use the following command to fetch the newest metadata from a live chain:

curl -sX POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"state_getMetadata", "id": 1}' localhost:9933 | jq .result | cut -d '"' -f 2 | xxd -r -p > runtime/metadata.scale

To build, one of the following mutually-exclusive features must be specified:

  • parachain-metadata-interlay
  • parachain-metadata-kintsugi

The default command for building the clients, assuming a Kintsugi chain, is:

cargo run --features=parachain-metadata-kintsugi --bin runner -- --parachain-ws 'ws://localhost:9944'   --vault-config-file args.txt

Troubleshooting

Too many open files

On cargo test the embedded parachain node in the integration tests can consume a lot of resources. Currently the best workaround is to increase the resource limits of the current user.

Use ulimit -a to list the current resource limits. To increase the maximum number of files set ulimit -n 4096 or some other reasonable limit.

bifrost-clients's People

Contributors

gregdhill avatar sander2 avatar daniel-savu avatar nud3l avatar ns212 avatar theodorebugnet avatar nakul1010 avatar dependabot[bot] avatar thecodingrobot avatar criadoperez avatar lederstrumpf avatar claudiociardelli avatar spazcoin 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.