Skip to content
Robonomics on Substrate node
Branch: master
Clone or download
akru Merge pull request #19 from khssnv/master
Turtlesim liability execution example package
Latest commit e180fe6 Mar 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples/turtlesim_liability
res
ros-integration BSD3 -> APACHE2 Mar 19, 2019
runtime BSD3 -> APACHE2 Mar 19, 2019
src
.gitignore
.travis.yml TravisCI: enable cargo cache Jan 18, 2019
Cargo.lock Enabled finality tracker module Mar 12, 2019
Cargo.toml Bump version Mar 18, 2019
LICENSE BSD3 -> APACHE2 Mar 19, 2019
NOTICE BSD3 -> APACHE2 Mar 19, 2019
README.adoc README come to AsciiDoc Mar 18, 2019
build.rs
build.sh
init.sh
shell.nix

README.adoc

Robonomics on Substrate

Build Status Downloads Release

1. Intro

AIRA (Autonomous Intelligent Robot Agent) project implements the standard of economic interaction between human-robot and robot-robot via liability smart contract. AIRA makes it possible to connect a variety of different robots to the market of robot liabilities for the direct sale of data from robot sensors, ordering of logistics services, and organization ordering of personalized products at fully automated enterprises.

This source is a part of AIRA project. It implements their purposes using Substrate technologies.

2. Try it out

  1. Import custom data types at Substrate UI: Developer settings

  2. Open Substrate UI: General settings

  3. Set custom node endpoint to wss://robonomics.akru.me/

  4. Save and reload

When connection is success you can explore Robonomics testnet using Substrate UI. Just create account and request test XRT in our Matrix room.

3. Install node

Robonomics on Substrate binary blobs available as an assets in releases. Latest version you can try to build from source code.

3.1. Building from source

Ensure you have Rust and the support software installed:

curl https://sh.rustup.rs -sSf | sh
# on Windows download and run rustup-init.exe
# from https://rustup.rs instead

rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup update stable
cargo install --git https://github.com/alexcrichton/wasm-gc

You will also need to install the following packages:

  • Linux:

    sudo apt install cmake pkg-config libssl-dev git clang libclang-dev
  • Mac:

    brew install cmake pkg-config openssl git llvm
  • Windows (PowerShell):

    # Install LLVM
    # Download and install the Pre Build Windows binaries
    # of LLVM  from http://releases.llvm.org/download.html
    
    # Install OpenSSL (through vcpkg)
    mkdir \Tools
    cd \Tools
    git clone https://github.com/Microsoft/vcpkg.git
    cd vcpkg
    .\bootstrap-vcpkg.bat
    .\vcpkg.exe install openssl:x64-windows-static
    
    $env:OPENSSL_DIR = 'C:\Tools\vcpkg\installed\x64-windows-static'
    $env:OPENSSL_STATIC = 'Yes'
    [System.Environment]::SetEnvironmentVariable('OPENSSL_DIR', $env:OPENSSL_DIR, [System.EnvironmentVariableTarget]::User)
    [System.Environment]::SetEnvironmentVariable('OPENSSL_STATIC', $env:OPENSSL_STATIC, [System.EnvironmentVariableTarget]::User)

Install robonomics node from git source:

cargo install --force --git https://github.com/airalab/substrate-node-robonomics

Run node in Robonomics testnet:

robonomics

Or run your local development network:

robonomics --dev

3.2. Building with Nix

Install Nix package manager:

curl https://nixos.org/nix/install | sh

Run in Nix shell:

git clone https://github.com/airalab/substrate-node-robonomics && cd substrate-node-robonomics
nix-shell --run "cargo run --release"

4. Network maintaining

Currently Robonomics on Substrate testnet is maintained by developers but anyone can support the project by several ways described below.

4.1. Full node

You can support the network just by launch the node. Every additional full node of blockchain helps it to be more sustainable and fault tolerant. Robonomics node binaries is available on releases or could be build from source.

4.2. Become a validator

For nodes that can be online 24/7 also available most important role on chain - block producers or briefly validator. Robonomics on Substrate use NPoS algorithm for choosing block production accounts. For this reason if you have any stake in test XRT you can try self in block production. You can request test XRT in our Matrix room.

  1. Generate two accounts stash and controller using Account page

  2. Transfer full amount of test XRT to stash and a little bit to controller accounts

  3. Send extrinsic from stash account with params staking:bond(controller, value, payee):

    1. controller account

    2. stash account total balance

    3. 0x00

  4. Send extrinsic from controller account with params staking:validate(prefs)

    1. 0x00

  5. Launch Robonomics node (set controller account seed as parameter):

    robonomics --validator --key %CONTROLLER_SEED%
  6. Check validator list

5. Robotics integration

Special feature ros helps to use Robonomics Substrate modules in ROS-enabled cyber-physical systems.

5.1. Building with ROS feature

  1. Install ROS using instruction.

  2. Import ROS environment:

    source /opt/ros/melodic/setup.bash
  3. Build with ros feature:

    cargo build --release --features ros

5.2. Launch ROS node

  1. Start ROS core service

    roscore
  2. Start node:

    cargo run --release --features ros
  3. Subscribe for best block number:

    rostopic echo /blockchain/best_number
You can’t perform that action at this time.