GithubHelp home page GithubHelp logo

kii-awesome / bifrost Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bifrost-finance/bifrost

0.0 0.0 0.0 54.63 MB

A parachain focused on building bridges of chains based on PoS consensus.

Home Page: https://bifrost.finance

License: GNU General Public License v3.0

Shell 0.11% JavaScript 0.22% Rust 99.23% Makefile 0.20% Handlebars 0.17% Dockerfile 0.06%

bifrost's Introduction

Bifrost Banner

Bifrost Logo

Welcome,

Bifrost is a Web3 derivatives protocol that provides decentralized cross-chain liquidity for staked assets. By leveraging on the cross-consensus message (XCM) it can provide cross-chain liquid staking services for polkadot relay chains, parachains, and heterogeneous chains bridged with polkadot.

๐Ÿ‘‰ Discover the Bifrost project at bifrost.finance.
๐Ÿ‘‰ Learn to use the Bifrost network with our wiki.

๐Ÿฃ Supported by

Web3 Foundation Grants Substrate Builders Program Web3 Bootcamp

master-build Codacy Badge Substrate Version Docker License Discord Twitter Medium

Get Build Help

make help

Install Rust and required tools

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

Build binary

make build-all-release

Format code

make format

Lint code

make clippy

Testing

make test-all

Generate runtime weights

if runtime logic change we may do the benchmarking to regenerate WeightInfo for dispatch calls

make generate-all-weights

Testing runtime migration

If modify the storage, should test the data migration before production upgrade.

make try-bifrost-runtime-upgrade

Run development chain

make run-dev

Run local testnet with polkadot-launch

Install polkadot-launch

yarn global add polkadot-launch
cd -

Build polkadot

git clone -n https://github.com/paritytech/polkadot.git /tmp/polkadot
cd /tmp/polkadot
git checkout release-v0.9.22
cargo build --release
cd -

Launch Polkadot and the parachain

cd -
polkadot-launch ./scripts/bifrost-launch.json

It will take about 1-2 minutes for the parachain to start producing blocks.

Run local testnet with parachain-launch

Install parachain-launch

yarn global add @open-web3/parachain-launch

Generate docker files

parachain-launch generate --config=scripts/bifrost-docker-launch.yml --yes

It will pull images and generate required docker files in a folder called output in your current working directory

Start relaychain and parachain

To start the nodes, navigate to the output folder that the generated docker scripts in and start containers:

cd ./output
docker-compose up -d --build

Run full node

Create bifrost-fullnode directory, generate node-key and get bifrost.json

mkdir -p ~/node-key
subkey generate-node-key --file ~/node-key/bifrost.key

Start full node

Replace your-fullnode-name

docker pull bifrostnetwork/bifrost:latest
docker run -d \
-v ~/node-key:/node-key \
-p 9944:9944 \
-p 9933:9933 \
-p 30333:30333 \
bifrostnetwork/bifrost:latest \
  --name your-fullnode-name \
  --base-path "/data" \
  --node-key-file "/node-key/bifrost.key" \
  --chain "/spec/bifrost.json" \
  --pruning=archive \
  --rpc-external \
  --ws-external \
  --rpc-cors all \
  --state-cache-size 0 \
  --execution wasm

bifrost's People

Contributors

ark930 avatar dengjianping avatar herryho avatar yrong avatar allenpocketgamer avatar yooml avatar dependabot[bot] avatar lurpis avatar hqwangningbo avatar hsqlu avatar akagi201 avatar chw683 avatar wodlj1314 avatar 0xyancy avatar codacy-badger avatar jerrybaoo 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.