Skip to content

Commit

Permalink
Merge pull request #816 from UniqueNetwork/release-v936050
Browse files Browse the repository at this point in the history
Release v936050
  • Loading branch information
kozyrevdev authored Jan 24, 2023
2 parents 3105d4f + 24d3f67 commit f100074
Show file tree
Hide file tree
Showing 257 changed files with 14,980 additions and 9,063 deletions.
6 changes: 1 addition & 5 deletions .docker/Dockerfile-chain-dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM uniquenetwork/services:latest

ARG RUST_TOOLCHAIN
ARG NETWORK
Expand All @@ -11,10 +11,6 @@ ENV PATH="/cargo-home/bin:$PATH"

RUN echo "$NETWORK\n" && echo "$RUST_TOOLCHAIN\n"

RUN apt-get update && apt-get install -y git curl libssl-dev llvm pkg-config libclang-dev clang git make cmake protobuf-compiler

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none

RUN rustup toolchain uninstall $(rustup toolchain list) && \
rustup toolchain install $RUST_TOOLCHAIN && \
rustup default $RUST_TOOLCHAIN && \
Expand Down
8 changes: 1 addition & 7 deletions .docker/Dockerfile-chain-dev-unit
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
FROM ubuntu:20.04
FROM uniquenetwork/services:latest

ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC

RUN apt-get update && apt-get install -y git curl libssl-dev llvm pkg-config libclang-dev clang git make cmake protobuf-compiler

ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none

ARG RUST_TOOLCHAIN
ARG NETWORK

Expand Down
74 changes: 74 additions & 0 deletions .docker/Dockerfile-collators
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
ARG POLKADOT_BUILD_BRANCH
FROM uniquenetwork/builder-polkadot:${POLKADOT_BUILD_BRANCH} as polkadot

# ===== Rust builder =====
FROM uniquenetwork/services:latest as rust-builder
ARG RUST_TOOLCHAIN=

ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN
ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"
ENV TZ=UTC

RUN rustup toolchain uninstall $(rustup toolchain list) && \
rustup toolchain install $RUST_TOOLCHAIN && \
rustup default $RUST_TOOLCHAIN && \
rustup target list --installed && \
rustup show
RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN

RUN mkdir /unique_parachain
WORKDIR /unique_parachain

# ===== BUILD ======
FROM rust-builder as builder-unique

ARG PROFILE=release
ARG NETWORK
ARG POLKADOT_LAUNCH_BRANCH
ARG BRANCH

ENV POLKADOT_LAUNCH_BRANCH $POLKADOT_LAUNCH_BRANCH

WORKDIR /unique_parachain

RUN git clone -b $BRANCH https://github.com/UniqueNetwork/unique-chain.git && \
cd unique-chain && \
cargo build --features=$NETWORK-runtime --$PROFILE

# ===== RUN ======

FROM ubuntu:20.04

RUN apt-get -y update && \
apt-get -y install curl git && \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \
export NVM_DIR="$HOME/.nvm" && \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
nvm install v16.16.0 && \
nvm use v16.16.0

RUN git clone https://github.com/uniquenetwork/polkadot-launch -b ${POLKADOT_LAUNCH_BRANCH}

RUN export NVM_DIR="$HOME/.nvm" && \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
cd /polkadot-launch && \
npm install --global yarn && \
yarn install

COPY --from=builder-unique /unique_parachain/unique-chain/.docker/testnet-config/launch-config.json /polkadot-launch/launch-config.json
COPY --from=builder-unique /unique_parachain/unique-chain/target/release/unique-collator /unique-chain/target/release/

COPY --from=polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/

EXPOSE 9844
EXPOSE 9944
EXPOSE 9933
EXPOSE 9833
EXPOSE 40333
EXPOSE 30333

