Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spec for parachain relay #108

Merged
merged 2 commits into from
Nov 11, 2020
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
11 changes: 9 additions & 2 deletions scripts/run-alphanet-relay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ echo "relay ${RELAY_INDEX} - p2p-port: $((RELAY_PORT)), \
http-port: $((RELAY_PORT + 1)) , ws-port: $((RELAY_PORT + 2))"

# This part will insert the keys in the node
bash -c "sleep 5; \
bash -c "sleep 10; \
insertKey() { \
curl http://localhost:$((RELAY_PORT + 1)) -H 'Content-Type:application/json;charset=utf-8' -d \"
{
Expand Down Expand Up @@ -73,13 +73,20 @@ else
RELAY_BASE_PATH="$RELAY_BASE_PREFIX-relay-$RELAY_INDEX"
fi

if [ -z "$POLKADOT_VERSION" ]; then
POLKADOT_VERSION="sha-`egrep -o 'paritytech/polkadot.*#([^\"]*)' Cargo.lock | \
head -1 | sed 's/.*#//' | cut -c1-8`"
fi

echo "Using Polkadot revision #${POLKADOT_VERSION}"

Comment on lines +76 to +82
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it detects the polkadot version from the cargo.lock file right? Pretty slick. 👍

# The -v build:/build allows to pass the spec files from the build folder to the docker container
docker run \
-v $(pwd)/build:/build \
-p $RELAY_PORT:$RELAY_PORT \
-p $((RELAY_PORT + 1)):$((RELAY_PORT + 1)) \
-p $((RELAY_PORT + 2)):$((RELAY_PORT + 2)) \
-it purestake/moonbase-relay-testnet:latest \
-it purestake/moonbase-relay-testnet:$POLKADOT_VERSION \
/usr/local/bin/polkadot \
--chain /$POLKADOT_SPEC_RAW \
--node-key ${NODE_KEYS[$RELAY_INDEX]} \
Expand Down
86 changes: 67 additions & 19 deletions specs/rococo-alphanet-specs-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,53 @@
"protocolId": "dot",
"properties": null,
"consensusEngine": null,
"lightSyncState": null,
"genesis": {
"runtime": {
"system": {
"frameSystem": {
"changesTrieConfig": null,
"code": "<runtime_code>"
},
"babe": {
"palletBabe": {
"authorities": []
},
"indices": {
"palletIndices": {
"indices": []
},
"balances": {
"palletBalances": {
"balances": [
["1uV7ZJDW37CHeiWFppogK5JsV59tUrbuf1PcaDW5cTE1DHG", 100000000000000000000],
["14dmc8KjuXgKrmrBneJdpTZQhjStJoWnVipAhf2vcwcMWRBM", 100000000000000000000],
["16S1pBxHVpbHZE5DacwucvzXo3T6vDi9nsrTdwFvo3Vmm2xL", 100000000000000000000],
["5GshoQVQ1xc9Abr4LcJdf5vr6c8ixXxNTSya8yeqV8xeQwsE", 100000000000000000000]
["5GshoQVQ1xc9Abr4LcJdf5vr6c8ixXxNTSya8yeqV8xeQwsE", 100000000000000000000],
["152iAMmpndGc9oox2d1BSmGvwTJBg9MkDA3LzEd5BX22241L", 100000000000000000000],
["145LKiLp8hKquLRXLAAw9fY5uMdeeGr5hRzsRNvCnuH3fcA5", 100000000000000000000]
]
},
"session": {
"palletStaking": {
"historyDepth": 84,
"validatorCount": 2,
"minimumValidatorCount": 0,
"invulnerables": [],
"forceEra": "NotForcing",
"slashRewardFraction": 0,
"canceledPayout": 0,
"stakers": [
[
"152iAMmpndGc9oox2d1BSmGvwTJBg9MkDA3LzEd5BX22241L",
"152iAMmpndGc9oox2d1BSmGvwTJBg9MkDA3LzEd5BX22241L",
10000000000000000,
"Validator"
],
[
"145LKiLp8hKquLRXLAAw9fY5uMdeeGr5hRzsRNvCnuH3fcA5",
"145LKiLp8hKquLRXLAAw9fY5uMdeeGr5hRzsRNvCnuH3fcA5",
10000000000000000,
"Validator"
]
]
},
"palletSession": {
"keys": [
[
"152iAMmpndGc9oox2d1BSmGvwTJBg9MkDA3LzEd5BX22241L",
Expand Down Expand Up @@ -64,26 +90,48 @@
]
]
},
"grandpa": {
"palletGrandpa": {
"authorities": []
},
"imOnline": {
"palletImOnline": {
"keys": []
},
"authorityDiscovery": {
"palletAuthorityDiscovery": {
"keys": []
},
"parachains": {
"authorities": []
},
"registrar": {
"parachains": [],
"phdata": null
},
"vesting": {
"vesting": []
"parachainsConfiguration": {
"config": {
"validation_upgrade_frequency": 600,
"validation_upgrade_delay": 300,
"acceptance_period": 1200,
"max_code_size": 5242880,
"max_head_data_size": 32768,
"parathread_cores": 0,
"parathread_retries": 0,
"group_rotation_frequency": 10,
"chain_availability_period": 0,
"thread_availability_period": 0,
"scheduling_lookahead": 0,
"max_upward_queue_count": 0,
"max_upward_queue_size": 0,
"max_downward_message_size": 0,
"preferred_dispatchable_upward_messages_step_weight": 0,
"max_upward_message_size": 0,
"max_upward_message_num_per_candidate": 0,
"hrmp_open_request_ttl": 0,
"hrmp_sender_deposit": 0,
"hrmp_recipient_deposit": 0,
"hrmp_channel_max_capacity": 0,
"hrmp_channel_max_total_size": 0,
"hrmp_max_parachain_inbound_channels": 0,
"hrmp_max_parathread_inbound_channels": 0,
"hrmp_channel_max_message_size": 0,
"hrmp_max_parachain_outbound_channels": 0,
"hrmp_max_parathread_outbound_channels": 0,
"hrmp_max_message_num_per_candidate": 0
}
},
"sudo": {
"palletSudo": {
"key": "5GshoQVQ1xc9Abr4LcJdf5vr6c8ixXxNTSya8yeqV8xeQwsE"
}
}
Expand Down