git.delta.rocks / unique-network / refs/commits / ae09c8df0c85

difftreelog

Merge branch 'develop' into feature/multi-assets-redone

Alexander Aksenov2022-09-15parents: #285030f #85b56f6.patch.diff
in: master

12 files changed

modified.github/workflows/ci-master.ymldiffbeforeafterboth
18 uses: ./.github/workflows/node-only-update_v2.yml18 uses: ./.github/workflows/node-only-update_v2.yml
1919
20 forkless:20 forkless:
21 if: ${{ contains( github.event.pull_request.labels.*.name, 'forkless') }}
22 uses: ./.github/workflows/forkless.yml21 uses: ./.github/workflows/forkless.yml
2322
24 canary:23 canary:
25 if: ${{ contains( github.event.pull_request.labels.*.name, 'canary') }}
26 uses: ./.github/workflows/canary.yml24 uses: ./.github/workflows/canary.yml
27 secrets: inherit # pass all secrets25 secrets: inherit # pass all secrets
2826
29 xcm:27 xcm:
30 if: ${{ contains( github.event.pull_request.labels.*.name, 'xcm') }}
31 uses: ./.github/workflows/xcm.yml28 uses: ./.github/workflows/xcm.yml
32 secrets: inherit # pass all secrets29 secrets: inherit # pass all secrets
3330
deleted.github/workflows/market-test.ymldiffbeforeafterboth

no changes

