Skip to content

CENNZnet: EVM compatible L2 built on substrate

License

GPL-3.0, LGPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
LGPL-3.0
LICENSE.LESSER
Notifications You must be signed in to change notification settings

cennznet/cennznet

Repository files navigation

CENNZnet Node

license: LGPL v3 ci status badge PRs Welcome

CENNZnet node built on Substrate. For getting started and technical guides, please refer to the CENNZnet Wiki.

Contributing

All PRs are welcome! Please follow our contributing guidelines here.


Community

Join our official CENNZnet Discord server 🤗

  • Get CENNZnet technical support 🛠
  • Meet startups and DApp developers 👯‍♂️
  • Learn more about CENNZnet and blockchain 🙌
  • Get updates on CENNZnet bounties and grants 💰
  • Hear about the latest hackathons, meetups and more 👩‍💻

Join the Discord server by clicking on the badge below!

Support Server

Run with Docker

Use the latest CENNZnet docker image to get started quickly

# Start a local validator on a development chain
$ docker run \
    -p 9933:9933 -p 9944:9944 \
    cennznet/cennznet:latest \
    --dev \
    --unsafe-ws-external \
    --unsafe-rpc-external

9944 is Websocket port, 9933 is the HTTP RPC port. Majority of DApps should use 9944, which is accessible via ws://localhost:9944

Run from Source

Follow the steps to build and run a CENNZnet node from the source code.

1) Set up build environment

For Linux (the example below is for Debian-based machines):

$ sudo apt install -y build-essential clang cmake gcc git libclang-dev libssl-dev pkg-config

For MacOS (via Homebrew):

$ brew install openssl cmake llvm

2) Install Rust

Install Rust on your machine through here, and the following rust version and toolchains.

$ cargo --version
$ rustup install nightly
$ rustup target add --toolchain=nightly wasm32-unknown-unknown

3) Build and Run

Clone the repo, build the binary and run it.

$ git clone https://github.com/cennznet/cennznet.git
$ cd cennznet
$ cargo build --release # or remove  '--release' for quick debug build
$ ./target/release/cennznet --help

# start a validator node for development
$ ./target/release/cennznet --dev

Build Docker Image

Prepare your docker engine, and make sure it is running.

# To use the default image name and tag
$ make 

# To custom your image name and tag
$ IMAGE_NAME='cennznet' IMAGE_TAG='v1.5.1' DOCKER_BUILD_ARGS='--no-cache --quiet' make build

# Without using make
$ docker build --no-cache -t cennznet:v1.5.1 .