Skip to content

galacticcouncil/Basilisk-node

Repository files navigation

Basilisk node

Local Development

Follow these steps to prepare a local Substrate development environment 🛠️

Simple Setup

Install all the required dependencies with a single command (be patient, this can take up to 30 minutes).

curl https://getsubstrate.io -sSf | bash -s -- --fast

Manual Setup

Find manual setup instructions at the Substrate Developer Hub.

Build

Once the development environment is set up, build the node. This command will build the Wasm and native code:

make build

Run

Local Testnet with Zombienet

Prerequisites:

  • Relay chain repository (polkadot) has to be built in ../polkadot
  • Grab zombienet utility used to start network from releases
cd ./launch-configs/zombienet
zombienet spawn local.json

Interaction with the node

Go to the Polkadot apps at https://dotapps.io

Connect to the local testnet at ws://localhost:9988 or live wss://basilisk.hydradx.io:9944

NOTE - FixedU128 type is not yet implemented for polkadot apps. Balance is a measure so price can be reasonably selected. If using polkadot apps to create pool:

  • 1 Mega Units equals 1:1 price
  • 20 Mega Units equals 20:1 price
  • 50 Kilo Units equals 0.05:1 price

Testing of storage migrations and runtime upgrades

The try-runtime tool can be used to test storage migrations and runtime upgrades against state from a real chain. Run the following command to test against the state on Basilisk on Kusama. Don't forget to use a runtime built with try-runtime feature.

try-runtime --runtime ./target/release/wbuild/basilisk-runtime/basilisk_runtime.wasm on-runtime-upgrade --checks all live --uri wss://rpc.basilisk.cloud:443

or against the Basilisk testnet on Rococo using --uri wss://rococo-basilisk-rpc.hydration.dev:443

Chopsticks simulations

Chopsticks can be used to dry-run any transaction in parallel reality of any Substrate network.

Setting up the repo:

git clone --recurse-submodules https://github.com/AcalaNetwork/chopsticks.git && cd chopsticks
yarn
yarn build-wasm

To run Kusama-Basilisk-Karura setup use configs from launch-configs/chopsticks and run

npx @acala-network/[email protected] xcm --relaychain=configs/kusama.yml --parachain=configs/basilisk.yml --parachain=configs/karura.yml