CMD export NVM_DIR="$HOME/.nvm" && \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
cd /polkadot-launch && \
yarn start launch-config.json
15 changes: 2 additions & 13 deletions .docker/Dockerfile-parachain
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,13 @@ ARG POLKADOT_BUILD_BRANCH
FROM uniquenetwork/builder-polkadot:${POLKADOT_BUILD_BRANCH} as polkadot

# ===== Rust builder =====
FROM ubuntu:20.04 as rust-builder
LABEL maintainer="Unique.Network"

FROM uniquenetwork/services:latest as rust-builder
ARG RUST_TOOLCHAIN=
ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN

ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && \
apt-get install -y curl cmake pkg-config libssl-dev git clang protobuf-compiler && \
apt-get clean && \
rm -r /var/lib/apt/lists/*

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none

RUN rustup toolchain uninstall $(rustup toolchain list) && \
rustup toolchain install $RUST_TOOLCHAIN && \
rustup default $RUST_TOOLCHAIN && \
Expand All @@ -43,7 +32,7 @@ RUN echo "NETWORK="${NETWORK}

WORKDIR /unique_parachain

RUN git clone $REPO_URL -b $BRANCH . && \
RUN git clone https://github.com/UniqueNetwork/unique-chain.git -b $BRANCH . && \
cargo build --features=${NETWORK}-runtime --$PROFILE

# ===== RUN ======
Expand Down
13 changes: 1 addition & 12 deletions .docker/Dockerfile-parachain-node-only
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,13 @@ ARG POLKADOT_BUILD_BRANCH
FROM uniquenetwork/builder-polkadot:${POLKADOT_BUILD_BRANCH} as polkadot

# ===== Rust builder =====
FROM ubuntu:20.04 as rust-builder
LABEL maintainer="Unique.Network"
FROM uniquenetwork/services:latest as rust-builder

ARG RUST_TOOLCHAIN=

ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN
ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && \
apt-get install -y curl cmake pkg-config libssl-dev git clang protobuf-compiler && \
apt-get clean && \
rm -r /var/lib/apt/lists/*

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none

RUN rustup toolchain uninstall $(rustup toolchain list) && \
rustup toolchain install $RUST_TOOLCHAIN && \
rustup default $RUST_TOOLCHAIN && \
Expand Down
12 changes: 1 addition & 11 deletions .docker/Dockerfile-parachain-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,14 @@ ARG POLKADOT_BUILD_BRANCH
FROM uniquenetwork/builder-polkadot:${POLKADOT_BUILD_BRANCH} as polkadot

# ===== Rust builder =====
FROM ubuntu:20.04 as rust-builder
LABEL maintainer="Unique.Network"
FROM uniquenetwork/services:latest as rust-builder

ARG RUST_TOOLCHAIN=

ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN
ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && \
apt-get install -y curl cmake pkg-config libssl-dev git clang protobuf-compiler && \
apt-get clean && \
rm -r /var/lib/apt/lists/*

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none

RUN rustup toolchain uninstall $(rustup toolchain list) && \
rustup toolchain install $RUST_TOOLCHAIN && \
rustup default $RUST_TOOLCHAIN && \
Expand Down
12 changes: 1 addition & 11 deletions .docker/Dockerfile-parachain-upgrade-data
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,13 @@ ARG POLKADOT_BUILD_BRANCH
FROM uniquenetwork/builder-polkadot:${POLKADOT_BUILD_BRANCH} as polkadot

# ===== Rust builder =====
FROM ubuntu:20.04 as rust-builder
LABEL maintainer="Unique.Network"

FROM uniquenetwork/services:latest as rust-builder
ARG RUST_TOOLCHAIN=

ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN
ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && \
apt-get install -y curl cmake pkg-config libssl-dev git clang protobuf-compiler && \
apt-get clean && \
rm -r /var/lib/apt/lists/*

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none

RUN rustup toolchain uninstall $(rustup toolchain list) && \
rustup toolchain install $RUST_TOOLCHAIN && \
Expand Down
13 changes: 3 additions & 10 deletions .docker/Dockerfile-testnet.j2
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
# ===== Rust builder =====
FROM ubuntu:20.04 as rust-builder
LABEL maintainer="Unique.Network"
FROM uniquenetwork/services:latest as rust-builder
ARG RUST_TOOLCHAIN=

ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN
ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && \
apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \
apt-get clean && \
rm -r /var/lib/apt/lists/*

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none

RUN rustup toolchain uninstall $(rustup toolchain list) && \
rustup toolchain install {{ RUST_TOOLCHAIN }} && \
Expand Down
12 changes: 1 addition & 11 deletions .docker/Dockerfile-try-runtime
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
# ===== Rust builder =====
FROM ubuntu:20.04 as rust-builder
LABEL maintainer="Unique.Network"
FROM uniquenetwork/services:latest as rust-builder

ARG RUST_TOOLCHAIN

ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN
ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone


RUN apt-get update && \
apt-get install -y curl cmake pkg-config libssl-dev git clang protobuf-compiler && \
apt-get clean && \
rm -r /var/lib/apt/lists/*

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none

RUN rustup toolchain uninstall $(rustup toolchain list) && \
rustup toolchain install $RUST_TOOLCHAIN && \
Expand Down
12 changes: 1 addition & 11 deletions .docker/Dockerfile-xcm.j2
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
# ===== Rust builder =====
FROM ubuntu:20.04 as rust-builder
LABEL maintainer="Unique.Network"

FROM uniquenetwork/services:latest as rust-builder
ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && \
apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \
apt-get clean && \
rm -r /var/lib/apt/lists/*

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none

RUN rustup toolchain uninstall $(rustup toolchain list) && \
rustup toolchain install {{ RUST_TOOLCHAIN }} && \
Expand Down
25 changes: 25 additions & 0 deletions .docker/docker-compose.tmp-collators.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: "3.5"

services:
parachain-collators:
build:
args:
- "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}"
- "POLKADOT_BUILD_BRANCH={{ POLKADOT_BUILD_BRANCH }}"
- "POLKADOT_LAUNCH_BRANCH={{ POLKADOT_LAUNCH_BRANCH }}"
- "NETWORK={{ NETWORK }}"
- "BRANCH={{ BRANCH }}"
context: ../
dockerfile: .docker/Dockerfile-parachain
image: parachain-collators
container_name: parachain-collators
expose:
- 9944
- 9933
ports:
- 127.0.0.1:9944:9944
- 127.0.0.1:9933:9933
logging:
options:
max-size: "1m"
max-file: "3"
4 changes: 2 additions & 2 deletions .docker/forkless-config/launch-config-forkless-data.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"relaychain": {
"bin": "/polkadot/target/release/polkadot",
"upgradeBin": "/polkadot/target/release/polkadot",
"upgradeWasm": "/polkadot/target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm",
"chain": "westend-local",
"upgradeWasm": "/polkadot/target/release/wbuild/{{ RELAY_CHAIN_TYPE }}-runtime/{{ RELAY_CHAIN_TYPE }}_runtime.compact.compressed.wasm",
"chain": "{{ RELAY_CHAIN_TYPE }}-local",
"nodes": [
{
"name": "alice",
Expand Down
4 changes: 2 additions & 2 deletions .docker/forkless-config/launch-config-forkless-nodata.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"relaychain": {
"bin": "/polkadot/target/release/polkadot",
"upgradeBin": "/polkadot/target/release/polkadot",
"upgradeWasm": "/polkadot/target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm",
"chain": "westend-local",
"upgradeWasm": "/polkadot/target/release/wbuild/{{ RELAY_CHAIN_TYPE }}-runtime/{{ RELAY_CHAIN_TYPE }}_runtime.compact.compressed.wasm",
"chain": "{{ RELAY_CHAIN_TYPE }}-local",
"nodes": [
{
"name": "alice",
Expand Down
Loading

0 comments on commit f100074

Please sign in to comment.