This repository contains implementations of the Ideal Network parachain node.
WARNING: This is a work in progress and is not ready for production use as it is based on an unsafe version of the Drand pallet.
Use the following command to build the node without launching it:
cargo build --release
You can build your image from the root directory, run:
docker build . # for amd64 architecture
Or
docker build -f Dockerfile.arm64 . # for arm64 architecture
If you have built your image, replace [image]
with the image name you have built.
If you are using the pre-built image, replace [image]
with ideallabs/idn:testnet-0.1.0-amd64
for amd64 architecture or ideallabs/idn:testnet-0.1.0-arm64
for arm64 architecture.
docker run [image] [options]
Unit Tests
cargo test
Benchmarks
Build with benchmarks using:
cargo build --release --features runtime-benchmarks
and run them with:
# list all benchmarks
./target/release/ideal-nw-node benchmark pallet --chain dev --pallet "*" --extrinsic "*" --repeat 0
# benchmark the drand pallet
./target/release/ideal-nw-node benchmark pallet \
--chain dev \
--wasm-execution=compiled \
--pallet pallet_drand \
--extrinsic "*" \
--steps 50 \
--repeat 20 \
--output <output_file.rs>
-
This project uses POP to orchestrate the relaychain and parachain nodes. If you don't have it yet, install the
pop
CLI tool to run the local development chain. -
Run the following command to start a local development IDN chain, with two relaychain nodes and a single parachain collator:
pop up parachain -f ./network.toml
It should output something like this:
◇ 🚀 Network launched successfully - ctrl-c to terminate
│ ⛓️ paseo-local
│ alice:
│ portal: https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:51547#/explorer
│ logs: tail -f /var/folders/_y/qwer/T/zombie-asdf/alice/alice.log
│ bob:
│ portal: https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:51550#/explorer
│ logs: tail -f /var/folders/_y/qwer/T/zombie-asdf/bob/bob.log
│ ⛓️ dev: 1000
│ collator-01:
│ portal: https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:51553#/explorer
│ logs: tail -f /var/folders/_y/qwer/T/zombie-asdf/collator-01/collator-01.log
You can see here that the parachain node collator-01
is running on ws://127.0.0.1:51553
.
Take note of the parachain WS port, in this case 51553
, as you will need it to interact with the parachain in the next step.
- Insert the Drand pallet's authority keys. For Alice it can be done by running the following command:
chmod +x insert_alice_drand_key.sh
./insert_alice_drand_key.sh <PARACHAIN_WS_PORT>
- Done, you can now interact with the parachain using the "portal" link provided by the
pop
CLI tool (see the output from step 2).