Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Kusama BridgeHub Genesis

Compare
Choose a tag to compare
@bkontur bkontur released this 05 Jan 16:28
· 583 commits to master since this release
28cda4b

This release is based on the Parachain Runtimes v9360 release.

The release includes artifacts used to launch new Kusama BridgeHub parachain (source code).

The Wasm runtime and the genesis head data are used to register the new parachain in the Kusama network. The chainspec file, which includes both and additional configurations, is used to launch collators.

To verify the artifacts, you need to compile the wasm runtime using the same release tag and run an srtool build:

# from cumulus root directory
git checkout parachains-v9360
srtool build --runtime-dir parachains/runtimes/bridge-hubs/bridge-hub-kusama --package bridge-hub-kusama-runtime

...
...

# You should see output like this, which you can use bellow instead `$path_runtime_wasm`
Wasm             : parachains/runtimes/bridge-hubs/bridge-hub-kusama/target/srtool/release/wbuild/bridge-hub-kusama-runtime/bridge_hub_kusama_runtime.compact.compressed.wasm

For the rest you run the following commands from the cloned cumulus repository:

# from cumulus root directory
git checkout parachains-v9360

# translate built by srtool binary wasm runtime into hexadecimal string
cat $path_runtime_wasm | od -A n -v -t x1 | tr  -d ' \n' > $path_runtime_wam_hex

# upload spec file and place built hex runtime into
cat bridge-hub-kusama-spec.json \
    | jq --rawfile code $path_runtime_wasm_hex '.genesis.runtime.system.code = ("0x" + $code)' \
    > $path_spec_file

# build command tool to build the raw spec and the head data
cargo build --release -p polkadot-parachain

# build raw spec file
./target/release/polkadot-parachain build-spec --chain $path_spec_file --raw > $path_spec_file_raw

# head data
./target/release/polkadot-parachain export-genesis-state --chain $path_spec_file > $path_head_data

(Note that you will need the od tool that comes natively with any Linux-based system and the jq tool to run the script.)

The resulting files:
$path_runtime_wasm
$path_spec_file
$path_spec_file_raw
$path_head_data
should correspond to the
bridge-hub-kusama_runtime-v9360.compact.compressed.wasm
bridge-hub-kusama-spec.json
bridge-hub-kusama-spec-raw.json
bridge-hub-kusama-genesis-head-data
files from the release assets.

Bridge-hub-kusama

🏋️ Runtime Size:		595.85 KB (610149 bytes)
🔥 Core Version:		bridge-hub-kusama-9360 (bridge-hub-kusama-0.tx1.au1)
🗜 Compressed:			Yes: 81.69%
🎁 Metadata version:		V14
🗳️ Blake2-256 hash:		0xf2fe9ec5f5878e0fd5656202f0ac8a76b92fd0b9acf38049ebc2b3649d0982a7
📦 IPFS:			QmX3VwXsDVd3EJNs5rDD9nQku3XCy6YjJ9sNxNvjhFe22B