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

Release v10030071 #1062

Closed
wants to merge 19 commits into from
Closed
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[net]
git-fetch-with-cli = true
3 changes: 3 additions & 0 deletions .docker/Dockerfile-chain-dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM uniquenetwork/services:latest

ARG RUST_TOOLCHAIN
ARG NETWORK
ARG GIT_PRIVATE_CREDENTIALS

ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
Expand All @@ -21,6 +22,8 @@ COPY . /dev_chain

WORKDIR /dev_chain

RUN git config --global url."https://[email protected]".insteadOf ssh://[email protected]

RUN cargo build --profile integration-tests --features=${NETWORK}-runtime,fast-inflation
RUN echo "$NETWORK"

Expand Down
4 changes: 4 additions & 0 deletions .docker/Dockerfile-chain-dev-unit
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ COPY . /dev_chain

WORKDIR /dev_chain

ARG GIT_PRIVATE_CREDENTIALS

RUN git config --global url."https://[email protected]".insteadOf ssh://[email protected]

CMD cargo test --features=limit-testing,tests --workspace
37 changes: 37 additions & 0 deletions .docker/Dockerfile-try-runtime
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ===== Rust builder =====
FROM uniquenetwork/services:latest as rust-builder

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

ARG RUST_TOOLCHAIN
RUN 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 NETWORK
ARG REPLICA_FROM
ARG WASM_NAME
ARG GIT_PRIVATE_CREDENTIALS

COPY . /unique_parachain
WORKDIR /unique_parachain

RUN git config --global url."https://[email protected]".insteadOf ssh://[email protected]

RUN echo "Requested features: $NETWORK-runtime\n" && \
echo "Fork from: $REPLICA_FROM\n" && \
cargo build --features=try-runtime,$NETWORK-runtime --release

CMD cargo run --release --features $NETWORK-runtime,try-runtime -- try-runtime --runtime target/release/wbuild/$WASM_NAME-runtime/$WASM_NAME_runtime.compact.compressed.wasm -lruntime=debug -ltry-runtime::cli=debug on-runtime-upgrade --checks live --uri $REPLICA_FROM
5 changes: 4 additions & 1 deletion .docker/Dockerfile-try-runtime.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ===== Rust builder =====
FROM uniquenetwork/services:latest as rust-builder

ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN
ENV RUST_TOOLCHAIN {{ RUST_TOOLCHAIN }}
ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"
ENV TZ=UTC
Expand All @@ -21,10 +21,13 @@ WORKDIR /unique_parachain
FROM rust-builder as builder-unique

ARG PROFILE=release
ARG GIT_PRIVATE_CREDENTIALS

COPY . /unique_parachain
WORKDIR /unique_parachain

RUN git config --global url."https://[email protected]".insteadOf ssh://[email protected]

RUN echo "Requested features: {{ NETWORK }}-runtime\n" && \
echo "Fork from: {{ REPLICA_FROM }}\n" && \
cargo build --features=try-runtime,{{ NETWORK }}-runtime --release
Expand Down
18 changes: 5 additions & 13 deletions .docker/Dockerfile-unique
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
# ===== Rust builder =====
FROM ubuntu:22.04 as rust-builder
FROM uniquenetwork/services:latest as rust-builder
LABEL maintainer="Unique.Network"

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

ARG RUST_TOOLCHAIN
RUN echo "Using Rust '$RUST_TOOLCHAIN'" && \
rustup toolchain install $RUST_TOOLCHAIN && \
Expand All @@ -32,6 +20,10 @@ WORKDIR /unique_parachain

COPY . unique-chain/

ARG GIT_PRIVATE_CREDENTIALS

RUN git config --global url."https://[email protected]".insteadOf ssh://[email protected]

ARG RUNTIME_FEATURES
# registry for Updating registry. It is safe to cache it, because it only contains references to the dependency files,
# and the caches for the files themselves are set in Cargo.lock, which won't be updated because of --locked flag
Expand Down
1 change: 1 addition & 0 deletions .docker/docker-compose.gov.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
- "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}"
- "NETWORK={{ NETWORK }}"
- "WASM_NAME={{ WASM_NAME }}"
- "GIT_PRIVATE_CREDENTIALS={{ GIT_PRIVATE_CREDENTIALS }}"
context: ../
dockerfile: .docker/Dockerfile-chain-dev
image: node-dev
Expand Down
1 change: 1 addition & 0 deletions .docker/docker-compose.tmp-dev.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
args:
- "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}"
- "NETWORK={{ NETWORK }}"
- "GIT_PRIVATE_CREDENTIALS={{ GIT_PRIVATE_CREDENTIALS }}"
context: ../
dockerfile: .docker/Dockerfile-chain-dev
image: node-dev
Expand Down
1 change: 1 addition & 0 deletions .docker/docker-compose.tmp-unit.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
args:
- "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}"
- "NETWORK={{ NETWORK }}"
- "GIT_PRIVATE_CREDENTIALS={{ GIT_PRIVATE_CREDENTIALS }}"
image: node-dev
container_name: node-dev
logging:
Expand Down
10 changes: 4 additions & 6 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
RUST_TOOLCHAIN=nightly-2023-05-22
POLKADOT_LAUNCH_BRANCH=unique-network
RELAY_CHAIN_TYPE=westend
CHAINQL=v0.4.1
DESTINATION_SPEC_VERSION=v942057
Expand All @@ -9,25 +8,24 @@ STATEMINT_BUILD_BRANCH=release-parachains-v9430
ACALA_BUILD_BRANCH=2.21.0
MOONBEAM_BUILD_BRANCH=runtime-2500
ASTAR_BUILD_BRANCH=v5.18.0
UNIQUE_MAINNET_BRANCH=release-v10010063
UNIQUE_MAINNET_BRANCH=release-v10030070
UNIQUE_REPLICA_FROM=wss://ws.unique.network:443
POLKADEX_BUILD_BRANCH=v1.1.0


