git.delta.rocks / unique-network / refs/commits / 308a52eaeb70

difftreelog

Merge pull request #660 from UniqueNetwork/fix/merge-929030

Yaroslav Bolyukin2022-10-18parents: #67c56fa #e5efe22.patch.diff
in: master
Fix/merge 929030

15 files changed

modified.docker/Dockerfile-try-runtimediffbeforeafterboth
--- a/.docker/Dockerfile-try-runtime
+++ b/.docker/Dockerfile-try-runtime
@@ -46,5 +46,4 @@
     echo "Fork from: $REPLICA_FROM\n" && \
     cargo build --features=$FEATURE --release
     
-
-CMD cargo run --features=try-runtime,$FEATURE --release -- try-runtime on-runtime-upgrade live --uri $REPLICA_FROM
+CMD cargo run --features=try-runtime,$FEATURE --release -- try-runtime --no-spec-name-check on-runtime-upgrade live --uri $REPLICA_FROM
modified.envdiffbeforeafterboth
--- a/.env
+++ b/.env
@@ -5,7 +5,7 @@
 UNIQUE_MAINNET_TAG=v924010
 
 KUSAMA_MAINNET_BRANCH=release-v0.9.26
-QUARTZ_MAINNET_TAG=quartz-v924012-2
+QUARTZ_MAINNET_TAG=quartz-v924012-2-opal-runtime-feature
 
 UNQWND_MAINNET_BRANCH=release-v0.9.24
 
modified.github/workflows/market-test_v2.ymldiffbeforeafterboth
--- a/.github/workflows/market-test_v2.yml
+++ b/.github/workflows/market-test_v2.yml
@@ -10,8 +10,8 @@
 
   market_test:
     # The type of runner that the job will run on
-    runs-on: [self-hosted-ci,large]
-    timeout-minutes: 1380
+    runs-on: [self-hosted-ci,medium]
+    timeout-minutes: 180
 
     name: ${{ matrix.network }}    
 
@@ -91,12 +91,20 @@
           rm -rf .env
           cp .env.docker .env
 
+# Temporary disable node readyness check. Have to dig into the script logic.
+#      - name: Wait for chain up and running
+#        working-directory: tests
+#        run: |
+#          yarn install
+#          node scripts/readyness.js
+#          echo "Ready to start tests"
+#        env:
+#          RPC_URL: http://127.0.0.1:9933/
+
       - name: Wait for chain up and running
-        working-directory: tests
         run: |
-          yarn install
-          node scripts/readyness.js
-          echo "Ready to start tests"
+          sleep 1200s
+          echo "Ready to start Market e2e tests"
 
       - name: Show content of .env file and Generate accounts
         working-directory: qa-tests
@@ -184,7 +192,6 @@
       - name: Clean Workspace
         if: always()
         uses: AutoModality/action-clean@v1.1.0
-
 
 
 
modified.github/workflows/node-only-update_v2.ymldiffbeforeafterboth
--- a/.github/workflows/node-only-update_v2.yml
+++ b/.github/workflows/node-only-update_v2.yml
@@ -49,7 +49,7 @@
 
 
 
-    timeout-minutes: 1380
+    timeout-minutes: 2880
 
     name: ${{ matrix.network }}
 
@@ -170,7 +170,7 @@
           yarn add mochawesome
           echo "Ready to start tests"
           yarn polkadot-types
-          NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
+          NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-before-${NOW}
         env:
           RPC_URL: http://127.0.0.1:9933/
 
@@ -180,20 +180,35 @@
         if: success() || failure()    # run this step even if previous step failed
         with:
           name: Tests before node upgrade ${{ matrix.network }}            # Name of the check run which will be created
-          path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-*.json    # Path to test results
+          path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-before-*.json    # Path to test results
           reporter: mochawesome-json
           fail-on-error: 'false'
 
-      - name: Send SIGUSR1 to polkadotlaunch process
+      - name: Send SIGUSR1 to polkadot-launch process
         if: success() || failure()
         run: |
-          #Get PID of polkadot-launch
+          ContainerID=$(docker ps -aqf "name=node-parachain")
           PID=$(docker exec node-parachain pidof 'polkadot-launch')
-          echo "Polkadot-launch PID: $PID"
-          #Send SIGUSR1 signal to $PID
+          sleep 30s
+          echo -e "Show logs of node-parachain container.\n"
+          docker logs ${ContainerID}
+          echo -e "\n"
+          echo -e "Restart polkadot-launch process: $PID\n"
           docker exec node-parachain kill -SIGUSR1 ${PID}
+          echo -e "SIGUSR1 sent to Polkadot-launch PID: $PID\n"
+          echo -e "Get node-parachain logs:\n"
+          docker logs -t -n 5 ${ContainerID}
+      
+      - name: Get chain logs
+        if: failure()                   # run this step only at failure
+        run: |
+          docker exec node-parachain cat /polkadot-launch/9944.log
+          docker exec node-parachain cat /polkadot-launch/9945.log
+          docker exec node-parachain cat /polkadot-launch/alice.log
+          docker exec node-parachain cat /polkadot-launch/eve.log
+          docker exec node-parachain cat /polkadot-launch/dave.log
+          docker exec node-parachain cat /polkadot-launch/charlie.log             
 
