This is the repository to run Integritee as a parachain on Kusama and Rococo. It is forked from the Cumulus repository.
- Run these commands with the suitable polkadot version.
diener update --cumulus --branch polkadot-v0.9.xx
diener update --substrate --branch polkadot-v0.9.xx
diener update --polkadot --branch release-v0.9.xx
- Search and replace
integritee-network/
dependencies to point to newpolkadot-v0.9.xx
branch. - Search and replace
orml
dependencies to point to newpolkadot-v0.9.xx
branch.
- Download zombienet from the releases in the zombienet repository.
- Copy it to
~/.local/bin/
- Launch it in your terminal
zombienet-linux-x64 spawn --provider native zombienet/rococo-local-with-integritee-and-shell.toml
Note: You can also set a chain-spec path to the zombienet config, but the config param is named chain_spec_path
.
Follow the steps provided in https://docs.substrate.io/tutorials/v3/cumulus/start-relay/
But keep the following in mind:
- Our chain has a paraid of 2015 on Rococo and Kusama (see polkadot-parachains/src/command.rs#44-49)
- For testing on rococo-local use the chain spec
integritee-rococo-local-dev
- More chain specs can be found in polkadot-parachains/src/command.rs
Two runtimes are contained in this repository. First, the shell-runtime, which has been extended compared to the upstream shell-runtime. It has some additional modules including sudo to facilitate a runtime upgrade with the sudo upgrade method. Second, it runs with the same executor instance as the integritee-runtime, such that an eventual upgrade is simpler to perform, i.e., only the runtime needs to be upgraded whereas the client can remain the same. Hence, all modules revolving around aura have been included, which provide data the client needs.
Prepare a local shell network and generate the integritee-runtime
wasm blob, which contains the upgraded runtime to be executed after the runtime upgrade.
# spawn local setup (NOTE: the shell-runtime parachain id needs to be changed to match the integritee-runtime's.)
zombienet-linux-x64 spawn --provider native zombienet/rococo-local-with-shell.toml
# generate wasm blob
./target/release/integritee-collator export-genesis-wasm --chain integritee-rococo-local-dev > integritee-rococo-local-dev.wasm
After the parachain starts producing blocks, a runtime upgrade can be initiated via the polkadot-js/apps interface.
If successful, a parachainSystem.validationFunctionStored
event is thrown followed by a parachainSystem.validationFunctionApplied
event some blocks later. After this procedure, the Teerex
module should be available in the extrinsics tab in polkadot-js/apps.
- Don't forget to enable file upload if you perform drag and drop for the
genesisHead
andvalidationCode
. If it is not enabled, Polkadot-js will interpret the path as a string and won't complain but the registration will fail. - Don't forget to add the argument
--chain integritee-rococo-local-dev
for the custom chain config. This argument is omitted in the Cumulus Workshop. - The relay chain and the collator need to be about equally recent. This might require frequent rebasing of this repository on the corresponding release branch.
The current weights have been benchmarked with the following reference hardware:
- Core(TM) i7-10875H
- 32GB of RAM
- NVMe SSD
The benchmarks are run with the following script:
./scripts/benchmark_all_pallets.sh
cargo build --release --features try-runtime
try-runtime --runtime ./target/release/wbuild/integritee-runtime/integritee_runtime.compact.compressed.wasm on-runtime-upgrade --checks=pre-and-post live --uri wss://kusama.api.integritee.network:443
To test runtime upgrades
nvm use 20
npx @acala-network/chopsticks@latest --config integritee-kusama --wasm-override ./target/release/wbuild/integritee-runtime/integritee_runtime.compact.compressed.wasm
to test XCM
npx @acala-network/chopsticks@latest xcm --p=karura --p=integritee-kusama
see other options in chopsticks help
- Thorough Readme about Rococo and Collators in general in the original repository of this fork.
- Parachains Development in the Polkadot Wiki
- encointer parachain readme: https://github.com/encointer/encointer-parachain