KUSAMA_MAINNET_BRANCH=release-v1.0.0
STATEMINE_BUILD_BRANCH=release-parachains-v9430
KARURA_BUILD_BRANCH=xnft-poc
MOONRIVER_BUILD_BRANCH=runtime-2500
SHIDEN_BUILD_BRANCH=v5.18.0
QUARTZ_MAINNET_BRANCH=release-v10010063
QUARTZ_MAINNET_BRANCH=release-v10030070
QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:443

UNIQUEWEST_MAINNET_BRANCH=release-v1.0.0
WESTMINT_BUILD_BRANCH=parachains-v9430
OPAL_MAINNET_BRANCH=release-v10010063
OPAL_MAINNET_BRANCH=release-v10030070
OPAL_REPLICA_FROM=wss://ws-opal.unique.network:443

UNIQUEEAST_MAINNET_BRANCH=release-v1.0.0
SAPPHIRE_MAINNET_BRANCH=release-v10010063
SAPPHIRE_MAINNET_BRANCH=release-v10030070
SAPPHIRE_REPLICA_FROM=wss://ws-sapphire.unique.network:443

4 changes: 3 additions & 1 deletion .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
ref: ${{ github.head_ref }}
- uses: actions/[email protected]
with:
node-version: 18
node-version: 20
- name: Install modules
run: cd js-packages && yarn
- name: Run ESLint
Expand All @@ -61,6 +61,8 @@ jobs:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: wasm32-unknown-unknown
components: rustfmt, clippy
- name: set git configuration
run: git config --global url."https://${{ secrets.GIT_PRIVATE_CREDENTIALS }}@github.com".insteadOf ssh://[email protected]
- name: Run cargo check
run: cargo clippy --features=quartz-runtime,unique-runtime,try-runtime,runtime-benchmarks --tests -- -Dwarnings
env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/collator-selection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,13 @@ jobs:
args: |
--build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }},session-test-timings
--build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
--build-arg GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS}}
dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}

- uses: actions/[email protected]
with:
node-version: 18
node-version: 20

- name: Install baedeker
uses: UniqueNetwork/baedeker-action/setup@built
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/forkless-update-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
args: |
--build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }}
--build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
--build-arg GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS}}
dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}

Expand All @@ -122,7 +123,7 @@ jobs:

- uses: actions/[email protected]
with:
node-version: 18
node-version: 20

- name: Install baedeker
uses: UniqueNetwork/baedeker-action/setup@built
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/forkless-update-nodata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jobs:
args: |
--build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }}
--build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
--build-arg GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS}}
dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}

Expand All @@ -137,7 +138,7 @@ jobs:

- uses: actions/[email protected]
with:
node-version: 18
node-version: 20

- name: Install baedeker
uses: UniqueNetwork/baedeker-action/setup@built
Expand Down Expand Up @@ -173,6 +174,7 @@ jobs:
- name: Run Parallel tests after forkless upgrade
working-directory: js-packages/tests
run: |
yarn
yarn add mochawesome
../scripts/wait_for_first_block.sh
echo "Ready to start tests"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/governance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
NETWORK=${{ matrix.network }}
WASM_NAME=${{ matrix.wasm_name }}
GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS }}

- name: Show build configuration
run: cat .docker/docker-compose.${{ matrix.network }}.yml
Expand All @@ -79,7 +80,7 @@ jobs:

- uses: actions/[email protected]
with:
node-version: 18
node-version: 20

- name: Run tests
working-directory: js-packages/tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/make-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: RUN benchmarking
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/market-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:

- uses: actions/[email protected]
with:
node-version: 18
node-version: 20

- name: Setup TypeScript
working-directory: qa-tests
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/node-only-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ jobs:
args: |
--build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }}
--build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
--build-arg GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS}}
dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}

Expand All @@ -143,7 +144,7 @@ jobs:

- uses: actions/[email protected]
with:
node-version: 18
node-version: 20

- name: Install baedeker
uses: UniqueNetwork/baedeker-action/setup@built
Expand All @@ -165,21 +166,21 @@ jobs:
ephemeral:snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}})

- name: Run Parallel tests before Node Parachain upgrade
working-directory: ${{ matrix.mainnet_branch }}/tests
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
if: success()
run: |
yarn cache clean --all
yarn
yarn add mochawesome
# TODO: Update to new script structure after mainnet will have it
./scripts/wait_for_first_block.sh
../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}

- name: Run Sequential tests before Node Parachain upgrade
if: success() || failure()
working-directory: ${{ matrix.mainnet_branch }}/tests
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
Expand Down Expand Up @@ -213,21 +214,20 @@ jobs:
snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}})

- name: Run Parallel tests after Node Parachain upgrade
working-directory: ${{ matrix.mainnet_branch }}/tests
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
if: success() || failure() # run this step even if previous step failed
run: |
yarn install
yarn add mochawesome
# TODO: Update to new script structure after mainnet will have it
./scripts/wait_for_first_block.sh
../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}

- name: Run Sequential tests after Node Parachain upgrade
if: success() || failure()
working-directory: ${{ matrix.mainnet_branch }}/tests
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/polkadot-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
variables: |
RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
NETWORK=${{ matrix.network }}
GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS }}

- name: Show build configuration
run: cat .docker/docker-compose.${{ matrix.network }}.yml
Expand All @@ -68,7 +69,7 @@ jobs:

- uses: actions/[email protected]
with:
node-version: 18
node-version: 20

# - name: Install jq
# run: sudo apt install jq -y
Expand Down
Loading
Loading