Skip to content



Folders and files

Last commit message
Last commit date

Latest commit



52 Commits

Repository files navigation


Build Status


For the time being the goal of ChainX is to build a corss-chain digital asset management platform on the strength of substrate which is next-generation framework for blockchain created by paritytech. The long-term vision of ChainX is to evolve as a general blockchain infrastrcutre platform.

ChainX is still at a very early stage and in an active development. The instruction as followed is not stable and may change in the future.

🎉 Run this command to connect to our public testnet:

$ chainx --chainspec=multi --telemetry --bootnodes=/ip4/ --db-path=/tmp/chainx


Building from source


Ensure you have Rust and the support software installed:


$ curl -sSf | sh
$ rustup update nightly
$ rustup target add wasm32-unknown-unknown --toolchain nightly
$ rustup update stable
$ cargo install --git
$ sudo apt install cmake pkg-config libssl-dev git

Build the code

# Get the source code
$ git clone ~/ChainX
$ cd ~/ChainX

# Build all native code, the executable binary will be present in target/debug/chainx.
$ cargo build

# If your want to run chainx in production, please build it in release mode
$ cargo build --release


When you succeed to build the project with cargo build, the chainx binary should be present in target/debug/chainx.

We assume chainx is in your $PATH in the following sections. Run this command so that chainx could be found in $PATH:

$ export PATH=$(pwd)/target/debug:$PATH

See all the avaliable options and commands via chainx -h.

Validator node

Local single validator

You can run a simple single-node development network on your machine by running in a terminal:

$ RUST_LOG=info chainx --chainspec=dev --db-path=/tmp/dev-alice validator --auth=alice

Don't forget to run with RUST_LOG=info to see the logs, or you prefer to export RUST_LOG=info to avoid specifying every time.

$ export RUST_LOG=info

Local two validator node

Run the first node:

$ chainx --chainspec=local --db-path=/tmp/local-alice validator --auth=alice
INFO 2018-09-11T05:09:59Z: chainx: Chainspec is local mode
INFO 2018-09-11T05:09:59Z: substrate_client::client: Initialising Genesis block/state (state: 0x1529…4159, header-hash: 0xbcf4…9a00)
INFO 2018-09-11T05:09:59Z: substrate_network_libp2p::service: Local node address is: /ip4/
INFO 2018-09-11T05:10:00Z: chainx: Auth is alice

Run the second node with option bootnodes from the address of first node:

$ chainx --chainspec=local --db-path=/tmp/local-bob --bootnodes=/ip4/ validator --auth=bob

Multiple validator node

Run the first node:

$ chainx --chainspec=multi --db-path=/tmp/multi-alice validator --auth=alice

Run the second node:

$ chainx --chainspec=multi --db-path=/tmp/multi-bob --bootnodes=/ip4/ validator --auth=bob

Run the third node:

$ chainx --chainspec=multi --db-path=/tmp/multi-gavin --bootnodes=/ip4/ validator --auth=gavin

These nodes won't be able to produce blocks until the number of validators is no less than 3.

We can add one more validator:

$ chainx --chainspec=multi --db-path=/tmp/multi-satoshi --bootnodes=/ip4/ validator --auth=satoshi

Sync node

Public testnet

Run the following command to connect to our public testnet:

$ chainx --chainspec=multi --telemetry --bootnodes=/ip4/ --db-path=/tmp/chainx


Running chainx without validator subcommand is to synchronise to the chain, e.g., synchronise to a node in local mode:

$ chainx --chainspec=local --db-path=/tmp/local-sync --bootnodes=/ip4/


GPL v3


No description, website, or topics provided.







No releases published


No packages published


  • Rust 99.7%
  • Shell 0.3%