Need help with Plasm?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

PlasmNetwork
314 Stars 77 Forks GNU General Public License v3.0 404 Commits 20 Opened issues

Description

The dApp Hub for blockchains of the future

Services available

!
?

Need anything else?

Contributors list

astar-cover

Integration Action GitHub tag (latest by date) Substrate version License
Twitter URL Twitter URL YouTube Docker Discord Telegram Medium

Astar Network is an interoperable blockchain based the Substrate framework and the hub for dApps within the Polkadot Ecosystem. With Astar Network and Shiden Network, people can stake their tokens to a Smart Contract for rewarding projects that provide value to the network.

For contributing to this project, please read our Contribution Guideline.

Building From Source

This section assumes that the developer is running on either macOS or Debian-variant operating system. For Windows, although there are ways to run it, we recommend using WSL or from a virtual machine for stability.

Execute the following command from your terminal to set up the development environment and build the node runtime.

# install Substrate development environment via the automatic script
$ curl https://getsubstrate.io -sSf | bash -s -- --fast

clone the Git repository

$ git clone --recurse-submodules https://github.com/PlasmNetwork/Astar.git

change current working directory

$ cd Astar

compile the node

note: you may encounter some errors if wasm32-unknown-unknown is not installed, or if the toolchain channel is outdated

$ cargo build --release

show list of available commands

$ ./target/release/astar-collator --help

Building with Nix

# install Nix package manager:
$ curl https://nixos.org/nix/install | sh

run from root of the project folder (Astar/ folder)

$ nix-shell -I nixpkgs=channel:nixos-21.05 third-party/nix/shell.nix --run "cargo build --release"

Running a Collator Node

To set up a collator node, you must have a fully synced node with the proper arguments, which can be done with the following command.

# start the Shiden collator node with
$ ./target/release/astar-collator \
  --base-path  \
  --name  \
  --port 30333 \
  --ws-port 9944 \
  --rpc-port 9933 \
  --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
  --rpc-cors all \
  --validator

Now, you can obtain the node's session key by sending the following RPC payload.

# send `rotate_keys` request
$ curl -H 'Content-Type: application/json' --data '{ "jsonrpc":"2.0", "method":"author_rotateKeys", "id":1 }' localhost:9933

should return a long string of hex, which is your session key

{"jsonrpc":"2.0","result":"","id":1}

After this step, you should have a validator node online with a session key for your node. For key management and validator rewards, consult our validator guide online.

Further Reading

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.