-      #  🌗 All parachain collators restarted with the new binaries.
       - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade.
         if: success()
         run: |
@@ -240,14 +255,14 @@
         shell: bash
 
       - name: Run tests after Node Parachain upgrade
-        working-directory: tests
+        if: success()
+        working-directory: ${{ matrix.mainnet_branch }}/tests
         run: |
           yarn install
           yarn add mochawesome
-          node scripts/readyness.js
           echo "Ready to start tests"
           yarn polkadot-types
-          NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
+          NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-after-${NOW}
         env:
           RPC_URL: http://127.0.0.1:9933/
 
@@ -257,7 +272,7 @@
         if: success() || failure()    # run this step even if previous step failed
         with:
           name: Tests after node upgrade ${{ matrix.network }}            # Name of the check run which will be created
-          path: tests/mochawesome-report/test-*.json    # Path to test results
+          path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-after-*.json    # Path to test results
           reporter: mochawesome-json
           fail-on-error: 'false'
 
modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6711,6 +6711,24 @@
 ]
 
 [[package]]
+name = "pallet-unique-scheduler-v2"
+version = "0.1.0"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "log",
+ "pallet-preimage",
+ "parity-scale-codec 3.2.1",
+ "scale-info",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+ "substrate-test-utils",
+]
+
+[[package]]
 name = "pallet-utility"
 version = "4.0.0-dev"
 source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe"
@@ -8576,7 +8594,7 @@
 
 [[package]]
 name = "quartz-runtime"
