git.delta.rocks / unique-network / refs/commits / 405963f1d11c

difftreelog

Fixing state by the end if day.

Alexander Aksenov2022-08-09parent: #5fb6f23.patch.diff
in: master

6 files changed

modified.docker/Dockerfile-parachain-upgradediffbeforeafterboth
--- a/.docker/Dockerfile-parachain-upgrade
+++ b/.docker/Dockerfile-parachain-upgrade
@@ -11,7 +11,7 @@
 RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
 
 RUN apt-get update && \
-    apt-get install -y cmake curl pkg-config libssl-dev git clang && \
+    apt-get install -y curl cmake pkg-config libssl-dev git clang && \
     apt-get clean && \
     rm -r /var/lib/apt/lists/*
 
@@ -40,9 +40,8 @@
 RUN mkdir /unique_parachain
 WORKDIR /unique_parachain
 
-RUN echo "$MAINNET_BRANCH" && echo "$REPO_URL"
 RUN git clone $REPO_URL -b $MAINNET_BRANCH .
-RUN cargo build $FEATURE --$PROFILE
+RUN cargo build --features=$FEATURE --$PROFILE
 
 
 # ===== BUILD target version ======
@@ -57,10 +56,8 @@
 WORKDIR /unique_parachain
 
 RUN git clone $REPO_URL -b $BRANCH .
-RUN cargo build $FEATURE --$PROFILE
+RUN cargo build --features=$FEATURE --$PROFILE
 
-COPY /unique_parachain/launch-config-forkless.json /polkadot-launch/launch-config.json
-
 
 # ===== BUILD POLKADOT =====
 FROM rust-builder as builder-polkadot
@@ -98,11 +95,8 @@
 COPY --from=builder-unique-current /unique_parachain/target/release/unique-collator /unique-chain/current/release/
 COPY --from=builder-unique-target /unique_parachain/target/release/unique-collator /unique-chain/target/release/
 COPY --from=builder-polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/
-
-COPY --from=builder-unique-target /unique_parachain/launch-config-forkless.json /polkadot-launch/launch-config.json
 
-
 CMD export NVM_DIR="$HOME/.nvm" && \
     [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
     cd /polkadot-launch && \
-    yarn start launch-config.json --test-upgrade
+    yarn start launch-config.json
modified.docker/docker-compose-forkless.yamldiffbeforeafterboth
--- a/.docker/docker-compose-forkless.yaml
+++ b/.docker/docker-compose-forkless.yaml
@@ -7,6 +7,8 @@
       dockerfile: .docker/Dockerfile-parachain-upgrade
     image: node-parachain
     container_name: node-parachain
+    volumes:
+      - .docker/launch-config-forkless.json:/polkadot-launch/launch-config.json
     expose:
       - 9944
       - 9933
added.docker/launch-config.j2diffbeforeafterboth
--- /dev/null
+++ b/.docker/launch-config.j2
@@ -0,0 +1,40 @@
+{
+      "parachains": [
+        {
+            "bin": "../unique-chain/current/release/unique-collator",
+            "upgradeBin": "../unique-chain/target/release/unique-collator",
+            "upgradeWasm": "../unique-chain/target/release/wbuild/{{ FEATURE }}/{{ RUNTIME }}_runtime.compact.compressed.wasm",
+            "id": "1000",
+            "balance": "1000000000000000000000000",
+            "nodes": [
+                {
+                    "port": 31200,
+                    "wsPort": 9944,
+                    "rpcPort": 9933,
+                    "name": "alice",
+                    "flags": [
+                        "--rpc-cors=all",
+                        "--unsafe-rpc-external",
+                        "--unsafe-ws-external",
+                        "-lxcm=trace"
+                    ]
+                },
+                {
+                    "port": 31201,
+                    "wsPort": 9945,
+                    "rpcPort": 9934,
+                    "name": "bob",
+                    "flags": [
+                        "--rpc-cors=all",
+                        "--unsafe-rpc-external",
+                        "--unsafe-ws-external",
+                        "-lxcm=trace"
+                    ]
+                }
+            ]
+        }
+    ],
+    "simpleParachains": [],
+    "hrmpChannels": [],
+    "finalization": false
+}
deleted.docker/launch-config.jsondiffbeforeafterboth
--- a/.docker/launch-config.json
+++ /dev/null
@@ -1,123 +0,0 @@
-{
-    "relaychain": {
-        "bin": "../polkadot/target/release/polkadot",
-        "chain": "westend-local",
-        "nodes": [
-            {
-                "name": "alice",
-                "wsPort": 9844,
-                "rpcPort": 9843,
-                "port": 30444,
-                "flags": [
-                    "-lparachain::candidate_validation=debug",
-                    "-lxcm=trace",
-                    "--rpc-cors=all",
-                    "--unsafe-rpc-external",
-                    "--unsafe-ws-external"
-                ]
-            },
-            {
-                "name": "bob",
-                "wsPort": 9855,
-                "rpcPort": 9854,
-                "port": 30555,
-                "flags": [
-                    "-lparachain::candidate_validation=debug",
-                    "-lxcm=trace",
-                    "--rpc-cors=all",
-                    "--unsafe-rpc-external",
-                    "--unsafe-ws-external"
-                ]
-            },
-            {
-                "name": "charlie",
-                "wsPort": 9866,
-                "rpcPort": 9865,
-                "port": 30666,
-                "flags": [
-                    "-lparachain::candidate_validation=debug",
-                    "-lxcm=trace",
-                    "--rpc-cors=all",
-                    "--unsafe-rpc-external",
-                    "--unsafe-ws-external"
-                ]
-            },
-            {
-                "name": "dave",
-                "wsPort": 9877,
-                "rpcPort": 9876,
-                "port": 30777,
-                "flags": [
-                    "-lparachain::candidate_validation=debug",
-                    "-lxcm=trace",
-                    "--rpc-cors=all",
-                    "--unsafe-rpc-external",
-                    "--unsafe-ws-external"
-                ]
-            },
-            {
-                "name": "eve",
-                "wsPort": 9888,
-                "rpcPort": 9887,
-                "port": 30888,
-                "flags": [
-                    "-lparachain::candidate_validation=debug",
-                    "-lxcm=trace",
-                    "--rpc-cors=all",
-                    "--unsafe-rpc-external",
-                    "--unsafe-ws-external"
-                ]
-            }
-        ],
-        "genesis": {
-            "runtime": {
-                "runtime_genesis_config": {
-                    "parachainsConfiguration": {
-                        "config": {
-                            "validation_upgrade_frequency": 1,
-                            "validation_upgrade_delay": 1
-                        }
-                    }
-                }
-            }
-        }
-    },
-    "parachains": [
-        {
-            "bin": "../unique-chain/current/release/unique-collator",    #Mainnet TAG
-            "upgradeBin": "../unique-chain/target/release/unique-collator",   # version in PR develop to master
-            "upgradeWasm": "../unique-chain/target/release/wbuild/opal-runtime/opal_runtime.compact.compressed.wasm",
-            "id": "1000",
-            "balance": "1000000000000000000000000",
-            "nodes": [
-                {
-                    "port": 31200,
-                    "wsPort": 9944,
-                    "rpcPort": 9933,
-                    "name": "alice",
-                    "flags": [
-                        "--rpc-cors=all",
-                        "--unsafe-rpc-external",
-                        "--unsafe-ws-external",
-                        "-lxcm=trace"
-                    ]
-                },
-                {
-                    "port": 31201,
-                    "wsPort": 9945,
-                    "rpcPort": 9934,
-                    "name": "bob",
-                    "flags": [
-                        "--rpc-cors=all",
-                        "--unsafe-rpc-external",
-                        "--unsafe-ws-external",
-                        "-lxcm=trace"
-                    ]
-                }
-            ]
-        }
-    ],
-    "simpleParachains": [],
-    "hrmpChannels": [],
-    "finalization": false
-}
modified.envdiffbeforeafterboth
--- a/.env
+++ b/.env
@@ -1,6 +1,8 @@
 RUST_TOOLCHAIN=nightly-2022-05-11
-RUST_C=1.62.0-nightly
-POLKA_VERSION=release-v0.9.24
-UNIQUE_BRANCH=develop
-USER=***
-PASS=***
+POLKADOT_BUILD_BRANCH=release-v0.9.24
+
+POLKADOT_MAINNET_BRANCH=release-v0.9.25
+UNIQUE_MAINNET_TAG=v924010
+
+KUSAMA_MAINNET_BRANCH=release-v0.9.26
+QUARTZ_MAINNET_TAG=v924012
\ No newline at end of file
modified.github/workflows/forkless-update-nodata.ymldiffbeforeafterboth
1616
17#Define Workflow variables17#Define Workflow variables
18env:18env:
19 RUST_TOOLCHAIN: nightly-2022-05-11
20 REPO_URL: ${{ github.server_url }}/${{ github.repository }}19 REPO_URL: ${{ github.server_url }}/${{ github.repository }}
21 POLKADOT_BUILD_BRANCH: release-v0.9.24
22 POLKADOT_MAINNET_BRANCH: release-v0.9.25 # for unique-runtime
23 UNIQUE_MAINNET_TAG: v924010
24 KUSAMA_MAINNET_BRANCH: release-v0.9.26 # for для quartz-runtime
25 QUARTZ_MAINNET_TAG: v924012
2620
27# A workflow run is made up of one or more jobs that can run sequentially or in parallel21# A workflow run is made up of one or more jobs that can run sequentially or in parallel
28jobs:22jobs:
41 # features: "--features=opal-runtime"35 # features: "--features=opal-runtime"
42 # binary_version:36 # binary_version:
43 - network: "Quartz" # KUSAMA_MAINNET_BRANCH для quartz-runtime37 - network: "Quartz" # KUSAMA_MAINNET_BRANCH для quartz-runtime
44 features: "--features=quartz-runtime"38 features: "quartz-runtime"
39 runtime: "quartz"
45 mainnet_branch: quartz-v924012-240 mainnet_branch: quartz-v924012-2
46 mainnet_tag: v92401241 mainnet_tag: v924012
47 - network: "Unique" # POLKADOT_MAINNET_BRANCH для unique-runtime42 - network: "Unique" # POLKADOT_MAINNET_BRANCH для unique-runtime
48 features: "--features=unique-runtime"43 features: "unique-runtime"
44 runtime: "unique"
49 mainnet_branch: v92401045 mainnet_branch: v924010
50 mainnet_tag: v92401046 mainnet_tag: v924010
5147
70# if: github.event.pull_request.draft == true66# if: github.event.pull_request.draft == true
71# run: exit 167# run: exit 1
68
69 - name: Clean Workspace
70 uses: AutoModality/action-clean@v1.1.0
7271
73 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it72 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
74 - uses: actions/checkout@v373 - uses: actions/checkout@v3
75 with:74 with:
76 ref: ${{ github.head_ref }} #Checking out head commit75 ref: ${{ github.head_ref }} #Checking out head commit
76
77 - name: Read .env file
78 uses: xom9ikk/dotenv@v1.0.2
7779
78 - name: Generate ENV related extend file for docker-compose80 - name: Generate ENV related extend file for docker-compose
79 uses: cuchi/jinja2-action@v1.2.081 uses: cuchi/jinja2-action@v1.2.0
93 - name: Show build configuration95 - name: Show build configuration
94 run: cat .docker/docker-compose.${{ matrix.network }}.yml96 run: cat .docker/docker-compose.${{ matrix.network }}.yml
97
98 - name: Generate launch-config.json
99 uses: cuchi/jinja2-action@v1.2.0
100 with:
101 template: .docker/launch-config.j2
102 output_file: .docker/launch-config-forkless.json
103 variables: |
104 FEATURE=${{ matrix.features }}
105 RUNTIME=${{ matrix.runtime }}
106
107 - name: Show launch-config-forkless configuration
108 run: cat .docker/launch-config-forkless.json
109
110 - name: Show files in directory
111 run: ls -la
112
95113
96 - name: Build the stack114 - name: Build the stack
97 run: docker-compose -f ".docker/docker-compose-forkless.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build115 run: docker-compose -f ".docker/docker-compose-forkless.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --force-recreate --remove-orphans
98116
99117
100# - name: Test Report118# - name: Test Report
110# run: |128# run: |
111# echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"129# echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"
112130
113 - name: Stop running containers131# - name: Stop running containers
114 if: always() # run this step always132# if: always() # run this step always
115 run: docker-compose -f ".docker/docker-compose-forkless.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down133# run: docker-compose -f ".docker/docker-compose-forkless.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down
116134