Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge v10010062 into master #1016

Merged
merged 164 commits into from
Oct 24, 2023
Merged
Changes from 1 commit
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
683a128
test: added CI for the Polkadex network
PraetorP Sep 11, 2023
9d3aabb
test(polkadex): added reserve malicious test
PraetorP Sep 11, 2023
7dbcac3
doc(polkadex CI): added comment
PraetorP Sep 11, 2023
e6da5c9
test(Polkadex CI): add comment, refactor
PraetorP Sep 12, 2023
d7ef52e
fix: remove baedeker
PraetorP Sep 12, 2023
8b26223
test: fix mocha settings
PraetorP Sep 12, 2023
74dbf88
Update tests/src/xcm/xcmUnique.test.ts
mrshiposha Sep 12, 2023
d1328b9
fix: pallet-presence test
mrshiposha Sep 12, 2023
80370d8
Merge pull request #992 from UniqueNetwork/fix/pallet-presence-releas…
CertainLach Sep 12, 2023
f8b8c4f
feat: add pallet-utility
mrshiposha Sep 12, 2023
749ee43
fix: techcomm prime can be set by council
mrshiposha Sep 12, 2023
58444d8
feat: add pallet-utility playground helper
mrshiposha Sep 12, 2023
a6d8651
test: governance init
mrshiposha Sep 12, 2023
8a54415
test: governance init fellowship
mrshiposha Sep 12, 2023
db9303e
tests: utility in pallet-presence
uandysmith Sep 13, 2023
465dd2a
fix: yarn fix
mrshiposha Sep 13, 2023
e0258a2
fix: pallet-utility pass features
mrshiposha Sep 13, 2023
e089f01
build: bump version to v943061
CertainLach Sep 13, 2023
867eaa1
Merge pull request #993 from UniqueNetwork/fix/governance-with-batch
CertainLach Sep 13, 2023
cd116b8
build: update Cargo.lock
CertainLach Sep 13, 2023
383d45a
refactor(playgorunds): code structure regroup
PraetorP Sep 14, 2023
04e6d94
tests: move scheduler to dev, move governance to separate file
uandysmith Sep 14, 2023
bd22bf4
fix(test): remove token schedulers from tests
PraetorP Sep 14, 2023
477a07d
fix(types): sudo for `DevShidenHelper`
PraetorP Sep 14, 2023
cc05551
update toolchain version
BuddyGlas Sep 15, 2023
1054e65
Merge pull request #997 from UniqueNetwork/ci/small-fix
CertainLach Sep 15, 2023
f32d3e5
Merge pull request #996 from UniqueNetwork/tests/playgrounds-refactor
CertainLach Sep 15, 2023
ef61569
feature: check formating before push
Sep 22, 2023
1e4737b
remove pre-push hook
Sep 22, 2023
cd77dae
fix: code review requests
Sep 22, 2023
9a3d9a7
Merge pull request #838 from UniqueNetwork/feature/pre-push-checks
CertainLach Sep 22, 2023
17ea847
feat: add mint_bulk_cross
Sep 22, 2023
a3eb5c5
test: add tests
Sep 22, 2023
9425c0a
fix: warnings
Sep 22, 2023
0c121c7
feat: add a way to split RFT between multiple owners on mint
Sep 22, 2023
752e2b0
fix: update weighting for mintBulkCross and forbid multiple owners + …
Sep 22, 2023
6486f2a
style: fix typos (#998)
omahs Sep 25, 2023
448629b
Merge pull request #986 from UniqueNetwork/feature/add_mint_bulk_cross
CertainLach Sep 25, 2023
81bcea4
fix: set token props only if something has changed
mrshiposha Sep 25, 2023
e3c9079
fix: dont read storage during minting when not needed
mrshiposha Sep 25, 2023
9c8e078
feat: add reset_token_properties benchmark
mrshiposha Sep 25, 2023
d63678e
feat: add integration-tests profile and use in CI
mrshiposha Sep 25, 2023
5ec8b82
chore: add temporary nft/rft weights
mrshiposha Sep 25, 2023
331f0fa
fix: cache chain build in CI
mrshiposha Sep 26, 2023
192f49d
fix: dont read tpp when not needed
mrshiposha Sep 26, 2023
9b4620c
chore: repeat temporary nft/rft benches
mrshiposha Sep 26, 2023
12a441c
fix: debug check if new token doesnt have any properties
mrshiposha Sep 26, 2023
915db56
chore: bench weights
mrshiposha Sep 26, 2023
cb1a9d8
fix: calibrate weights
mrshiposha Sep 26, 2023
7cc9052
fix: bench profile production
mrshiposha Sep 26, 2023
1acfc39
chore: bench weights repeats 400
mrshiposha Sep 27, 2023
2244ff0
ci(try-runtime): fix false-positive
BuddyGlas Sep 27, 2023
f2a1159
Merge pull request #1002 from UniqueNetwork/ci/fix-try-runtime
CertainLach Sep 27, 2023
d2c9363
tests: performance test for NFT tokens
uandysmith Sep 27, 2023
355fa3f
feat(test xcm): added generic `low level` xcm tests
PraetorP Sep 25, 2023
d91b2e0
fix(xcm unique test): typo
PraetorP Sep 25, 2023
fa6d62b
fix(unq xcm tests): restore state for the Acala
PraetorP Sep 25, 2023
1c40ef3
ci(xcm) : added llcxm test into wokrflow
PraetorP Sep 25, 2023
987aad3
fix(test xcm) : fix package
PraetorP Sep 25, 2023
10b8180
fix(xcmUnique): hook for Moonbeam
PraetorP Sep 26, 2023
eae22fa
refactor: xcm Unq tests
PraetorP Sep 26, 2023
9f2f03a
test(xcmUnique): switch to `uniqueAssetId` , typo
PraetorP Sep 27, 2023
dc6f0e2
fix(test xcm Unq): typos
PraetorP Sep 27, 2023
61fc26e
test(xcm qtz): added `XcmTestHelper`
PraetorP Sep 28, 2023
8d26c73
feat: allow xcm transact for sys,gov and utility
mrshiposha Sep 26, 2023
58b781a
feat: allow explicit unpaid execution from parent
mrshiposha Sep 28, 2023
f61ec5a
feat: add dmpQueue event section
mrshiposha Sep 28, 2023
0f67e15
test: relay does root ops
mrshiposha Sep 28, 2023
06b395f
fix: allow xcm transact for gov bodies when they exist
mrshiposha Sep 28, 2023
668280b
feat(xcm tests): `XcmHelper` integraion for QTZ\UNQ
PraetorP Sep 29, 2023
de0fd48
fix: cargo clippy
PraetorP Sep 29, 2023
44071b6
refactor: use type-safe propertywriter to set/delete properties
mrshiposha Sep 30, 2023
2657b80
fix: EREFUSED due to ws://localhost (?)
mrshiposha Sep 30, 2023
0900b3d
chore: temporary bench nft/rft/common
mrshiposha Sep 30, 2023
42bd0c6
chore: bench nft/rft/common
mrshiposha Sep 30, 2023
74a28c8
chore: calibrate weight2fee
mrshiposha Sep 30, 2023
716b83b
fix: rename makeUnpaidTransactProgram
mrshiposha Oct 2, 2023
a6308d9
fix: rename makeUnpaidSudoTransactProgram
mrshiposha Oct 2, 2023
d4981bc
fix: explaning comment about SetTopic relay router
mrshiposha Oct 2, 2023
cefeef5
fix: make _uniqueChainMultilocationForRelay private
mrshiposha Oct 2, 2023
17703e6
fix: set correct shiden/astar values for our chain
mrshiposha Oct 2, 2023
116f145
Update tests/src/xcm/xcm.types.ts
PraetorP Oct 2, 2023
0243f65
refactor(xcm test): rename `reserveTransferUNQfrom`
PraetorP Oct 2, 2023
78c4f0c
fix(test xcm): typos
PraetorP Oct 2, 2023
b4e7cb4
fix(tests xcm): remove vendor folder
PraetorP Oct 2, 2023
b6b1e0f
feat: add cli param disable-autoseal-on-tx
mrshiposha Oct 2, 2023
f78c926
Revert "fix(tests xcm): remove vendor folder"
PraetorP Oct 2, 2023
3107202
fix(tests xcm): remove vendor folder
PraetorP Oct 2, 2023
184b30a
feat: finalization can be enabled in dev mode
mrshiposha Oct 2, 2023
57b7f8c
fix: slightly fix broken pov-estimate
mrshiposha Oct 2, 2023
e105d72
fix: use config.ts for endpoints
mrshiposha Oct 2, 2023
5ef5e6b
fix: make perf test seq and remove unused functions
mrshiposha Oct 2, 2023
eebd0e2
fix: use OptionQuery for TokenProperties
mrshiposha Oct 2, 2023
6b27551
fix: unit tests
mrshiposha Oct 2, 2023
630fc89
fix: use lowercase letters in EVM errors
mrshiposha Oct 2, 2023
22b45b5
Merge pull request #1000 from UniqueNetwork/fix/minting-prop-weight
CertainLach Oct 2, 2023
bce2cc1
Merge pull request #1003 from UniqueNetwork/feature/llxcm-qtz
CertainLach Oct 2, 2023
4161c8e
refactor: drop legacy unique scheduler
CertainLach Oct 2, 2023
d893d0c
ci: drop zombienet
CertainLach Oct 2, 2023
51232b0
build: upgrade dependencies to polkadot v1.1.0
CertainLach Oct 2, 2023
d63bb38
build: regenerate lockfile
CertainLach Oct 2, 2023
c318883
refactor: move rpc to node
CertainLach Oct 2, 2023
a64769f
refactor: upgrade code for new substrate
CertainLach Oct 2, 2023
4dd1486
refactor: reorganize imports
CertainLach Oct 2, 2023
6ab76d3
style: retab runtime apis
CertainLach Oct 2, 2023
71150e7
feat: use new ethereum sponsoring interface
CertainLach Oct 2, 2023
4b36925
build: bump node version
CertainLach Oct 2, 2023
2eca527
fixup(rpc): move to node
CertainLach Oct 2, 2023
e48f2d1
fixup(imports): post-rebase
CertainLach Oct 2, 2023
fd6af75
fix: force_value in LazyValue
mrshiposha Oct 3, 2023
0e3444d
fix: clippy warn
mrshiposha Oct 3, 2023
f5ed3da
fix: remove unused import
mrshiposha Oct 3, 2023
f9563fa
fix(xcm test): hooks for `Astar`\`Shiden`
PraetorP Oct 3, 2023
13e91d3
fix(`evm-transaction-payment`): clippy
PraetorP Oct 4, 2023
716fee2
chore: remove unique-scheduler leftovers
CertainLach Oct 4, 2023
22a5178
build: bump spec_version
CertainLach Oct 9, 2023
c3c95ca
test: fix build
CertainLach Oct 9, 2023
ff74635
ci: fix eslint precommit regex
CertainLach Oct 9, 2023
7489c8a
doc: dev mode startup
CertainLach Oct 9, 2023
c14994f
doc: ethereum sponsoring clarification
CertainLach Oct 9, 2023
900be63
Merge pull request #1004 from UniqueNetwork/feature/update-polkadot-1.1
CertainLach Oct 9, 2023
4950cbc
fix: update benchmarks to v2
Oct 9, 2023
885f1d2
fix: compilation errors
Oct 10, 2023
af2b5f4
fix: build node with benchmarks
CertainLach Oct 11, 2023
5f71c37
fix: benchmarks
Oct 12, 2023
3db37f4
fix: clippy warnings
Oct 12, 2023
18a5c32
ci: fix unnecessary node rebuilds during benchmarking
CertainLach Oct 12, 2023
4275a8f
fix: remove preimage benchmark
Oct 12, 2023
90ad566
Merge pull request #1008 from UniqueNetwork/fix/update-benchmarks-to-v2
CertainLach Oct 12, 2023
437764b
refactor: property writer / fix set_token_props weight
mrshiposha Oct 5, 2023
5a68a95
fix: usage of nesting_budget in pallet-unique
mrshiposha Oct 11, 2023
5ec9dbe
refactor: LazyValue without generic Fn
mrshiposha Oct 11, 2023
da2e878
fix: properties consumed space tests
mrshiposha Oct 12, 2023
5464b28
fix: evm errors begin with a lower-case letter
mrshiposha Oct 12, 2023
aae21d3
fix: consumedSpace fallback
mrshiposha Oct 12, 2023
7428628
fix: EVM mint with properties, minor improvements
mrshiposha Oct 13, 2023
a46c1bd
chore: temporary common/nft/rft weights
mrshiposha Oct 13, 2023
ae91353
fix: remove unneeded PhantomData
mrshiposha Oct 13, 2023
442d14a
fix: mint_with_props_weight
mrshiposha Oct 13, 2023
1367a5f
fix: use saturating_add
mrshiposha Oct 13, 2023
4819755
fix: unit tests
mrshiposha Oct 13, 2023
478ee33
fix: clippy warns
mrshiposha Oct 13, 2023
71be677
Merge pull request #1007 from UniqueNetwork/fix/token-properties-benc…
CertainLach Oct 13, 2023
750f6e1
fix: lookahead collator build
CertainLach Oct 13, 2023
6f9bef9
fix: max create multiple items
mrshiposha Oct 16, 2023
d56113d
fix: remove unused fn in perf test
mrshiposha Oct 16, 2023
8c199c3
fix(inflation): BlockNumberProvider
CertainLach Oct 16, 2023
31bae1f
fix: separate depositor from sender in transfer_internal (#1013)
mrshiposha Oct 16, 2023
0cf3df0
Merge pull request #1014 from UniqueNetwork/fix/max-multiple-items
CertainLach Oct 16, 2023
0a49946
fix: forbid non-1 tokenid in native fungibles (#1015)
mrshiposha Oct 16, 2023
700b0c8
fix: enable throttling
CertainLach Oct 16, 2023
d0d6ce4
Merge pull request #1012 from UniqueNetwork/feature/lookahead-leftovers
CertainLach Oct 16, 2023
1f26742
test: fix build
CertainLach Oct 17, 2023
2f9af76
fix: ci intergration tests profile
mrshiposha Oct 17, 2023
e08c117
Merge pull request #1018 from UniqueNetwork/fix/ci-integration-tests-…
CertainLach Oct 17, 2023
cd9af93
build: run benchmarks
kozyrevdev Oct 17, 2023
8af05a8
build: switch to released ORML
CertainLach Oct 17, 2023
092e9b8
feat: propose-upgrade governance script (#1019)
mrshiposha Oct 17, 2023
c097c75
style: fix clippy warning
CertainLach Oct 17, 2023
01c5056
build: regenerate .env
CertainLach Oct 18, 2023
1a512da
ci: disable legacyRpc for node-only
CertainLach Oct 19, 2023
fc6f167
ci: ensure correct versions and legacyRpc flag
CertainLach Oct 19, 2023
973a8ea
test(xcm): manually initialize HRMP
CertainLach Oct 19, 2023
080da49
build: merge v10010062 into master
CertainLach Oct 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tests: performance test for NFT tokens
uandysmith committed Sep 27, 2023
commit d2c9363e553de0162a0777b733f008fc30b3d50a
1 change: 1 addition & 0 deletions tests/package.json
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@
"testEthFractionalizer": "yarn _test './**/eth/fractionalizer/**/*.*test.ts'",
"testEthMarketplace": "yarn _test './**/eth/marketplace/**/*.*test.ts'",
"testEthMarket": "yarn _test './**/eth/marketplace-v2/**/*.*test.ts'",
"testPerformance": "yarn _test ./**/performance.*test.ts",
"testSub": "yarn _test './**/sub/**/*.*test.ts'",
"testSubNesting": "yarn _test './**/sub/nesting/**/*.*test.ts'",
"testEvent": "yarn _test ./src/check-event/*.*test.ts",
175 changes: 175 additions & 0 deletions tests/src/performance.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
// Copyright 2019-2023 Unique Network (Gibraltar) Ltd.
// This file is part of Unique Network.

// Unique Network is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Unique Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.

import {ApiPromise} from '@polkadot/api';
import {IKeyringPair} from '@polkadot/types/types';
import {expect, itSub, usingPlaygrounds} from './util';
import {ICrossAccountId, IProperty} from './util/playgrounds/types';
import {UniqueHelper} from './util/playgrounds/unique';

describe('Performace tests', () => {
let alice: IKeyringPair;
const MAX_TOKENS_TO_MINT = 200;

before(async () => {
await usingPlaygrounds(async (helper, privateKey) => {
const donor = await privateKey({url: import.meta.url});
[alice] = await helper.arrange.createAccounts([100_000n], donor);
});
});

itSub('NFT tokens minting', async ({helper}) => {
const propertyKey = 'prop-a';
const collection = await helper.nft.mintCollection(alice, {
name: 'test properties',
description: 'test properties collection',
tokenPrefix: 'TPC',
tokenPropertyPermissions: [
{key: propertyKey, permission: {mutable: true, collectionAdmin: true, tokenOwner: true}},
],
});


const results = [];
const step = 1_000;
const sizeOfKey = sizeOfEncodedStr(propertyKey);
let currentSize = step;
let startCount = 0;
let minterFunc = tryMintUnsafeRPC;
try {
startCount = await tryMintUnsafeRPC(helper, alice, MAX_TOKENS_TO_MINT, collection.collectionId, {Substrate: alice.address});
}
catch (e) {
startCount = await tryMintExplicit(helper, alice, MAX_TOKENS_TO_MINT, collection.collectionId, {Substrate: alice.address});
minterFunc = tryMintExplicit;
}
results.push({propertySize: 0, tokens: startCount});

while(currentSize <= 32_000) {
const property = {key: propertyKey, value: 'A'.repeat(currentSize - sizeOfKey - sizeOfInt(currentSize))};
const maxTokens = Math.ceil(results.map(x => x.tokens).reduce((a, b) => a + b) / results.length);
const tokens = await minterFunc(helper, alice, maxTokens, collection.collectionId, {Substrate: alice.address}, property);
results.push({propertySize: sizeOfProperty(property), tokens});
currentSize += step;
await helper.wait.newBlocks(2);
}

expect(results).to.be.deep.equal([
{propertySize: 0, tokens: 200},
{propertySize: 1000, tokens: 149},
{propertySize: 2000, tokens: 149},
{propertySize: 3000, tokens: 149},
{propertySize: 4000, tokens: 149},
{propertySize: 5000, tokens: 149},
{propertySize: 6000, tokens: 149},
{propertySize: 7000, tokens: 149},
{propertySize: 8000, tokens: 149},
{propertySize: 9000, tokens: 149},
{propertySize: 10000, tokens: 149},
{propertySize: 11000, tokens: 149},
{propertySize: 12000, tokens: 149},
{propertySize: 13000, tokens: 149},
{propertySize: 14000, tokens: 149},
{propertySize: 15000, tokens: 149},
{propertySize: 16000, tokens: 149},
{propertySize: 17000, tokens: 149},
{propertySize: 18000, tokens: 149},
{propertySize: 19000, tokens: 149},
{propertySize: 20000, tokens: 149},
{propertySize: 21000, tokens: 149},
{propertySize: 22000, tokens: 149},
{propertySize: 23000, tokens: 149},
{propertySize: 24000, tokens: 149},
{propertySize: 25000, tokens: 149},
{propertySize: 26000, tokens: 149},
{propertySize: 27000, tokens: 145},
{propertySize: 28000, tokens: 140},
{propertySize: 29000, tokens: 135},
{propertySize: 30000, tokens: 130},
{propertySize: 31000, tokens: 126},
{propertySize: 32000, tokens: 122},
]);
});
});


const dryRun = async (api: ApiPromise, signer: IKeyringPair, tx: any) => {
const signed = await tx.signAsync(signer);
const dryRun = await api.rpc.system.dryRun(signed.toHex());
return dryRun.isOk && dryRun.asOk.isOk;
};

const getTokens = (tokensCount: number, owner: ICrossAccountId, property?: IProperty) => (new Array(tokensCount)).fill(0).map(() => {
const token = {owner} as {owner: ICrossAccountId, properties?: IProperty[]};
if(property) token.properties = [property];
return token;
});

const tryMintUnsafeRPC = async (helper: UniqueHelper, signer: IKeyringPair, tokensCount: number, collectionId: number, owner: ICrossAccountId, property?: IProperty): Promise<number> => {
if(tokensCount < 10) console.log('try mint', tokensCount, 'tokens');
const tokens = getTokens(tokensCount, owner, property);
const tx = helper.constructApiCall('api.tx.unique.createMultipleItemsEx', [collectionId, {NFT: tokens}]);
if(!(await dryRun(helper.getApi(), signer, tx))) {
if(tokensCount < 2) return 0;
return await tryMintUnsafeRPC(helper, signer, tokensCount - 1, collectionId, owner, property);
}
await helper.executeExtrinsic(signer, 'api.tx.unique.createMultipleItemsEx', [collectionId, {NFT: tokens}]);
return tokensCount;
};

const tryMintExplicit = async (helper: UniqueHelper, signer: IKeyringPair, tokensCount: number, collectionId: number, owner: ICrossAccountId, property?: IProperty): Promise<number> => {
const tokens = getTokens(tokensCount, owner, property);
try {
await helper.executeExtrinsic(signer, 'api.tx.unique.createMultipleItemsEx', [collectionId, {NFT: tokens}]);
}
catch (e) {
if(tokensCount < 2) return 0;
return await tryMintExplicit(helper, signer, tokensCount - 1, collectionId, owner, property);
}
return tokensCount;
};


function sizeOfByteProperty(prop: IProperty) {
return sizeOfEncodedBytes(prop.key) + sizeOfEncodedBytes(prop.value!);
}

function sizeOfProperty(prop: IProperty) {
return sizeOfEncodedStr(prop.key) + sizeOfEncodedStr(prop.value!);
}

function sizeOfInt(i: number) {
if(i < 0 || i > 0xffffffff) throw new Error('out of range');
if(i < 0b11_1111) {
return 1;
} else if(i < 0b11_1111_1111_1111) {
return 2;
} else if(i < 0b11_1111_1111_1111_1111_1111_1111_1111) {
return 4;
} else {
return 5;
}
}

const UTF8_ENCODER = new TextEncoder();
function sizeOfEncodedStr(v: string) {
const encoded = UTF8_ENCODER.encode(v);
return sizeOfInt(encoded.length) + encoded.length;
}

function sizeOfEncodedBytes(bytes: Uint8Array | string) {
return sizeOfInt(bytes.length) + bytes.length;
}

Unchanged files with check annotations Beta

});
itSub('DEFAULT_NFT_COLLECTION_LIMITS', () => {
expect(api.consts.unique.nftDefaultCollectionLimits.toHuman()).to.deep.equal(DEFAULT_COLLETCTION_LIMIT);

Check warning on line 54 in tests/src/apiConsts.test.ts

GitHub Actions / codestyle / yarn_eslint

toHuman results in horrible, hard to debug conversions with no stability guarantees, use Codec/at least .toJson instead
});
itSub('DEFAULT_RFT_COLLECTION_LIMITS', () => {
expect(api.consts.unique.rftDefaultCollectionLimits.toHuman()).to.deep.equal(DEFAULT_COLLETCTION_LIMIT);

Check warning on line 58 in tests/src/apiConsts.test.ts

GitHub Actions / codestyle / yarn_eslint

toHuman results in horrible, hard to debug conversions with no stability guarantees, use Codec/at least .toJson instead
});
itSub('DEFAULT_FT_COLLECTION_LIMITS', () => {
expect(api.consts.unique.ftDefaultCollectionLimits.toHuman()).to.deep.equal(DEFAULT_COLLETCTION_LIMIT);

Check warning on line 62 in tests/src/apiConsts.test.ts

GitHub Actions / codestyle / yarn_eslint

toHuman results in horrible, hard to debug conversions with no stability guarantees, use Codec/at least .toJson instead
});
itSub('MAX_COLLECTION_NAME_LENGTH', () => {
async function nodeAddress(name: string) {
// eslint-disable-next-line require-await
return await usingPlaygrounds(async (helper, _) => {

Check warning on line 22 in tests/src/collator-selection/collatorSelection.seqtest.ts

GitHub Actions / codestyle / yarn_eslint

'_' is defined but never used. Allowed unused args must match /_.+/u
const envNodeStash = `RELAY_UNIQUE_NODE_${name.toUpperCase()}_STASH`;
const nodeStash = process.env[envNodeStash];
let deltaNode: string;
before(async function() {
await usingPlaygrounds(async (helper, privateKey) => {

Check warning on line 94 in tests/src/collator-selection/collatorSelection.seqtest.ts

GitHub Actions / codestyle / yarn_eslint

'privateKey' is defined but never used. Allowed unused args must match /_.+/u
// todo:collator see again if blocks start to be finalized in dev mode
// Skip the collator block production in dev mode, since the blocks are sealed automatically.
if(await helper.arrange.isDevNode()) this.skip();
let crowd: IKeyringPair[];
before(async function() {
await usingPlaygrounds(async (helper, privateKey) => {

Check warning on line 140 in tests/src/collator-selection/collatorSelection.seqtest.ts

GitHub Actions / codestyle / yarn_eslint

'privateKey' is defined but never used. Allowed unused args must match /_.+/u
crowd = await helper.arrange.createCrowd(20, 100n, superuser);
// set session keys for everyone
let crowd: IKeyringPair[];
before(async function() {
await usingPlaygrounds(async (helper, privateKey) => {

Check warning on line 222 in tests/src/collator-selection/collatorSelection.seqtest.ts

GitHub Actions / codestyle / yarn_eslint

'privateKey' is defined but never used. Allowed unused args must match /_.+/u
crowd = await helper.arrange.createCrowd(20, 100n, superuser);
// set session keys for everyone
async function getIdentities(helper: UniqueHelper) {
const identities: [string, any][] = [];
for(const [key, value] of await helper.getApi().query.identity.identityOf.entries())
identities.push([(key as any).toHuman(), (value as any).unwrap()]);

Check warning on line 24 in tests/src/collator-selection/identity.seqtest.ts

GitHub Actions / codestyle / yarn_eslint

toHuman results in horrible, hard to debug conversions with no stability guarantees, use Codec/at least .toJson instead
return identities;
}
}
async function getSubIdentityAccounts(helper: UniqueHelper, address: string) {
return ((await helper.getApi().query.identity.subsOf(address)).toHuman() as any)[1];

Check warning on line 33 in tests/src/collator-selection/identity.seqtest.ts

GitHub Actions / codestyle / yarn_eslint

toHuman results in horrible, hard to debug conversions with no stability guarantees, use Codec/at least .toJson instead
}
async function getSubIdentityName(helper: UniqueHelper, address: string) {
return ((await helper.getApi().query.identity.superOf(address)).toHuman() as any);

Check warning on line 37 in tests/src/collator-selection/identity.seqtest.ts

GitHub Actions / codestyle / yarn_eslint

toHuman results in horrible, hard to debug conversions with no stability guarantees, use Codec/at least .toJson instead
}
describe('Integration Test: Identities Manipulation', () => {