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

Added bootNodes/invulnerables/session.keys to the polkadot genesis chain_spec script #2171

Merged
merged 1 commit into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 27 additions & 14 deletions parachains/chain-specs/bridge-hub-polkadot.json

Large diffs are not rendered by default.

27 changes: 12 additions & 15 deletions scripts/create_bridge_hub_polkadot_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ $binary build-spec --chain bridge-hub-polkadot-dev > chain-spec-plain.json
cat $rt_path | od -A n -v -t x1 | tr -d ' \n' > rt-hex.txt

# replace the runtime in the spec with the given runtime and set some values to production
# TODO: missing .bootNodes
# TODO: missing .genesis.runtime.collatorSelection.invulnerables
# TODO: missing .genesis.runtime.session.keys
cat chain-spec-plain.json | jq --rawfile code rt-hex.txt '.genesis.runtime.system.code = ("0x" + $code)' \
| jq '.name = "Polkadot BridgeHub"' \
| jq '.id = "bridge-hub-polkadot"' \
Expand All @@ -55,36 +52,36 @@ cat chain-spec-plain.json | jq --rawfile code rt-hex.txt '.genesis.runtime.syste
| jq --argjson para_id $para_id '.genesis.runtime.parachainInfo.parachainId = $para_id' \
| jq '.genesis.runtime.balances.balances = []' \
| jq '.genesis.runtime.collatorSelection.invulnerables = [
"TODO:ACC1",
"TODO:ACC2",
"TODO:ACC3",
"TODO:ACC4"
"134AK3RiMA97Fx9dLj1CvuLJUa8Yo93EeLA1TkP6CCGnWMSd",
"15dU8Tt7kde2diuHzijGbKGPU5K8BPzrFJfYFozvrS1DdE21",
"1vXMKM8SctM28AQw1wSpd7p9yCUWn1uhbbKSVTuznsw8Q2x",
"15mCQcaj3QP1UdxBF82JRd9v3riZJcVNVEmx8xkFp7DSYR4Y"
]' \
| jq '.genesis.runtime.session.keys = [
[
"TODO:ACC1",
"TODO:ACC1",
"134AK3RiMA97Fx9dLj1CvuLJUa8Yo93EeLA1TkP6CCGnWMSd",
"134AK3RiMA97Fx9dLj1CvuLJUa8Yo93EeLA1TkP6CCGnWMSd",
{
"aura": "5EX6AnyuSPEFQ7HAPjRgzqk1sxgh8cyacGimwJ16y1nJ2w7g"
}
],
[
"TODO:ACC2",
"TODO:ACC2",
"15dU8Tt7kde2diuHzijGbKGPU5K8BPzrFJfYFozvrS1DdE21",
"15dU8Tt7kde2diuHzijGbKGPU5K8BPzrFJfYFozvrS1DdE21",
{
"aura": "5DZN8UhaJftvKhMMARmJBwrwzuEDpoUzzBvvWMbFXYsJ4CmK"
}
],
[
"TODO:ACC3",
"TODO:ACC3",
"1vXMKM8SctM28AQw1wSpd7p9yCUWn1uhbbKSVTuznsw8Q2x",
"1vXMKM8SctM28AQw1wSpd7p9yCUWn1uhbbKSVTuznsw8Q2x",
{
"aura": "5FKsn83rXQQiw7HwoeYoLMoYS5GP9YVNHZiCHwA4DSwDcPVa"
}
],
[
"TODO:ACC4",
"TODO:ACC4",
"15mCQcaj3QP1UdxBF82JRd9v3riZJcVNVEmx8xkFp7DSYR4Y",
"15mCQcaj3QP1UdxBF82JRd9v3riZJcVNVEmx8xkFp7DSYR4Y",
{
"aura": "5DCg19ckcJz4m52Th4o1LcSRK3H7NsUcQsRbu7pTDM3mZ26v"
}
Expand Down