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
@@ -66,7 +66,7 @@ services:
volumes:
- "genesis-state:/data"
command: >
polkadot-collator
polkadot-parachain
export-genesis-state
/data/genesis-state
+6 -6
View File
@@ -34,18 +34,18 @@ RUN apt-get update && \
ln -s /data /polkadot/.local/share/polkadot && \
mkdir -p /specs
# add polkadot-collator binary to the docker image
COPY ./target/release/polkadot-collator /usr/local/bin
COPY ./target/release/polkadot-collator.asc /usr/local/bin
COPY ./target/release/polkadot-collator.sha256 /usr/local/bin
# add polkadot-parachain binary to the docker image
COPY ./target/release/polkadot-parachain /usr/local/bin
COPY ./target/release/polkadot-parachain.asc /usr/local/bin
COPY ./target/release/polkadot-parachain.sha256 /usr/local/bin
COPY ./polkadot-parachains/res/*.json /specs/
USER polkadot
# 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
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 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
WORKDIR /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."
FROM docker.io/library/ubuntu:20.04
@@ -13,24 +13,24 @@ FROM docker.io/library/ubuntu:20.04
LABEL io.parity.image.type="builder" \
io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.description="Multistage Docker image for Polkadot-collator" \
io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/ci/dockerfiles/polkadot/polkadot-collator_builder.Dockerfile" \
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-parachain_builder.Dockerfile" \
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 && \
chown -R polkadot-collator:polkadot-collator /data && \
ln -s /data /cumulus/.local/share/polkadot-collator && \
chown -R polkadot-parachain:polkadot-parachain /data && \
ln -s /data /cumulus/.local/share/polkadot-parachain && \
# unclutter and minimize the attack surface
rm -rf /usr/bin /usr/sbin && \
# 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
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
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 images | grep $IMAGE_NAME
+2 -2
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# this script runs the polkadot-collator after fetching
# this script runs the polkadot-parachain after fetching
# appropriate bootnode IDs
#
# this is _not_ a general-purpose script; it is closely tied to the
@@ -8,7 +8,7 @@
set -e -o pipefail
ctpc="/usr/bin/polkadot-collator"
ctpc="/usr/bin/polkadot-parachain"
if [ ! -x "$ctpc" ]; then
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
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
# 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 && \
yarn global add @polkadot/api-cli@0.10.0-beta.14
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
CMD ["/usr/bin/inject_bootnodes.sh"]
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
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"]