git.delta.rocks / unique-network / refs/commits / 32c79dfc15ed

difftreelog

Increase app-promotion periods for full node

Max Andreev2022-12-16parent: #4b5ba1b.patch.diff
in: master
It works fine on dev node but fails on regular

3 files changed

modifiedtests/src/app-promotion.test.tsdiffbeforeafterboth
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip} from './util';18import {
19 itSub, usingPlaygrounds, Pallets, requirePalletsOrSkip, LOCKING_PERIOD, UNLOCKING_PERIOD,
20} from './util';
19import {DevUniqueHelper} from './util/playgrounds/unique.dev';21import {DevUniqueHelper} from './util/playgrounds/unique.dev';
20import {itEth, expect, SponsoringMode} from './eth/util';22import {itEth, expect, SponsoringMode} from './eth/util';
24let nominal: bigint;26let nominal: bigint;
25let palletAddress: string;27let palletAddress: string;
26let accounts: IKeyringPair[];28let accounts: IKeyringPair[];
29// App promotion periods:
27const LOCKING_PERIOD = 8n; // 8 blocks of relay30// LOCKING_PERIOD = 12n; // 8 blocks of relay
28const UNLOCKING_PERIOD = 4n; // 4 blocks of parachain31// UNLOCKING_PERIOD = 6n; // 4 blocks of parachain
2932
30describe('App promotion', () => {33describe('App promotion', () => {
31 before(async function () {34 before(async function () {
modifiedtests/src/util/globalSetup.tsdiffbeforeafterboth
2// SPDX-License-Identifier: Apache-2.02// SPDX-License-Identifier: Apache-2.0
33
4import {usingPlaygrounds, Pallets, DONOR_FUNDING, MINIMUM_DONOR_FUND} from './index';4import {
5 usingPlaygrounds, Pallets, DONOR_FUNDING, MINIMUM_DONOR_FUND, LOCKING_PERIOD, UNLOCKING_PERIOD,
6} from './index';
5import * as path from 'path';7import * as path from 'path';
6import {promises as fs} from 'fs';8import {promises as fs} from 'fs';
21 // 3. Configure App Promotion 23 // 3. Configure App Promotion
22 const missingPallets = helper.fetchMissingPalletNames([Pallets.AppPromotion]);24 const missingPallets = helper.fetchMissingPalletNames([Pallets.AppPromotion]);
23 if (missingPallets.length === 0) {25 if (missingPallets.length === 0) {
24 // TODO: move to config file
25 const LOCKING_PERIOD = 8n; // 8 blocks of relay
26 const UNLOCKING_PERIOD = 4n; // 4 blocks of parachain
27
28 const superuser = await privateKey('//Alice');26 const superuser = await privateKey('//Alice');
29 const palletAddress = helper.arrange.calculatePalletAddress('appstake');27 const palletAddress = helper.arrange.calculatePalletAddress('appstake');
modifiedtests/src/util/index.tsdiffbeforeafterboth
86export const MINIMUM_DONOR_FUND = 100_000n;86export const MINIMUM_DONOR_FUND = 100_000n;
87export const DONOR_FUNDING = 1_000_000n;87export const DONOR_FUNDING = 1_000_000n;
88
89// App-promotion periods:
90export const LOCKING_PERIOD = 12n; // 8 blocks of relay
91export const UNLOCKING_PERIOD = 6n; // 4 blocks of parachain
92
8893
89export enum Pallets {94export enum Pallets {