-version = "0.9.27"
+version = "0.9.29"
 dependencies = [
  "app-promotion-rpc",
  "cumulus-pallet-aura-ext",
@@ -12568,7 +12586,7 @@
 
 [[package]]
 name = "unique-runtime"
-version = "0.9.27"
+version = "0.9.29"
 dependencies = [
  "app-promotion-rpc",
  "cumulus-pallet-aura-ext",
modifiedREADME.mddiffbeforeafterboth
--- a/README.md
+++ b/README.md
@@ -92,7 +92,7 @@
 ```
 git clone https://github.com/paritytech/polkadot.git
 cd polkadot
-git checkout release-v0.9.27
+git checkout release-v0.9.29
 cargo build --release
 ```
 
modifiedruntime/common/construct_runtime/mod.rsdiffbeforeafterboth
before · runtime/common/construct_runtime/mod.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617mod util;1819#[macro_export]20macro_rules! construct_runtime {21    ($select_runtime:ident) => {22        $crate::construct_runtime_impl! {23            select_runtime($select_runtime);2425            pub enum Runtime where26                Block = Block,27                NodeBlock = opaque::Block,28                UncheckedExtrinsic = UncheckedExtrinsic29            {30                System: frame_system = 0,3132                ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,33                ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21,3435                Aura: pallet_aura::{Pallet, Config<T>} = 22,36                AuraExt: cumulus_pallet_aura_ext::{Pallet, Config} = 23,3738                Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,39                RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 31,40                Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 32,41                TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 33,42                Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 34,43                Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 35,44                Vesting: orml_vesting::{Pallet, Storage, Call, Event<T>, Config<T>} = 37,4546                XTokens: orml_xtokens = 38,47                Tokens: orml_tokens = 39,48                // Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>} = 38,4950                // XCM helpers.51                XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,52                PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 51,53                CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 52,54                DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,5556                // Unique Pallets57                Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,58                Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,5960                #[runtimes(opal)]61                Scheduler: pallet_unique_scheduler::{Pallet, Call, Storage, Event<T>} = 62,6263                Configuration: pallet_configuration::{Pallet, Call, Storage} = 63,6465                Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,66                // ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,67                Common: pallet_common::{Pallet, Storage, Event<T>} = 66,68                Fungible: pallet_fungible::{Pallet, Storage} = 67,6970                #[runtimes(opal, quartz)]71                Refungible: pallet_refungible::{Pallet, Storage} = 68,7273                Nonfungible: pallet_nonfungible::{Pallet, Storage} = 69,74                Structure: pallet_structure::{Pallet, Call, Storage, Event<T>} = 70,7576                #[runtimes(opal)]77                RmrkCore: pallet_proxy_rmrk_core::{Pallet, Call, Storage, Event<T>} = 71,7879                #[runtimes(opal)]80                RmrkEquip: pallet_proxy_rmrk_equip::{Pallet, Call, Storage, Event<T>} = 72,8182                #[runtimes(opal)]83                AppPromotion: pallet_app_promotion::{Pallet, Call, Storage, Event<T>} = 73,8485                #[runtimes(opal)]86                ForeignAssets: pallet_foreign_assets::{Pallet, Call, Storage, Event<T>} = 80,8788                // Frontier89                EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,90                Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 101,9192                EvmCoderSubstrate: pallet_evm_coder_substrate::{Pallet, Storage} = 150,93                EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage, Event<T>} = 151,94                EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,95                EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,96            }97        }98    }99}
after · runtime/common/construct_runtime/mod.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617mod util;1819#[macro_export]20macro_rules! construct_runtime {21    ($select_runtime:ident) => {22        $crate::construct_runtime_impl! {23            select_runtime($select_runtime);2425            pub enum Runtime where26                Block = Block,27                NodeBlock = opaque::Block,28                UncheckedExtrinsic = UncheckedExtrinsic29            {30                System: frame_system = 0,3132                ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,33                ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21,3435                Aura: pallet_aura::{Pallet, Config<T>} = 22,36                AuraExt: cumulus_pallet_aura_ext::{Pallet, Config} = 23,3738                Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,39                RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 31,40                Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 32,41                TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 33,42                Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 34,43                Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 35,44                Vesting: orml_vesting::{Pallet, Storage, Call, Event<T>, Config<T>} = 37,4546                XTokens: orml_xtokens = 38,47                Tokens: orml_tokens = 39,48                // Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>} = 38,4950                // XCM helpers.51                XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,52                PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 51,53                CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 52,54                DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,5556                // Unique Pallets57                Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,58                Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,5960                // #[runtimes(opal)]61                // Scheduler: pallet_unique_scheduler::{Pallet, Call, Storage, Event<T>} = 62,6263                Configuration: pallet_configuration::{Pallet, Call, Storage} = 63,6465                Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,66                // ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,67                Common: pallet_common::{Pallet, Storage, Event<T>} = 66,68                Fungible: pallet_fungible::{Pallet, Storage} = 67,6970                #[runtimes(opal, quartz)]71                Refungible: pallet_refungible::{Pallet, Storage} = 68,7273                Nonfungible: pallet_nonfungible::{Pallet, Storage} = 69,74                Structure: pallet_structure::{Pallet, Call, Storage, Event<T>} = 70,7576                #[runtimes(opal)]77                RmrkCore: pallet_proxy_rmrk_core::{Pallet, Call, Storage, Event<T>} = 71,7879                #[runtimes(opal)]80                RmrkEquip: pallet_proxy_rmrk_equip::{Pallet, Call, Storage, Event<T>} = 72,8182                #[runtimes(opal)]83                AppPromotion: pallet_app_promotion::{Pallet, Call, Storage, Event<T>} = 73,8485                #[runtimes(opal)]86                ForeignAssets: pallet_foreign_assets::{Pallet, Call, Storage, Event<T>} = 80,8788                // Frontier89                EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,90                Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 101,9192                EvmCoderSubstrate: pallet_evm_coder_substrate::{Pallet, Storage} = 150,93                EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage, Event<T>} = 151,94                EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,95                EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,96            }97        }98    }99}
modifiedruntime/common/mod.rsdiffbeforeafterboth
--- a/runtime/common/mod.rs
+++ b/runtime/common/mod.rs
@@ -20,7 +20,10 @@
 pub mod ethereum;
 pub mod instance;
 pub mod runtime_apis;
+
+#[cfg(feature = "scheduler")]
 pub mod scheduler;
+
 pub mod sponsoring;
 pub mod weights;
 
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -168,7 +168,7 @@
     "pallet-foreign-assets/std"
 ]
 limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
-opal-runtime = ['refungible', 'scheduler', 'rmrk', 'app-promotion', 'foreign-assets']
+opal-runtime = ['refungible', 'rmrk', 'app-promotion', 'foreign-assets']
 
 refungible = []
 scheduler = []
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -50,7 +50,7 @@
 	spec_name: create_runtime_str!(RUNTIME_NAME),
 	impl_name: create_runtime_str!(RUNTIME_NAME),
 	authoring_version: 1,
-	spec_version: 927030,
+	spec_version: 929030,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 2,
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -10,7 +10,7 @@
 license = 'GPLv3'
 name = 'quartz-runtime'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.27'
+version = '0.9.29'
 
 [package.metadata.docs.rs]
 targets = ['x86_64-unknown-linux-gnu']
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -50,7 +50,7 @@
 	spec_name: create_runtime_str!(RUNTIME_NAME),
 	impl_name: create_runtime_str!(RUNTIME_NAME),
 	authoring_version: 1,
-	spec_version: 927030,
+	spec_version: 929030,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 2,
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -10,7 +10,7 @@
 license = 'GPLv3'
 name = 'unique-runtime'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.27'
+version = '0.9.29'
 
 [package.metadata.docs.rs]
 targets = ['x86_64-unknown-linux-gnu']
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -50,7 +50,7 @@
 	spec_name: create_runtime_str!(RUNTIME_NAME),
 	impl_name: create_runtime_str!(RUNTIME_NAME),
 	authoring_version: 1,
-	spec_version: 927030,
+	spec_version: 929030,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 2,
modifiedtests/scripts/readyness.jsdiffbeforeafterboth
--- a/tests/scripts/readyness.js
+++ b/tests/scripts/readyness.js
@@ -25,6 +25,7 @@
     }
     catch(e) {
       await sleep(10000);
+      console.log(e);
     }
   }
 }