A new FRAME-based Substrate node with Cosmos ABCI pallet.
Documentation for this project is here.
Refer to the instructions at the Substrate Developer Hub.
The application is known to compile with the following versions of Rust:
nightly-2020-08-19 (defined in rust-toolchain)
Install Rust:
curl https://sh.rustup.rs -sSf | sh
Initialize your Wasm Build environment:
./scripts/init.sh
Build Wasm and native code:
cargo build --release
Build and start Cosmos node: Go to the our fork of the cosmos-sdk, switch to the branch feature/add_nameservice, then follow the instructions.
Available consensuses
- `aura`
- `babe`
```sh
- cargo build --release --no-default-features --features <consensus_name>
First, install Docker and Docker Compose.
Then run the following command to start a single node development chain. Also, sometimes you have to share permission for the .maintain
folder in Docker settings.
./scripts/docker_run.sh
Or:
docker-compose up -d
Start a development chain with:
./target/release/node-template\
--abci_genesis_state_path $HOME/.nsd/config/genesis.json\
--abci_server_url tcp://localhost:26658\
--abci_rpc_url 127.0.0.1:26657 --dev
Purge any existing development chain state:
./target/release/node-template purge-chain --dev
To get detailed info about options that available for node, run:
./target/release/node-template --help
To show detailed logs, run the the node with the following environment variables set: RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev
.
# Test all cargo packages
cargo test --all
Follow the docs from the directory.
ABCI pallet allows launching applications based on Cosmos SDK (or any other application that uses ABCI) on top of Substrate consensus and network layers. When both Cosmos and Substrate nodes are running, users can interact with them using Polkadot GUI and Cosmos CLI.
In Polkadot GUI, users can send standard Substrate extrinsic including extrinsics to ABCI pallet to match Substrate and Cosmos accounts for validators elections and Cosmos transaction wrapped with Substrate extrinsics. In Cosmos CLI, users can make the majority of standards calls to Cosmos node (all available functions are described in the full documentation. Some examples of commands for Nameservice app are described here.
- Simple request to Cosmos RPC:
{ "jsonrpc": "2.0", "method": <method_name>, "id": 0, "params": <method_params> }