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:0.1.3-amd64
for amd64 architecture or ideallabs/idn:0.1.3-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:1234#/explorer
│ logs: tail -f /var/folders/_y/qwer/T/zombie-asdf/collator-01/collator-01.log
- Insert the Drand pallet's authority keys. For Alice it can be done by running the following command on a separate terminal:
chmod +x insert_alice_drand_key.sh
./insert_alice_drand_key.sh
- Done, you can now interact with the parachain using this link https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:1234#/explorer. Bear in mind that you may need to wait a few seconds for the block production to start.