This project contains Logion's collator node and runtime.
Install Zombienet.
-
If not already done, download polkadot binaries with command
./scripts/download_polkadot.sh
-
If not already done, build logion collator with command
cargo build --release
or download a pre-compiled binary with./scripts/download_logion.sh
-
Run
$ZOMBIENET spawn local-zombienet.toml
where$ZOMBIENET
is the path to the Zombienet binary
Below, $CHAIN
is one of logion
, logion-dev
, logion-test
or local
. It is recommended to define the variable before running the commands (export CHAIN=...
).
- Generate plain chainspec:
./target/release/logion build-spec --chain $CHAIN --disable-default-bootnode > ./res/$CHAIN.json
- Generate raw chainspec
./target/release/logion build-spec --chain ./res/$CHAIN.json --raw --disable-default-bootnode > ./res/$CHAIN.raw.json
- Generate WASM and genesis state
./target/release/logion export-genesis-wasm --chain ./res/$CHAIN.raw.json > ./bin/$CHAIN-wasm
./target/release/logion export-genesis-state --chain ./res/$CHAIN.raw.json > ./bin/$CHAIN-genesis
- Build using
srtool
cp rust-toolchain.toml runtime/ ; srtool build --root --package logion-runtime --runtime-dir runtime ; rm runtime/rust-toolchain.toml
parachainSystem.authorizeUpgrade(codeHash, checkVersion)
codeHash
:BLAKE2_256
field of compressed runtime insrtool
build outputcheckVersion
: Yes
parachainSystem.enactAuthorizedUpgrade(code)
code
: the compressed runtime produced bysrtool
try-runtime
tool enables the testing of a new runtime against real data.
Generally, what's tested here is one or several storage migrations activated by the new runtime or any Polkadot upgrade.
If not yet done, the Substrate Try Runtime CLI must be installed:
cargo install --git https://github.com/paritytech/try-runtime-cli --locked
If not yet done, the runtime has to be built with the try-runtime
feature:
cargo build --release --features=try-runtime
It can then be tested by executing the following command:
try-runtime --runtime target/release/wbuild/logion-runtime/logion_runtime.compact.compressed.wasm on-runtime-upgrade live --uri wss://para-rpc01.logion.network:443
This will:
- connect to RPC node
- download current state
- execute the upgrade
- run pallets'
post_upgrade
hook