โ๏ธ To avoid distractions and move quickly, we make the hard choice of developing ChainX in a private codebase. Once it's been fully tested and audited with great care, we'll put it public again. Stay tuned!
For the time being the goal of ChainX is to build a cross-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.
-
Built-in light client of existing blockchains.
-
Built-in Coin DEX.
-
Progressive staking and election machanism.
-
And more.
ChainX 1.0 will operate as an independent chain at the very beginning, supporting the Coin DEX between the system currency PCX and BTC powed by BTC cross-chain transaction from the relay. At this stage, ChainX will continue to relay BCH, LTC, ZEC, ETH, DAI, ERC20, ERC721, ADA, EOS and other chains for Coin DEX.
ChainX 2.0 will begin at Q3 2019 when Polkadot releases v1. It will connect into Polkadot and transform into a para-chain, adding new applications such as decentralized stable currency collateralized by BTC and derivatives exchanges.
ChainX 3.0 will begin at 2020 when Polkadot releases v2, splited into a multi-chain architecture operating as Polkadot's level 2 relay network.
Refer to Hacking on Substrate as well.
Ensure you have Rust and the support software installed:
$ curl https://sh.rustup.rs -sSf | sh
$ rustup update nightly
$ rustup target add wasm32-unknown-unknown --toolchain nightly
$ rustup update stable
$ cargo install --git https://github.com/alexcrichton/wasm-gc
Ubuntu:
$ sudo apt install cmake pkg-config libssl-dev git
Mac:
$ brew install cmake pkg-config openssl git
# Get the source code
$ git clone https://github.com/chainx-org/ChainX ~/ChainX
$ cd ~/ChainX
# Note: build ChainX with nightly
$ cargo +nightly build --release
When you succeed to build the project with cargo build --release
, the chainx
binary should be present in target/release/chainx
.
Connect to the public testnet of ChainX:
# display status of your node on https://telemetry.polkadot.io/ via `--telemetry`
# customize your name on the telemetry page via `--name`
$ RUST_LOG=info ./chainx --chainspec=dev --telemetry --name=YOUR_NAME --bootnodes=/ip4/47.93.16.189/tcp/20222/p2p/QmRdBJk8eVPjkHcxZvRAUZdWtTq96mWivJFc7tpJ8fUEGU --db-path=/tmp/chainx
If you have succeeded to connect to our testnet, being a validator is not hard:
-
follow the instruction above to start a node util it is synced.
-
Create an account using our web-based wallet. Save your seed and take note of your account's address.
-
File an application to be a validator in our telegram chainx_org, which should include your name, url and ChainX address of validator account.
-
Rerestart your node with
--key=<seed> validator
:RUST_LOG=info ./chainx --chainspec=dev --telemetry --name=YOUR_NAME --bootnodes=/ip4/47.93.16.189/tcp/20222/p2p/QmRdBJk8eVPjkHcxZvRAUZdWtTq96mWivJFc7tpJ8fUEGU --db-path=/tmp/chainx --key=<seed> validator
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/release:$PATH
Start a local chainx testnet by running:
$ chainx --chainspec=dev --key=Alice validator