difftreelog
Increase app-promotion periods for full node
in: master
It works fine on dev node but fails on regular
3 files changed
tests/src/app-promotion.test.tsdiffbeforeafterboth161617import {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 relay28const UNLOCKING_PERIOD = 4n; // 4 blocks of parachain31// UNLOCKING_PERIOD = 6n; // 4 blocks of parachain293230describe('App promotion', () => {33describe('App promotion', () => {31 before(async function () {34 before(async function () {tests/src/util/globalSetup.tsdiffbeforeafterboth2// SPDX-License-Identifier: Apache-2.02// SPDX-License-Identifier: Apache-2.0334import {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 file25 const LOCKING_PERIOD = 8n; // 8 blocks of relay26 const UNLOCKING_PERIOD = 4n; // 4 blocks of parachain2728 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');tests/src/util/index.tsdiffbeforeafterboth86export 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;8889// App-promotion periods:90export const LOCKING_PERIOD = 12n; // 8 blocks of relay91export const UNLOCKING_PERIOD = 6n; // 4 blocks of parachain92889389export enum Pallets {94export enum Pallets {