• Stars
    star
    136
  • Rank 267,670 (Top 6 %)
  • Language
    Rust
  • License
    GNU General Publi...
  • Created almost 4 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

EVM compatible chain with NPoS/PoC consensus

Reef Chain

Reef chain is written in Rust. A basic familiarity with Rust tooling is required.

To learn more about Reef chain, please refer to Documentation.

Clone

To clone the repo with its submodules run:

git clone --recursive https://github.com/reef-defi/reef-chain

Rust Setup

If you don’t have Rust already, you can install it with:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

You can install developer tools on Ubuntu 20.04 with:

sudo apt install make clang pkg-config libssl-dev build-essential

You can install the latest Rust toolchain with:

make init

Start a development node

The make run command will launch a temporary node and its state will be discarded after you terminate the process.

make run

Run a persistent single-node chain

Use the following command to build the node without launching it:

make build

This command will start the single-node development chain with persistent state:

./target/release/reef-node --dev

Purge the development chain's state:

./target/release/reef-node purge-chain --dev

Start the development chain with detailed logging:

RUST_LOG=debug RUST_BACKTRACE=1 ./target/release/reef-node -lruntime=debug --dev

Run tests

make test

Run benchmarks

Run runtime benchmark tests:

make bench

Run module benchmark tests:

cargo test -p module-poc --all-features

Run the module benchmarks and generate the weights file:

./target/release/reef-node benchmark \
    --chain=dev \
    --steps=50 \
    --repeat=20 \
    --pallet=module_poc \
    --extrinsic='*'  \
    --execution=wasm \
    --wasm-execution=compiled \
    --heap-pages=4096 \
    --output=./modules/poc/src/weights.rs

Run in debugger

make debug

Embedded docs

Once the project has been built, the following command can be used to explore all parameters and subcommands:

./target/release/reef-node -h

Release builds

To list all available release builds run:

git tag

To create a corresponding production build, first checkout the tag:

git checkout testnet-1

Then run this command to install appropriate compiler version and produce a binary.

make release

On-Chain upgrade builds

Build the wasm runtime with:

make wasm

Fork reef-chain

You can create a fork of a live chain (testnet / mainnet) for development purposes.

  1. Build binary and sync with target chain on localhost defaults. You will need to use unsafe rpc.
  2. Execute the Make command ensuring to specify chain name (testnet / mainnet).
make chain=testnet fork
  1. Now run a forked chain:
cd fork/data
./binary --chain fork.json --alice

More Repositories

1

reef-client

The Reef Dapp
TypeScript
23
star
2

reef-explorer

Reefscan block explorer
TypeScript
20
star
3

browser-extension

Simple browser extension for managing accounts in a browser and allowing the signing of extrinsics using these accounts. Also provides a simple interface for compliant extensions for dapps.
TypeScript
13
star
4

reef-docs

Reef chain documentation
SCSS
11
star
5

hardhat-reef-examples

Reef Hardhat examples
Solidity
9
star
6

hardhat-reef

Hardhat Reef plugin for interacting with contracts on the Reef chain
TypeScript
9
star
7

reef-mobile-app_moved

Dart
9
star
8

reefswap-ui

TypeScript
7
star
9

minimal-ui-example_moved

Very basic example to interact with Reef Chain
HTML
6
star
10

reef-react-lib_moved

TypeScript
5
star
11

evm-provider.js

web3 provider for interacting with Reef chain and EVM
TypeScript
5
star
12

reefswap

Reefswap is a DEX on the Reef chain.
Jupyter Notebook
5
star
13

reef-app_moved

TypeScript
4
star
14

reef-util-lib_moved

TypeScript
4
star
15

ui-examples

Basic browser and framework agnostic UI components/examples for creating apps on the Reef Chain.
TypeScript
4
star
16

py-reef-interface

Reef chain Python library
Python
4
star
17

reef-chain-test

Reef Integration Test Suite
Python
3
star
18

reef-ui-kit_moved

TypeScript
3
star
19

reef-finance-bounties

3
star
20

reef-remix-plugin

TypeScript
2
star
21

reef.js

Libraries for interacting with the Reef Chain
TypeScript
2
star
22

ledger-reef

Reef app for Ledger Nano S and X
C
2
star
23

reef-subsquid-processor_moved

Reef processor for subsquid.io
TypeScript
2
star
24

evm-canvas-ui

Deploy or interact with the contracts on the Reef chain EVM through Canvas UI
TypeScript
1
star
25

polkawallet_plugin_reef

TypeScript
1
star
26

hardhat-reef-chain

TypeScript
1
star
27

squid-reef-example_moved

TypeScript
1
star
28

reef-remix

JavaScript
1
star
29

reef-merger

Combine solidity contract in one source file
Solidity
1
star
30

hardhat-reef-template

JavaScript
1
star