Skip to content

Repository files navigation

TrackBack

Blockchain for Self Sovereign Identity, Decentralised Identifiers and Verifiable Credentials .
Substrate 3.0.0Codeshare 3.0.0Substrate 3.0.0TrackBack-Node 0.0.1TrackBack-Node 0.0.1

Features

  • DID Pallet
  • Verifiable Credentials Pallet (Q2-2021)

Stable and compatible version with TrackBack-SDKs

  • PLEASE USE the git tag 0.0.7

Important

Limitations

  • Limitations
  • Releasing as a minimum viable product.
  • Not recommended using in production.
  • Releasing with limited features (MVP)

Setting up the chain

sudo apt update
# May prompt for location information
sudo apt install -y git clang curl libssl-dev llvm libudev-dev
curl https://getsubstrate.io -sSf | bash -s -- --fast
rustup default stable
rustup update
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
  • Build the project
cargo build --release

Run

Run as a permission network

  • Please Follow the tutorial.
  • Docker configurations for 3 nodes in permissioned network.
  • Node 1
docker run -p 0.0.0.0:9615:9615 -p 0.0.0.0:30333:30333 -p 0.0.0.0:9933:9933 -p 0.0.0.0:9944:9944 -e RPC_PORT=9933 -e P2P_PORT=30333 -e WEB_SOCKET_PORT=9944 <DOCKER IMAGE NAME> \
--chain=local \
--base-path /tmp/validator1 \
--alice \
--node-key=<NODE KEY> \
--port 30333 \
--unsafe-ws-external \
--rpc-methods Unsafe \
--rpc-cors=all \
--ws-external \
--ws-port 9944

Node 2

docker run -p 0.0.0.0:30333:30333 -p 0.0.0.0:9933:9933 -p 0.0.0.0:9944:9944 -e RPC_PORT=9933 -e P2P_PORT=30333 -e WEB_SOCKET_PORT=9944 <DOCKER IMAGE NAME> \
--chain=local \
--base-path /tmp/validator2 \
--bob \
--node-key=<NODE KEY> \
--port 30333 \
--ws-port 9944 \
--unsafe-ws-external \
--rpc-methods Unsafe \
--rpc-cors=all \
--ws-external \
--bootnodes /ip4/<IP4 ADDRESS>/tcp/30333/p2p/<BOOT-NODE-ADDRESS>

Node 3 ( Not well known node )

docker run -p 0.0.0.0:30333:30333 -p 0.0.0.0:9933:9933 -p 0.0.0.0:9944:9944 -e RPC_PORT=9933 -e P2P_PORT=30333 -e WEB_SOCKET_PORT=9944 <DOCKER IMAGE NAME> /tmp/validator3 \
--chain local \
--charlie \
--port 30333 \
--ws-port 9944 \
--rpc-port 9933 \
--rpc-methods Unsafe \
--unsafe-ws-external \
--rpc-cors=all \
--node-key=<NODE KEY>\ \
--ws-external \
--validator \
--offchain-worker always \
--bootnodes /ip4/<IP4 Addresss>/tcp/30333/p2p/<BOOT NODE KEY>

Single Node Development Chain

Purge any existing dev chain state:

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

Start a dev chain:

./target/release/trackback-node --dev

Or, start a dev chain with detailed logging:

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

Multi-Node Local Testnet

If you want to see the multi-node consensus algorithm in action, refer to our Start a Private Network tutorial.

Local deployment

# Purge any chain data from previous runs# You will be prompted to type `y`
./target/release/trckback-node purge-chain --base-path /tmp/alice --chain local
# Start Alice's node
./target/release/trackback-node \
--base-path /tmp/alice \
--chain local \
--alice \
--port 30333 \
--ws-port 9944 \
--rpc-port 9933 \
--node-key 0000000000000000000000000000000000000000000000000000000000000001 \
--telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
--validator

Starts Bob's node

./target/release/trackback-node purge-chain --base-path /tmp/bob --chain local
./target/release/trackback-node \
--base-path /tmp/bob \
--chain local \
--bob \
--port 30334 \
--ws-port 9946 \
--rpc-port 9934 \
--telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
--validator \
--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp

CLIon configuration

run --bin trackback-node -- --base-path /tmp/alice --chain local --alice --port 30333 --ws-port 9944 --rpc-port 9933 --node-key 0000000000000000000000000000000000000000000000000000000000000001 --telemetry-url "wss://telemetry.polkadot.io/submit/ 0" --validator

Gets a full list of available APIs for the node

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "rpc_methods"}' http://localhost:9933/

Releases

Packages

Contributors

Languages