git.delta.rocks / unique-network / refs/commits / 87b886ad64f9

difftreelog

refactor(zombienet) superuser const + transfer dump ownership to UniqueNetwork

Fahrrader2023-06-06parent: #7c6ffe9.patch.diff
in: master

3 files changed

modifiedtests/package.jsondiffbeforeafterboth
13 "@types/node": "^20.2.3",13 "@types/node": "^20.2.3",
14 "@typescript-eslint/eslint-plugin": "^5.47.0",14 "@typescript-eslint/eslint-plugin": "^5.47.0",
15 "@typescript-eslint/parser": "^5.47.0",15 "@typescript-eslint/parser": "^5.47.0",
16 "@zombienet/orchestrator": "https://gitpkg.now.sh/Fahrrader/zombienet/javascript/packages/orchestrator?767fa6226b7f6a43d674063d63c5bc505db1253c",16 "@zombienet/orchestrator": "https://gitpkg.now.sh/UniqueNetwork/zombienet/javascript/packages/orchestrator?767fa6226b7f6a43d674063d63c5bc505db1253c",
17 "@zombienet/utils": "https://gitpkg.now.sh/Fahrrader/zombienet/javascript/packages/utils?767fa6226b7f6a43d674063d63c5bc505db1253c",17 "@zombienet/utils": "https://gitpkg.now.sh/UniqueNetwork/zombienet/javascript/packages/utils?767fa6226b7f6a43d674063d63c5bc505db1253c",
18 "chai": "^4.3.6",18 "chai": "^4.3.6",
19 "chai-subset": "^1.6.0",19 "chai-subset": "^1.6.0",
20 "eslint": "^8.25.0",20 "eslint": "^8.25.0",
modifiedtests/src/util/frankenstein.tsdiffbeforeafterboth
32const NEW_PARA_BIN = process.env.NEW_PARA_BIN;32const NEW_PARA_BIN = process.env.NEW_PARA_BIN;
33const NEW_PARA_WASM = process.env.NEW_PARA_WASM;33const NEW_PARA_WASM = process.env.NEW_PARA_WASM;
34const PARACHAIN_BLOCK_TIME = 12_000;34const PARACHAIN_BLOCK_TIME = 12_000;
35const SUPERUSER_KEY = '//Alice';
3536
36let network: zombie.Network | undefined;37let network: zombie.Network | undefined;
3738
84// Enable or disable maintenance mode if present on the chain85// Enable or disable maintenance mode if present on the chain
85async function toggleMaintenanceMode(value: boolean, wsUri: string) {86async function toggleMaintenanceMode(value: boolean, wsUri: string) {
86 await usingPlaygrounds(async (helper, privateKey) => {87 await usingPlaygrounds(async (helper, privateKey) => {
87 const superuser = await privateKey('//Alice');88 const superuser = await privateKey(SUPERUSER_KEY);
88 try {89 try {
89 const toggle = value ? 'enable' : 'disable';90 const toggle = value ? 'enable' : 'disable';
90 await helper.getSudo().executeExtrinsic(superuser, `api.tx.maintenance.${toggle}`, []);91 await helper.getSudo().executeExtrinsic(superuser, `api.tx.maintenance.${toggle}`, []);
198 // Read the new WASM code and set it as the relay's new code199 // Read the new WASM code and set it as the relay's new code
199 const code = fs.readFileSync(NEW_RELAY_WASM).toString('hex');200 const code = fs.readFileSync(NEW_RELAY_WASM).toString('hex');
200 await usingPlaygrounds(async (helper, privateKey) => {201 await usingPlaygrounds(async (helper, privateKey) => {
201 const superuser = await privateKey('//Alice');202 const superuser = await privateKey(SUPERUSER_KEY);
202203
203 const result = await helper.executeExtrinsic(204 const result = await helper.executeExtrinsic(
204 superuser,205 superuser,
255 const code = fs.readFileSync(NEW_PARA_WASM);256 const code = fs.readFileSync(NEW_PARA_WASM);
256 const codeHash = blake2AsHex(code);257 const codeHash = blake2AsHex(code);
257 await usingPlaygrounds(async (helper, privateKey) => {258 await usingPlaygrounds(async (helper, privateKey) => {
258 const superuser = await privateKey('//Alice');259 const superuser = await privateKey(SUPERUSER_KEY);
259260
260 upgradingParas[paraId] = {version: getSpecVersion(helper.getApi()), upgraded: false};261 upgradingParas[paraId] = {version: getSpecVersion(helper.getApi()), upgraded: false};
261262
modifiedtests/yarn.lockdiffbeforeafterboth
1162 "@typescript-eslint/types" "5.59.6"1162 "@typescript-eslint/types" "5.59.6"
1163 eslint-visitor-keys "^3.3.0"1163 eslint-visitor-keys "^3.3.0"
11641164
1165"@zombienet/orchestrator@https://gitpkg.now.sh/Fahrrader/zombienet/javascript/packages/orchestrator?767fa6226b7f6a43d674063d63c5bc505db1253c":1165"@zombienet/orchestrator@https://gitpkg.now.sh/UniqueNetwork/zombienet/javascript/packages/orchestrator?767fa6226b7f6a43d674063d63c5bc505db1253c":
1166 version "0.0.41"1166 version "0.0.41"
1167 resolved "https://gitpkg.now.sh/Fahrrader/zombienet/javascript/packages/orchestrator?767fa6226b7f6a43d674063d63c5bc505db1253c#41f589f64638aad0ea9ec6519b4a0be1214d3e91"1167 resolved "https://gitpkg.now.sh/UniqueNetwork/zombienet/javascript/packages/orchestrator?767fa6226b7f6a43d674063d63c5bc505db1253c#41f589f64638aad0ea9ec6519b4a0be1214d3e91"
1168 dependencies:1168 dependencies:
1169 "@polkadot/api" "^10.7.1"1169 "@polkadot/api" "^10.7.1"
1170 "@polkadot/keyring" "^12.1.2"1170 "@polkadot/keyring" "^12.1.2"
1198 toml "^3.0.0"1198 toml "^3.0.0"
1199 ts-node "^10.9.1"1199 ts-node "^10.9.1"
12001200
1201"@zombienet/utils@https://gitpkg.now.sh/Fahrrader/zombienet/javascript/packages/utils?767fa6226b7f6a43d674063d63c5bc505db1253c":1201"@zombienet/utils@https://gitpkg.now.sh/UniqueNetwork/zombienet/javascript/packages/utils?767fa6226b7f6a43d674063d63c5bc505db1253c":
1202 version "0.0.20"1202 version "0.0.20"
1203 resolved "https://gitpkg.now.sh/Fahrrader/zombienet/javascript/packages/utils?767fa6226b7f6a43d674063d63c5bc505db1253c#e0ae62f61a115cc036c1168ae175622726d0fdbf"1203 resolved "https://gitpkg.now.sh/UniqueNetwork/zombienet/javascript/packages/utils?767fa6226b7f6a43d674063d63c5bc505db1253c#e0ae62f61a115cc036c1168ae175622726d0fdbf"
1204 dependencies:1204 dependencies:
1205 cli-table3 "^0.6.2"1205 cli-table3 "^0.6.2"
1206 debug "^4.3.4"1206 debug "^4.3.4"