modified.github/workflows/market-test_v2.ymldiffbeforeafterboth
45 repository: 'UniqueNetwork/market-e2e-tests'45 repository: 'UniqueNetwork/market-e2e-tests'
46 ssh-key: ${{ secrets.GH_PAT }}46 ssh-key: ${{ secrets.GH_PAT }}
47 path: 'qa-tests'47 path: 'qa-tests'
48 ref: 'ci_test_v2'48 ref: 'master'
4949
50 - name: Read .env file50 - name: Read .env file
51 uses: xom9ikk/dotenv@v1.0.251 uses: xom9ikk/dotenv@v1.0.2
modified.github/workflows/node-only-update_v2.ymldiffbeforeafterboth
10# A workflow run is made up of one or more jobs that can run sequentially or in parallel10# A workflow run is made up of one or more jobs that can run sequentially or in parallel
11jobs:11jobs:
1212
13 execution-marix:13 nodes-execution-matrix:
1414
15 name: execution matrix15 name: execution matrix
1616
4242
4343
4444
45 forkless-update-nodata:45 nodes-only-update:
46 needs: execution-marix46 needs: nodes-execution-matrix
47 # The type of runner that the job will run on47 # The type of runner that the job will run on
48 runs-on: [self-hosted-ci,large]48 runs-on: [self-hosted-ci,large]
4949
5757
58 strategy:58 strategy:
59 matrix:59 matrix:
60 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}60 include: ${{fromJson(needs.nodes-execution-matrix.outputs.matrix)}}
6161
62 steps:62 steps:
6363
156 exit 0156 exit 0
157 shell: bash157 shell: bash
158
159 - name: Checkout at '${{ matrix.mainnet_branch }}' branch
160 uses: actions/checkout@master
161 with:
162 ref: ${{ matrix.mainnet_branch }} #Checking out head commit
163 path: ${{ matrix.mainnet_branch }}
164
158165
159 - name: Run tests before Node Parachain upgrade166 - name: Run tests before Node Parachain upgrade
160 working-directory: tests167 working-directory: ${{ matrix.mainnet_branch }}/tests
161 run: |168 run: |
162 yarn install169 yarn install
163 yarn add mochawesome170 yarn add mochawesome
164 node scripts/readyness.js171 echo "Ready to start tests"
165 echo "Ready to start tests"172 yarn polkadot-types
166 yarn polkadot-types173 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
167 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
168 env:174 env:
169 RPC_URL: http://127.0.0.1:9933/175 RPC_URL: http://127.0.0.1:9933/
170176
174 if: success() || failure() # run this step even if previous step failed180 if: success() || failure() # run this step even if previous step failed
175 with:181 with:
176 name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created182 name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created
177 path: tests/mochawesome-report/test-*.json # Path to test results183 path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-*.json # Path to test results
178 reporter: mochawesome-json184 reporter: mochawesome-json
179 fail-on-error: 'false'185 fail-on-error: 'false'
180186
262268
263 - name: Remove builder cache269 - name: Remove builder cache
264 if: always() # run this step always270 if: always() # run this step always
265 run: |271 run: |
266 docker builder prune -f272 docker builder prune -f -a
267 docker system prune -f273 docker system prune -f
274 docker image prune -f -a
268275
269 - name: Clean Workspace276 - name: Clean Workspace
270 if: always()277 if: always()
modifiedCargo.lockdiffbeforeafterboth
66006600
6601[[package]]6601[[package]]
6602name = "pallet-unique"6602name = "pallet-unique"
6603version = "0.1.4"6603version = "0.2.0"
6604dependencies = [6604dependencies = [
6605 "ethereum",6605 "ethereum",
6606 "evm-coder",6606 "evm-coder",
modifiedpallets/app-promotion/src/lib.rsdiffbeforeafterboth
589 let flush_stake = || -> DispatchResult {589 let flush_stake = || -> DispatchResult {
590 if let Some(last_id) = &*last_id.borrow() {590 if let Some(last_id) = &*last_id.borrow() {
591 if !income_acc.borrow().is_zero() {591 if !income_acc.borrow().is_zero() {
592 <T::Currency as Currency<T::AccountId>>::transfer(592 <T::Currency as Currency<T::AccountId>>::transfer(
593 &T::TreasuryAccountId::get(),593 &T::TreasuryAccountId::get(),
594 last_id,594 last_id,
595 *income_acc.borrow(),595 *income_acc.borrow(),
596 ExistenceRequirement::KeepAlive,596 ExistenceRequirement::KeepAlive,
597 )597 )?;
598 .and_then(|_| {598
599 Self::add_lock_balance(last_id, *income_acc.borrow())?;599 Self::add_lock_balance(last_id, *income_acc.borrow())?;
600 <TotalStaked<T>>::try_mutate(|staked| {600 <TotalStaked<T>>::try_mutate(|staked| -> DispatchResult {
601 staked601 *staked = staked
602 .checked_add(&*income_acc.borrow())602 .checked_add(&*income_acc.borrow())
603 .ok_or(ArithmeticError::Overflow.into())603 .ok_or(ArithmeticError::Overflow)?;
604 Ok(())
604 })605 })?;
605 })?;
606606
607 Self::deposit_event(Event::StakingRecalculation(607 Self::deposit_event(Event::StakingRecalculation(
608 last_id.clone(),608 last_id.clone(),
modifiedruntime/common/mod.rsdiffbeforeafterboth
8282
83pub type SignedExtra = (83pub type SignedExtra = (
84 frame_system::CheckSpecVersion<Runtime>,84 frame_system::CheckSpecVersion<Runtime>,
85 // system::CheckTxVersion<Runtime>,85 frame_system::CheckTxVersion<Runtime>,
86 frame_system::CheckGenesis<Runtime>,86 frame_system::CheckGenesis<Runtime>,
87 frame_system::CheckEra<Runtime>,87 frame_system::CheckEra<Runtime>,
88 frame_system::CheckNonce<Runtime>,88 frame_system::CheckNonce<Runtime>,
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
50 spec_name: create_runtime_str!(RUNTIME_NAME),50 spec_name: create_runtime_str!(RUNTIME_NAME),
51 impl_name: create_runtime_str!(RUNTIME_NAME),51 impl_name: create_runtime_str!(RUNTIME_NAME),
52 authoring_version: 1,52 authoring_version: 1,
53 spec_version: 927020,53 spec_version: 927030,
54 impl_version: 0,54 impl_version: 0,
55 apis: RUNTIME_API_VERSIONS,55 apis: RUNTIME_API_VERSIONS,
56 transaction_version: 2,56 transaction_version: 2,
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
50 spec_name: create_runtime_str!(RUNTIME_NAME),50 spec_name: create_runtime_str!(RUNTIME_NAME),
51 impl_name: create_runtime_str!(RUNTIME_NAME),51 impl_name: create_runtime_str!(RUNTIME_NAME),
52 authoring_version: 1,52 authoring_version: 1,
53 spec_version: 927020,53 spec_version: 927030,
54 impl_version: 0,54 impl_version: 0,
55 apis: RUNTIME_API_VERSIONS,55 apis: RUNTIME_API_VERSIONS,
56 transaction_version: 2,56 transaction_version: 2,
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
50 spec_name: create_runtime_str!(RUNTIME_NAME),50 spec_name: create_runtime_str!(RUNTIME_NAME),
51 impl_name: create_runtime_str!(RUNTIME_NAME),51 impl_name: create_runtime_str!(RUNTIME_NAME),
52 authoring_version: 1,52 authoring_version: 1,
53 spec_version: 927020,53 spec_version: 927030,
54 impl_version: 0,54 impl_version: 0,
55 apis: RUNTIME_API_VERSIONS,55 apis: RUNTIME_API_VERSIONS,
56 transaction_version: 2,56 transaction_version: 2,
modifiedtests/src/app-promotion.test.tsdiffbeforeafterboth
661 });661 });
662 });662 });
663
664 it('should increase total staked', async() => {
665 await usingPlaygrounds(async (helper) => {
666 const staker = accounts.pop()!;
667 const totalStakedBefore = await helper.staking.getTotalStaked();
668 await helper.staking.stake(staker, 100n * nominal);
669
670 // Wait for rewards and pay
671 const stakedInBlock = (await helper.staking.getTotalStakedPerBlock({Substrate: staker.address}))[0][0];
672 await helper.wait.forRelayBlockNumber(rewardAvailableInBlock(stakedInBlock));
673 await helper.signTransaction(palletAdmin, helper.api!.tx.appPromotion.payoutStakers(100));
674
675 const totalStakedAfter = await helper.staking.getTotalStaked();
676 expect(totalStakedAfter >= totalStakedBefore + calculateIncome(100n * nominal, 10n)).to.be.true;
677
678 // staker can unstake
679 await helper.staking.unstake(staker);
680 expect(await helper.staking.getTotalStaked()).to.be.equal(totalStakedAfter - calculateIncome(100n * nominal, 10n));
681 });
682 });
663683
664 it('should credit 0.05% for staking period', async () => { 684 it('should credit 0.05% for staking period', async () => {
665 await usingPlaygrounds(async helper => {685 await usingPlaygrounds(async helper => {
addedtests/src/tx-version-presence.test.tsdiffbeforeafterboth

no changes