rename polkadot-collator to polkadot-parachain (#1241)

* rename polkadot-collator to polkadot-parachain

Not every node has to be a collator.

* Update README.md

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>

* rename docker file

* Update .github/workflows/extrinsic-ordering-check-from-bin.yml

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>

* Versioning scheme that tracks polkadot relay chain

but allows for patch releases by having a 0 at the end.
(`-patch1` patch naming schemes were discussed but they
were judged to cause downstream packagers pain.)

* update name

* update lock file

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
This commit is contained in:
Squirrel
2022-05-13 14:02:52 +01:00
committed by GitHub
parent e3d0895dc6
commit 8d44f9bcae
27 changed files with 179 additions and 178 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
**/*.txt **/*.txt
**/*.md **/*.md
/docker/ /docker/
!/target/release/polkadot-collator !/target/release/polkadot-parachain
# dotfiles in the repo root # dotfiles in the repo root
/.* /.*
+1 -1
View File
@@ -39,7 +39,7 @@ candidate branch or started an additional release candidate branch (rc-2, rc-3,
### All Releases ### All Releases
- [ ] Check that the new polkadot-collator versions have [run on the network](#burn-in) - [ ] Check that the new polkadot-parachain versions have [run on the network](#burn-in)
without issue. without issue.
- [ ] Check that a draft release has been created at - [ ] Check that a draft release has been created at
https://github.com/paritytech/cumulus/releases with relevant [release https://github.com/paritytech/cumulus/releases with relevant [release
@@ -10,7 +10,7 @@ on:
required: true required: true
binary_url: binary_url:
description: A url to a Linux binary for the node containing the runtime to test description: A url to a Linux binary for the node containing the runtime to test
default: https://github.com/paritytech/cumulus/releases/download/statemine_v3/polkadot-collator default: https://releases.parity.io/cumulus/polkadot-v0.9.21/polkadot-parachain
required: true required: true
chain: chain:
description: The name of the chain under test. Usually, you would pass a local chain description: The name of the chain under test. Usually, you would pass a local chain
@@ -33,17 +33,17 @@ jobs:
run: | run: |
echo Fetching $BIN_URL echo Fetching $BIN_URL
wget $BIN_URL wget $BIN_URL
chmod a+x polkadot-collator chmod a+x polkadot-parachain
./polkadot-collator --version ./polkadot-parachain --version
- name: Start local node - name: Start local node
run: | run: |
echo Running on $CHAIN echo Running on $CHAIN
./polkadot-collator --chain=$CHAIN -- --chain polkadot-local & ./polkadot-parachain --chain=$CHAIN -- --chain polkadot-local &
- name: Prepare output - name: Prepare output
run: | run: |
VERSION=$(./polkadot-collator --version) VERSION=$(./polkadot-parachain --version)
echo "Metadata comparison:" >> output.txt echo "Metadata comparison:" >> output.txt
echo "Date: $(date)" >> output.txt echo "Date: $(date)" >> output.txt
echo "Reference: $REF_URL" >> output.txt echo "Reference: $REF_URL" >> output.txt
@@ -71,7 +71,7 @@ jobs:
- name: Stop our local node - name: Stop our local node
run: | run: |
pkill polkadot-collator pkill polkadot-parachain
continue-on-error: true continue-on-error: true
- name: Save output as artifact - name: Save output as artifact
@@ -19,7 +19,7 @@ on:
jobs: jobs:
docker_build_publish: docker_build_publish:
env: env:
BINARY: polkadot-collator BINARY: polkadot-parachain
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
+1 -1
View File
@@ -14,7 +14,7 @@ on:
jobs: jobs:
docker_build_publish: docker_build_publish:
env: env:
BINARY: polkadot-collator BINARY: polkadot-parachain
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
+4 -4
View File
@@ -116,10 +116,10 @@ test-linux-stable:
# it goes with the debug assertions. # it goes with the debug assertions.
- if [ "${ARE_WE_RELEASING_YET}" ]; then - if [ "${ARE_WE_RELEASING_YET}" ]; then
echo "___Building a binary___"; echo "___Building a binary___";
time cargo build --release --locked --bin polkadot-collator; time cargo build --release --locked --bin polkadot-parachain;
echo "___Packing the artifacts___"; echo "___Packing the artifacts___";
mkdir -p ./artifacts; mkdir -p ./artifacts;
mv ${CARGO_TARGET_DIR}/release/polkadot-collator ./artifacts/.; mv ${CARGO_TARGET_DIR}/release/polkadot-parachain ./artifacts/.;
echo "___The VERSION is either a tag name or the curent branch if triggered not by a tag___"; echo "___The VERSION is either a tag name or the curent branch if triggered not by a tag___";
echo ${CI_COMMIT_REF_NAME} | tee ./artifacts/VERSION; echo ${CI_COMMIT_REF_NAME} | tee ./artifacts/VERSION;
else else
@@ -179,7 +179,7 @@ publish-s3:
# Job will fail if no artifacts were provided by test-linux-stable job. It's only possible for # Job will fail if no artifacts were provided by test-linux-stable job. It's only possible for
# this test to fail if the pipeline was triggered by web or schedule trigger without supplying # this test to fail if the pipeline was triggered by web or schedule trigger without supplying
# a nono-empty ARE_WE_RELEASING_YET variable. # a nono-empty ARE_WE_RELEASING_YET variable.
- test -e ./artifacts/polkadot-collator || - test -e ./artifacts/polkadot-parachain ||
( echo "___No artifacts were provided by the previous job, please check the build there___"; exit 1 ) ( echo "___No artifacts were provided by the previous job, please check the build there___"; exit 1 )
script: script:
- echo "___Publishing a binary with debug assertions!___" - echo "___Publishing a binary with debug assertions!___"
@@ -202,7 +202,7 @@ benchmarks-build:
script: script:
- time cargo build --profile production --locked --features runtime-benchmarks - time cargo build --profile production --locked --features runtime-benchmarks
- mkdir artifacts - mkdir artifacts
- cp target/production/polkadot-collator ./artifacts/ - cp target/production/polkadot-parachain ./artifacts/
benchmarks: benchmarks:
stage: benchmarks-run stage: benchmarks-run
Generated
+99 -99
View File
@@ -978,7 +978,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-runtime-common", "polkadot-runtime-common",
"scale-info", "scale-info",
"serde", "serde",
@@ -1709,7 +1709,7 @@ dependencies = [
"parking_lot 0.12.0", "parking_lot 0.12.0",
"polkadot-client", "polkadot-client",
"polkadot-node-primitives", "polkadot-node-primitives",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-primitives", "polkadot-primitives",
"polkadot-service", "polkadot-service",
"polkadot-test-client", "polkadot-test-client",
@@ -1843,7 +1843,7 @@ dependencies = [
"log", "log",
"pallet-balances", "pallet-balances",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"sc-client-api", "sc-client-api",
"scale-info", "scale-info",
"serde", "serde",
@@ -1962,7 +1962,7 @@ dependencies = [
"frame-support", "frame-support",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-primitives", "polkadot-primitives",
"sp-api", "sp-api",
"sp-runtime", "sp-runtime",
@@ -2017,7 +2017,7 @@ dependencies = [
"frame-support", "frame-support",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-primitives", "polkadot-primitives",
"sp-runtime", "sp-runtime",
"sp-std", "sp-std",
@@ -2118,7 +2118,7 @@ dependencies = [
"pallet-balances", "pallet-balances",
"pallet-transaction-payment", "pallet-transaction-payment",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-primitives", "polkadot-primitives",
"sc-block-builder", "sc-block-builder",
"sc-consensus", "sc-consensus",
@@ -6510,7 +6510,7 @@ dependencies = [
"parachain-template-runtime", "parachain-template-runtime",
"parity-scale-codec", "parity-scale-codec",
"polkadot-cli", "polkadot-cli",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-primitives", "polkadot-primitives",
"polkadot-service", "polkadot-service",
"sc-basic-authorship", "sc-basic-authorship",
@@ -6585,7 +6585,7 @@ dependencies = [
"pallet-xcm", "pallet-xcm",
"parachain-info", "parachain-info",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-runtime-common", "polkadot-runtime-common",
"scale-info", "scale-info",
"serde", "serde",
@@ -7106,83 +7106,6 @@ dependencies = [
"sp-transaction-pool", "sp-transaction-pool",
] ]
[[package]]
name = "polkadot-collator"
version = "5.4.0"
dependencies = [
"assert_cmd",
"async-trait",
"canvas-kusama-runtime",
"clap 3.1.18",
"cumulus-client-cli",
"cumulus-client-consensus-aura",
"cumulus-client-consensus-common",
"cumulus-client-consensus-relay-chain",
"cumulus-client-network",
"cumulus-client-service",
"cumulus-primitives-core",
"cumulus-primitives-parachain-inherent",
"cumulus-relay-chain-inprocess-interface",
"cumulus-relay-chain-interface",
"cumulus-relay-chain-rpc-interface",
"frame-benchmarking",
"frame-benchmarking-cli",
"futures 0.3.21",
"hex-literal",
"jsonrpsee",
"log",
"nix 0.24.1",
"pallet-contracts-rpc",
"pallet-transaction-payment-rpc",
"parachains-common",
"parity-scale-codec",
"polkadot-cli",
"polkadot-parachain",
"polkadot-primitives",
"polkadot-service",
"rococo-parachain-runtime",
"sc-basic-authorship",
"sc-chain-spec",
"sc-cli",
"sc-client-api",
"sc-consensus",
"sc-executor",
"sc-network",
"sc-rpc",
"sc-service",
"sc-sysinfo",
"sc-telemetry",
"sc-tracing",
"sc-transaction-pool",
"sc-transaction-pool-api",
"seedling-runtime",
"serde",
"shell-runtime",
"sp-api",
"sp-block-builder",
"sp-blockchain",
"sp-consensus",
"sp-consensus-aura",
"sp-core",
"sp-inherents",
"sp-io",
"sp-keystore",
"sp-offchain",
"sp-runtime",
"sp-session",
"sp-timestamp",
"sp-transaction-pool",
"statemine-runtime",
"statemint-runtime",
"substrate-build-script-utils",
"substrate-frame-rpc-system",
"substrate-prometheus-endpoint",
"tempfile",
"try-runtime-cli",
"westmint-runtime",
"xcm",
]
[[package]] [[package]]
name = "polkadot-collator-protocol" name = "polkadot-collator-protocol"
version = "0.9.19" version = "0.9.19"
@@ -7408,7 +7331,7 @@ dependencies = [
"polkadot-node-primitives", "polkadot-node-primitives",
"polkadot-node-subsystem", "polkadot-node-subsystem",
"polkadot-node-subsystem-util", "polkadot-node-subsystem-util",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-primitives", "polkadot-primitives",
"sp-maybe-compressed-blob", "sp-maybe-compressed-blob",
"tracing-gum", "tracing-gum",
@@ -7515,7 +7438,7 @@ dependencies = [
"pin-project 1.0.10", "pin-project 1.0.10",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-node-subsystem-util", "polkadot-node-subsystem-util",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"rand 0.8.5", "rand 0.8.5",
"sc-executor", "sc-executor",
"sc-executor-common", "sc-executor-common",
@@ -7629,7 +7552,7 @@ dependencies = [
"bounded-vec", "bounded-vec",
"futures 0.3.21", "futures 0.3.21",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-primitives", "polkadot-primitives",
"schnorrkel", "schnorrkel",
"serde", "serde",
@@ -7790,6 +7713,83 @@ dependencies = [
"sp-std", "sp-std",
] ]
[[package]]
name = "polkadot-parachain"
version = "0.9.190"
dependencies = [
"assert_cmd",
"async-trait",
"canvas-kusama-runtime",
"clap 3.1.18",
"cumulus-client-cli",
"cumulus-client-consensus-aura",
"cumulus-client-consensus-common",
"cumulus-client-consensus-relay-chain",
"cumulus-client-network",
"cumulus-client-service",
"cumulus-primitives-core",
"cumulus-primitives-parachain-inherent",
"cumulus-relay-chain-inprocess-interface",
"cumulus-relay-chain-interface",
"cumulus-relay-chain-rpc-interface",
"frame-benchmarking",
"frame-benchmarking-cli",
"futures 0.3.21",
"hex-literal",
"jsonrpsee",
"log",
"nix 0.24.1",
"pallet-contracts-rpc",
"pallet-transaction-payment-rpc",
"parachains-common",
"parity-scale-codec",
"polkadot-cli",
"polkadot-parachain 0.9.19",
"polkadot-primitives",
"polkadot-service",
"rococo-parachain-runtime",
"sc-basic-authorship",
"sc-chain-spec",
"sc-cli",
"sc-client-api",
"sc-consensus",
"sc-executor",
"sc-network",
"sc-rpc",
"sc-service",
"sc-sysinfo",
"sc-telemetry",
"sc-tracing",
"sc-transaction-pool",
"sc-transaction-pool-api",
"seedling-runtime",
"serde",
"shell-runtime",
"sp-api",
"sp-block-builder",
"sp-blockchain",
"sp-consensus",
"sp-consensus-aura",
"sp-core",
"sp-inherents",
"sp-io",
"sp-keystore",
"sp-offchain",
"sp-runtime",
"sp-session",
"sp-timestamp",
"sp-transaction-pool",
"statemine-runtime",
"statemint-runtime",
"substrate-build-script-utils",
"substrate-frame-rpc-system",
"substrate-prometheus-endpoint",
"tempfile",
"try-runtime-cli",
"westmint-runtime",
"xcm",
]
[[package]] [[package]]
name = "polkadot-performance-test" name = "polkadot-performance-test"
version = "0.9.19" version = "0.9.19"
@@ -7816,7 +7816,7 @@ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"parity-util-mem", "parity-util-mem",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"scale-info", "scale-info",
"serde", "serde",
"sp-api", "sp-api",
@@ -8114,7 +8114,7 @@ dependencies = [
"polkadot-node-subsystem", "polkadot-node-subsystem",
"polkadot-node-subsystem-util", "polkadot-node-subsystem-util",
"polkadot-overseer", "polkadot-overseer",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-primitives", "polkadot-primitives",
"polkadot-rpc", "polkadot-rpc",
"polkadot-runtime", "polkadot-runtime",
@@ -8256,7 +8256,7 @@ dependencies = [
"pallet-vesting", "pallet-vesting",
"pallet-xcm", "pallet-xcm",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-primitives", "polkadot-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
@@ -8303,7 +8303,7 @@ dependencies = [
"polkadot-node-primitives", "polkadot-node-primitives",
"polkadot-node-subsystem", "polkadot-node-subsystem",
"polkadot-overseer", "polkadot-overseer",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-primitives", "polkadot-primitives",
"polkadot-rpc", "polkadot-rpc",
"polkadot-runtime-common", "polkadot-runtime-common",
@@ -8982,7 +8982,7 @@ dependencies = [
"parachain-info", "parachain-info",
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"scale-info", "scale-info",
"serde", "serde",
"sp-api", "sp-api",
@@ -9050,7 +9050,7 @@ dependencies = [
"pallet-utility", "pallet-utility",
"pallet-xcm", "pallet-xcm",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-primitives", "polkadot-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
@@ -11575,7 +11575,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-runtime-common", "polkadot-runtime-common",
"scale-info", "scale-info",
"serde", "serde",
@@ -11641,7 +11641,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-runtime-common", "polkadot-runtime-common",
"polkadot-runtime-constants", "polkadot-runtime-constants",
"scale-info", "scale-info",
@@ -13070,7 +13070,7 @@ dependencies = [
"pallet-xcm", "pallet-xcm",
"pallet-xcm-benchmarks", "pallet-xcm-benchmarks",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-primitives", "polkadot-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
@@ -13156,7 +13156,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"polkadot-runtime-common", "polkadot-runtime-common",
"scale-info", "scale-info",
"serde", "serde",
@@ -13366,7 +13366,7 @@ dependencies = [
"log", "log",
"pallet-transaction-payment", "pallet-transaction-payment",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain 0.9.19",
"scale-info", "scale-info",
"sp-arithmetic", "sp-arithmetic",
"sp-io", "sp-io",
+17 -17
View File
@@ -33,7 +33,7 @@ and treat as best.
### Collator ### Collator
A Polkadot [collator](https://wiki.polkadot.network/docs/en/learn-collator) for the parachain is A Polkadot [collator](https://wiki.polkadot.network/docs/en/learn-collator) for the parachain is
implemented by the `polkadot-collator` binary. implemented by the `polkadot-parachain` binary (previously called `polkadot-collator`).
## Statemint 🪙 ## Statemint 🪙
@@ -44,17 +44,17 @@ Statemint is a common good parachain providing an asset store for the Polkadot e
### Build & Launch a Node ### Build & Launch a Node
To run a Statemine or Westmint node (Statemint is not deployed, yet) you will need to compile the To run a Statemine or Westmint node (Statemint is not deployed, yet) you will need to compile the
`polkadot-collator` binary: `polkadot-parachain` binary:
```bash ```bash
cargo build --release --locked -p polkadot-collator cargo build --release --locked -p polkadot-parachain
``` ```
Once the executable is built, launch the parachain node via: Once the executable is built, launch the parachain node via:
```bash ```bash
CHAIN=westmint # or statemine CHAIN=westmint # or statemine
./target/release/polkadot-collator --chain $CHAIN ./target/release/polkadot-parachain --chain $CHAIN
``` ```
Refer to the [setup instructions below](#local-setup) to run a local network for development. Refer to the [setup instructions below](#local-setup) to run a local network for development.
@@ -105,16 +105,16 @@ If you are looking for a quickstart, we can recommend
### Build & Launch a Node ### Build & Launch a Node
To run a Canvas node that connects to Rococo (Kusama and Polkadot parachains are not deployed, yet) To run a Canvas node that connects to Rococo (Kusama and Polkadot parachains are not deployed, yet)
you will need to compile the `polkadot-collator` binary: you will need to compile the `polkadot-parachain` binary:
```bash ```bash
cargo build --release --locked -p polkadot-collator cargo build --release --locked -p polkadot-parachain
``` ```
Once the executable is built, launch the parachain node via: Once the executable is built, launch the parachain node via:
```bash ```bash
./target/release/polkadot-collator --chain rocanvas ./target/release/polkadot-parachain --chain rocanvas
``` ```
Refer to the [setup instructions below](#local-setup) to run a local network for development. Refer to the [setup instructions below](#local-setup) to run a local network for development.
@@ -164,7 +164,7 @@ eventually be included by the relay chain for a parachain.
To run a Rococo collator you will need to compile the following binary: To run a Rococo collator you will need to compile the following binary:
```bash ```bash
cargo build --release --locked -p polkadot-collator cargo build --release --locked -p polkadot-parachain
``` ```
Otherwise you can compile it with Otherwise you can compile it with
@@ -173,7 +173,7 @@ Otherwise you can compile it with
```bash ```bash
docker run --rm -it -w /shellhere/cumulus \ docker run --rm -it -w /shellhere/cumulus \
-v $(pwd):/shellhere/cumulus \ -v $(pwd):/shellhere/cumulus \
paritytech/ci-linux:production cargo build --release --locked -p polkadot-collator paritytech/ci-linux:production cargo build --release --locked -p polkadot-parachain
sudo chown -R $(id -u):$(id -g) target/ sudo chown -R $(id -u):$(id -g) target/
``` ```
@@ -184,7 +184,7 @@ Once the executable is built, launch collators for each parachain (repeat once e
`tick`, `trick`, `track`): `tick`, `trick`, `track`):
```bash ```bash
./target/release/polkadot-collator --chain $CHAIN --validator ./target/release/polkadot-parachain --chain $CHAIN --validator
``` ```
### Parachains ### Parachains
@@ -232,19 +232,19 @@ cd cumulus
cargo build --release cargo build --release
# Export genesis state # Export genesis state
./target/release/polkadot-collator export-genesis-state > genesis-state ./target/release/polkadot-parachain export-genesis-state > genesis-state
# Export genesis wasm # Export genesis wasm
./target/release/polkadot-collator export-genesis-wasm > genesis-wasm ./target/release/polkadot-parachain export-genesis-wasm > genesis-wasm
# Collator1 # Collator1
./target/release/polkadot-collator --collator --alice --force-authoring --tmp --port 40335 --ws-port 9946 -- --execution wasm --chain ../polkadot/rococo-local-cfde.json --port 30335 ./target/release/polkadot-parachain --collator --alice --force-authoring --tmp --port 40335 --ws-port 9946 -- --execution wasm --chain ../polkadot/rococo-local-cfde.json --port 30335
# Collator2 # Collator2
./target/release/polkadot-collator --collator --bob --force-authoring --tmp --port 40336 --ws-port 9947 -- --execution wasm --chain ../polkadot/rococo-local-cfde.json --port 30336 ./target/release/polkadot-parachain --collator --bob --force-authoring --tmp --port 40336 --ws-port 9947 -- --execution wasm --chain ../polkadot/rococo-local-cfde.json --port 30336
# Parachain Full Node 1 # Parachain Full Node 1
./target/release/polkadot-collator --tmp --port 40337 --ws-port 9948 -- --execution wasm --chain ../polkadot/rococo-local-cfde.json --port 30337 ./target/release/polkadot-parachain --tmp --port 40337 --ws-port 9948 -- --execution wasm --chain ../polkadot/rococo-local-cfde.json --port 30337
``` ```
#### Register the parachain #### Register the parachain
@@ -253,7 +253,7 @@ cargo build --release
### Containerize ### Containerize
After building `polkadot-collator` with cargo or with Parity CI image as documented in [this chapter](#build--launch-rococo-collators), After building `polkadot-parachain` with cargo or with Parity CI image as documented in [this chapter](#build--launch-rococo-collators),
the following will allow producing a new docker image where the compiled binary is injected: the following will allow producing a new docker image where the compiled binary is injected:
```bash ```bash
@@ -263,7 +263,7 @@ the following will allow producing a new docker image where the compiled binary
Alternatively, you can build an image with a builder pattern: Alternatively, you can build an image with a builder pattern:
```bash ```bash
docker build --tag $OWNER/$IMAGE_NAME --file ./docker/polkadot-collator_builder.Containerfile . docker build --tag $OWNER/$IMAGE_NAME --file ./docker/polkadot-parachain_builder.Containerfile .
You may then run your new container: You may then run your new container:
+1 -1
View File
@@ -66,7 +66,7 @@ services:
volumes: volumes:
- "genesis-state:/data" - "genesis-state:/data"
command: > command: >
polkadot-collator polkadot-parachain
export-genesis-state export-genesis-state
/data/genesis-state /data/genesis-state
+6 -6
View File
@@ -34,18 +34,18 @@ RUN apt-get update && \
ln -s /data /polkadot/.local/share/polkadot && \ ln -s /data /polkadot/.local/share/polkadot && \
mkdir -p /specs mkdir -p /specs
# add polkadot-collator binary to the docker image # add polkadot-parachain binary to the docker image
COPY ./target/release/polkadot-collator /usr/local/bin COPY ./target/release/polkadot-parachain /usr/local/bin
COPY ./target/release/polkadot-collator.asc /usr/local/bin COPY ./target/release/polkadot-parachain.asc /usr/local/bin
COPY ./target/release/polkadot-collator.sha256 /usr/local/bin COPY ./target/release/polkadot-parachain.sha256 /usr/local/bin
COPY ./polkadot-parachains/res/*.json /specs/ COPY ./polkadot-parachains/res/*.json /specs/
USER polkadot USER polkadot
# check if executable works in this container # check if executable works in this container
RUN /usr/local/bin/polkadot-collator --version RUN /usr/local/bin/polkadot-parachain --version
EXPOSE 30333 9933 9944 EXPOSE 30333 9933 9944
VOLUME ["/polkadot"] VOLUME ["/polkadot"]
ENTRYPOINT ["/usr/local/bin/polkadot-collator"] ENTRYPOINT ["/usr/local/bin/polkadot-parachain"]
@@ -1,11 +1,11 @@
# This file is sourced from https://github.com/paritytech/polkadot/blob/master/scripts/ci/dockerfiles/polkadot/polkadot_builder.Dockerfile # This file is sourced from https://github.com/paritytech/polkadot/blob/master/scripts/ci/dockerfiles/polkadot/polkadot_builder.Dockerfile
# This is the build stage for Polkadot-collator. Here we create the binary in a temporary image. # This is the build stage for polkadot-parachain. Here we create the binary in a temporary image.
FROM docker.io/paritytech/ci-linux:production as builder FROM docker.io/paritytech/ci-linux:production as builder
WORKDIR /cumulus WORKDIR /cumulus
COPY . /cumulus COPY . /cumulus
RUN cargo build --release --locked -p polkadot-collator RUN cargo build --release --locked -p polkadot-parachain
# This is the 2nd stage: a very small image where we copy the Polkadot binary." # This is the 2nd stage: a very small image where we copy the Polkadot binary."
FROM docker.io/library/ubuntu:20.04 FROM docker.io/library/ubuntu:20.04
@@ -13,24 +13,24 @@ FROM docker.io/library/ubuntu:20.04
LABEL io.parity.image.type="builder" \ LABEL io.parity.image.type="builder" \
io.parity.image.authors="devops-team@parity.io" \ io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \ io.parity.image.vendor="Parity Technologies" \
io.parity.image.description="Multistage Docker image for Polkadot-collator" \ io.parity.image.description="Multistage Docker image for polkadot-parachain" \
io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/ci/dockerfiles/polkadot/polkadot-collator_builder.Dockerfile" \ io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/ci/dockerfiles/polkadot/polkadot-parachain_builder.Dockerfile" \
io.parity.image.documentation="https://github.com/paritytech/cumulus" io.parity.image.documentation="https://github.com/paritytech/cumulus"
COPY --from=builder /cumulus/target/release/polkadot-collator /usr/local/bin COPY --from=builder /cumulus/target/release/polkadot-parachain /usr/local/bin
RUN useradd -m -u 1000 -U -s /bin/sh -d /cumulus polkadot-collator && \ RUN useradd -m -u 1000 -U -s /bin/sh -d /cumulus polkadot-parachain && \
mkdir -p /data /cumulus/.local/share && \ mkdir -p /data /cumulus/.local/share && \
chown -R polkadot-collator:polkadot-collator /data && \ chown -R polkadot-parachain:polkadot-parachain /data && \
ln -s /data /cumulus/.local/share/polkadot-collator && \ ln -s /data /cumulus/.local/share/polkadot-parachain && \
# unclutter and minimize the attack surface # unclutter and minimize the attack surface
rm -rf /usr/bin /usr/sbin && \ rm -rf /usr/bin /usr/sbin && \
# check if executable works in this container # check if executable works in this container
/usr/local/bin/polkadot-collator --version /usr/local/bin/polkadot-parachain --version
USER polkadot-collator USER polkadot-parachain
EXPOSE 30333 9933 9944 9615 EXPOSE 30333 9933 9944 9615
VOLUME ["/data"] VOLUME ["/data"]
ENTRYPOINT ["/usr/local/bin/polkadot-collator"] ENTRYPOINT ["/usr/local/bin/polkadot-parachain"]
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
OWNER=${OWNER:-parity} OWNER=${OWNER:-parity}
IMAGE_NAME=${IMAGE_NAME:-polkadot-collator} IMAGE_NAME=${IMAGE_NAME:-polkadot-parachain}
docker build --no-cache --build-arg IMAGE_NAME=$IMAGE_NAME -t $OWNER/$IMAGE_NAME -f ./docker/injected.Dockerfile . docker build --no-cache --build-arg IMAGE_NAME=$IMAGE_NAME -t $OWNER/$IMAGE_NAME -f ./docker/injected.Dockerfile .
docker images | grep $IMAGE_NAME docker images | grep $IMAGE_NAME
+2 -2
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# this script runs the polkadot-collator after fetching # this script runs the polkadot-parachain after fetching
# appropriate bootnode IDs # appropriate bootnode IDs
# #
# this is _not_ a general-purpose script; it is closely tied to the # this is _not_ a general-purpose script; it is closely tied to the
@@ -8,7 +8,7 @@
set -e -o pipefail set -e -o pipefail
ctpc="/usr/bin/polkadot-collator" ctpc="/usr/bin/polkadot-parachain"
if [ ! -x "$ctpc" ]; then if [ ! -x "$ctpc" ]; then
echo "FATAL: $ctpc does not exist or is not executable" echo "FATAL: $ctpc does not exist or is not executable"
+4 -4
View File
@@ -4,7 +4,7 @@ FROM docker.io/paritytech/ci-linux:production as builder
WORKDIR /cumulus WORKDIR /cumulus
COPY . /cumulus COPY . /cumulus
RUN cargo build --release --locked -p polkadot-collator RUN cargo build --release --locked -p polkadot-parachain
# the collator stage is normally built once, cached, and then ignored, but can # the collator stage is normally built once, cached, and then ignored, but can
# be specified with the --target build flag. This adds some extra tooling to the # be specified with the --target build flag. This adds some extra tooling to the
@@ -23,7 +23,7 @@ RUN apt-get update && apt-get install jq curl bash -y && \
npm install --global yarn && \ npm install --global yarn && \
yarn global add @polkadot/api-cli@0.10.0-beta.14 yarn global add @polkadot/api-cli@0.10.0-beta.14
COPY --from=builder \ COPY --from=builder \
/paritytech/cumulus/target/release/polkadot-collator /usr/bin /paritytech/cumulus/target/release/polkadot-parachain /usr/bin
COPY ./docker/scripts/inject_bootnodes.sh /usr/bin COPY ./docker/scripts/inject_bootnodes.sh /usr/bin
CMD ["/usr/bin/inject_bootnodes.sh"] CMD ["/usr/bin/inject_bootnodes.sh"]
COPY ./docker/scripts/healthcheck.sh /usr/bin/ COPY ./docker/scripts/healthcheck.sh /usr/bin/
@@ -41,6 +41,6 @@ CMD ["cp", "-v", "/var/opt/cumulus_test_parachain_runtime.compact.wasm", "/runti
FROM debian:buster-slim FROM debian:buster-slim
COPY --from=builder \ COPY --from=builder \
/paritytech/cumulus/target/release/polkadot-collator /usr/bin /paritytech/cumulus/target/release/polkadot-parachain /usr/bin
CMD ["/usr/bin/polkadot-collator"] CMD ["/usr/bin/polkadot-parachain"]
+4 -3
View File
@@ -1,12 +1,13 @@
[package] [package]
name = "polkadot-collator" name = "polkadot-parachain"
version = "5.4.0" version = "0.9.190"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
build = "build.rs" build = "build.rs"
edition = "2021" edition = "2021"
description = "Runs a polkadot parachain node which could be a collator."
[[bin]] [[bin]]
name = "polkadot-collator" name = "polkadot-parachain"
path = "src/main.rs" path = "src/main.rs"
[dependencies] [dependencies]
+4 -4
View File
@@ -167,7 +167,7 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, St
impl SubstrateCli for Cli { impl SubstrateCli for Cli {
fn impl_name() -> String { fn impl_name() -> String {
"Polkadot collator".into() "Polkadot parachain".into()
} }
fn impl_version() -> String { fn impl_version() -> String {
@@ -176,7 +176,7 @@ impl SubstrateCli for Cli {
fn description() -> String { fn description() -> String {
format!( format!(
"Polkadot collator\n\nThe command-line arguments provided first will be \ "Polkadot parachain\n\nThe command-line arguments provided first will be \
passed to the parachain node, while the arguments provided after -- will be passed \ passed to the parachain node, while the arguments provided after -- will be passed \
to the relaychain node.\n\n\ to the relaychain node.\n\n\
{} [parachain-args] -- [relaychain-args]", {} [parachain-args] -- [relaychain-args]",
@@ -221,7 +221,7 @@ impl SubstrateCli for Cli {
impl SubstrateCli for RelayChainCli { impl SubstrateCli for RelayChainCli {
fn impl_name() -> String { fn impl_name() -> String {
"Polkadot collator".into() "Polkadot parachain".into()
} }
fn impl_version() -> String { fn impl_version() -> String {
@@ -230,7 +230,7 @@ impl SubstrateCli for RelayChainCli {
fn description() -> String { fn description() -> String {
format!( format!(
"Polkadot collator\n\nThe command-line arguments provided first will be \ "Polkadot parachain\n\nThe command-line arguments provided first will be \
passed to the parachain node, while the arguments provided after -- will be passed \ passed to the parachain node, while the arguments provided after -- will be passed \
to the relay chain node.\n\n\ to the relay chain node.\n\n\
{} [parachain-args] -- [relay_chain-args]", {} [parachain-args] -- [relay_chain-args]",
@@ -28,7 +28,7 @@ fn benchmark_storage_works() {
/// Invoke the `benchmark storage` sub-command for the given database and runtime. /// Invoke the `benchmark storage` sub-command for the given database and runtime.
fn benchmark_storage(db: &str, runtime: &str, base_path: &Path) -> ExitStatus { fn benchmark_storage(db: &str, runtime: &str, base_path: &Path) -> ExitStatus {
Command::new(cargo_bin("polkadot-collator")) Command::new(cargo_bin("polkadot-parachain"))
.args(&["benchmark", "storage", "--chain", runtime]) .args(&["benchmark", "storage", "--chain", runtime])
.arg("--db") .arg("--db")
.arg(db) .arg(db)
@@ -33,7 +33,7 @@ fn polkadot_argument_parsing() {
fn run_command_and_kill(signal: Signal) { fn run_command_and_kill(signal: Signal) {
let _ = fs::remove_dir_all("polkadot_argument_parsing"); let _ = fs::remove_dir_all("polkadot_argument_parsing");
let mut cmd = Command::new(cargo_bin("polkadot-collator")) let mut cmd = Command::new(cargo_bin("polkadot-parachain"))
.args(&[ .args(&[
"-d", "-d",
"polkadot_argument_parsing", "polkadot_argument_parsing",
@@ -33,7 +33,7 @@ fn interrupt_polkadot_mdns_issue_test() {
fn run_command_and_kill(signal: Signal) { fn run_command_and_kill(signal: Signal) {
let _ = fs::remove_dir_all("interrupt_polkadot_mdns_issue_test"); let _ = fs::remove_dir_all("interrupt_polkadot_mdns_issue_test");
let mut cmd = Command::new(cargo_bin("polkadot-collator")) let mut cmd = Command::new(cargo_bin("polkadot-parachain"))
.args(&["-d", "interrupt_polkadot_mdns_issue_test", "--", "--dev"]) .args(&["-d", "interrupt_polkadot_mdns_issue_test", "--", "--dev"])
.spawn() .spawn()
.unwrap(); .unwrap();
@@ -31,7 +31,7 @@ fn purge_chain_works() {
let base_path = tempfile::tempdir().unwrap(); let base_path = tempfile::tempdir().unwrap();
let mut cmd = Command::new(cargo_bin("polkadot-collator")) let mut cmd = Command::new(cargo_bin("polkadot-parachain"))
.args(&["-d"]) .args(&["-d"])
.arg(base_path.path()) .arg(base_path.path())
.args(&["--", "--dev"]) .args(&["--", "--dev"])
@@ -56,7 +56,7 @@ fn purge_chain_works() {
assert!(base_path.path().join("chains/local_testnet/db/full").exists()); assert!(base_path.path().join("chains/local_testnet/db/full").exists());
assert!(base_path.path().join("polkadot/chains/dev/db/full").exists()); assert!(base_path.path().join("polkadot/chains/dev/db/full").exists());
let status = Command::new(cargo_bin("polkadot-collator")) let status = Command::new(cargo_bin("polkadot-parachain"))
.args(&["purge-chain", "-d"]) .args(&["purge-chain", "-d"])
.arg(base_path.path()) .arg(base_path.path())
.arg("-y") .arg("-y")
@@ -33,7 +33,7 @@ fn running_the_node_works_and_can_be_interrupted() {
fn run_command_and_kill(signal: Signal) { fn run_command_and_kill(signal: Signal) {
let _ = fs::remove_dir_all("interrupt_test"); let _ = fs::remove_dir_all("interrupt_test");
let mut cmd = Command::new(cargo_bin("polkadot-collator")) let mut cmd = Command::new(cargo_bin("polkadot-parachain"))
.args(&["-d", "interrupt_test", "--", "--dev"]) .args(&["-d", "interrupt_test", "--", "--dev"])
.spawn() .spawn()
.unwrap(); .unwrap();
+1 -1
View File
@@ -23,7 +23,7 @@ pallets=(
for p in ${pallets[@]} for p in ${pallets[@]}
do do
./artifacts/polkadot-collator benchmark pallet \ ./artifacts/polkadot-parachain benchmark pallet \
--chain=$benhcmarkChainName \ --chain=$benhcmarkChainName \
--execution=wasm \ --execution=wasm \
--wasm-execution=compiled \ --wasm-execution=compiled \
+3 -3
View File
@@ -27,7 +27,7 @@ pallets=(
for p in ${pallets[@]} for p in ${pallets[@]}
do do
./target/production/polkadot-collator benchmark pallet \ ./target/production/polkadot-parachain benchmark pallet \
--chain=$statemineChain \ --chain=$statemineChain \
--execution=wasm \ --execution=wasm \
--wasm-execution=compiled \ --wasm-execution=compiled \
@@ -39,7 +39,7 @@ do
--header=./file_header.txt \ --header=./file_header.txt \
--output=$statemineOutput --output=$statemineOutput
./target/production/polkadot-collator benchmark pallet \ ./target/production/polkadot-parachain benchmark pallet \
--chain=$statemintChain \ --chain=$statemintChain \
--execution=wasm \ --execution=wasm \
--wasm-execution=compiled \ --wasm-execution=compiled \
@@ -51,7 +51,7 @@ do
--header=./file_header.txt \ --header=./file_header.txt \
--output=$statemintOutput --output=$statemintOutput
./target/production/polkadot-collator benchmark pallet \ ./target/production/polkadot-parachain benchmark pallet \
--chain=$westmintChain \ --chain=$westmintChain \
--execution=wasm \ --execution=wasm \
--wasm-execution=compiled \ --wasm-execution=compiled \
@@ -1,11 +1,11 @@
<!-- <!--
## Docker images ## Docker images
The docker image for this release can be found in [Docker hub](https://hub.docker.com/r/parity/polkadot-collator/tags?page=1&ordering=last_updated). The docker image for this release can be found in [Docker hub](https://hub.docker.com/r/parity/polkadot-parachain/tags?page=1&ordering=last_updated).
You may also pull it with: You may also pull it with:
``` ```
docker pull parity/polkadot-collator:latest docker pull parity/polkadot-parachain:latest
``` ```
--> -->
+1 -1
View File
@@ -26,7 +26,7 @@ sudo=$8
[ -z "$para_$id" ] && usage [ -z "$para_$id" ] && usage
[ -z "$sudo" ] && usage [ -z "$sudo" ] && usage
binary="./target/release/polkadot-collator" binary="./target/release/polkadot-parachain"
# build the chain spec we'll manipulate # build the chain spec we'll manipulate
$binary build-spec --disable-default-bootnode --chain seedling > seedling-spec-plain.json $binary build-spec --disable-default-bootnode --chain seedling > seedling-spec-plain.json
+1 -1
View File
@@ -10,7 +10,7 @@ set -e
rt_path=$1 rt_path=$1
binary="./target/release/polkadot-collator" binary="./target/release/polkadot-parachain"
# build the chain spec we'll manipulate # build the chain spec we'll manipulate
$binary build-spec --chain shell > shell-spec-plain.json $binary build-spec --chain shell > shell-spec-plain.json
+2 -2
View File
@@ -27,7 +27,7 @@ chain_spec_summary() {
} }
check_collator() { check_collator() {
BIN=target/release/polkadot-collator BIN=target/release/polkadot-parachain
if [ -f $BIN ]; then if [ -f $BIN ]; then
echo "✅ Collator binary found:" echo "✅ Collator binary found:"
$BIN --version $BIN --version
@@ -58,7 +58,7 @@ if [[ "$rpc_endpoint" =~ "localhost" ]]; then
check_collator check_collator
echo -e "Make sure you have a collator running with the correct version at $rpc_endpoint." echo -e "Make sure you have a collator running with the correct version at $rpc_endpoint."
echo -e "If you don't, NOW is the time to start it with:" echo -e "If you don't, NOW is the time to start it with:"
echo -e "target/release/polkadot-collator --chain polkadot-parachains/res/shell-statemint.json --tmp\n" echo -e "target/release/polkadot-parachain --chain polkadot-parachains/res/shell-statemint.json --tmp\n"
read -p "You can abort with CTRL+C if this is not correct, otherwise press ENTER " read -p "You can abort with CTRL+C if this is not correct, otherwise press ENTER "
fi fi