difftreelog
refactor(zombienet) minor fixes and clarity
in: master
3 files changed
.docker/forkless-config/zombienet-forkless-nodata.tomldiffbeforeafterboth181819[[parachains]]19[[parachains]]20id = 100020id = 100021chain_spec_modifier_commands = [[22 "chainql",23 "--tla-code=rawSpec=import '{{'raw'|chainSpec}}'",24 "--tla-str=forkFrom={{ REPLICA_FROM }}",25 "fork.jsonnet",26]]272128 [[parachains.collators]]22 [[parachains.collators]]29 name = "alice"23 name = "alice"launch-zombienet.tomldiffbeforeafterboth1# To launch this zombienet out-of-the-box, you can use `yarn frankenstein` in the `tests` folder.1# To launch this zombienet out-of-the-box, run `yarn frankenstein` in the `tests` folder.223[settings]3[settings]4provider = "native"4provider = "native"556[relaychain]6[relaychain]7# RELAY_DIR is an environment variable. You should likely specify it as ../polkadot/7# RELAY_DIR is an environment variable. If you're launching ZN from the repository's root, you should likely specify it as ../polkadot/8default_command = "{{RELAY_DIR}}target/release/polkadot"8default_command = "{{RELAY_DIR}}target/release/polkadot"9default_args = [ "-lparachain::candidate_validation=debug", "-lxcm=trace", ]9default_args = [ "-lparachain::candidate_validation=debug", "-lxcm=trace", ]10chain = "rococo-local"10chain = "rococo-local"242425 [[parachains.collators]]25 [[parachains.collators]]26 name = "alice"26 name = "alice"27 # PARA_DIR is an environment variable. You should likely specify it as ./27 # PARA_DIR is an environment variable. If you're launching ZN from the repository's root, you should likely specify it as ./28 command = "{{PARA_DIR}}target/release/unique-collator"28 command = "{{PARA_DIR}}target/release/unique-collator"29 ws_port = 994429 ws_port = 994430 rpc_port = 993330 rpc_port = 9933333334 [[parachains.collators]]34 [[parachains.collators]]35 name = "bob"35 name = "bob"36 # PARA_DIR is an environment variable. You should likely specify it as ./36 # PARA_DIR is an environment variable. If you're launching ZN from the repository's root, you should likely specify it as ./37 command = "{{PARA_DIR}}target/release/unique-collator"37 command = "{{PARA_DIR}}target/release/unique-collator"38 ws_port = 994538 ws_port = 994539 rpc_port = 993439 rpc_port = 9934tests/src/util/frankenstein.tsdiffbeforeafterboth96}96}979798const raiseZombienet = async (): Promise<void> => {98const raiseZombienet = async (): Promise<void> => {99 const isUpgradeTesting = !!NEW_RELAY_BIN || !!NEW_RELAY_WASM || !!NEW_RELAY_BIN && !!NEW_PARA_WASM;99 const isUpgradeTesting = !!NEW_RELAY_BIN || !!NEW_RELAY_WASM || !!NEW_PARA_BIN || !!NEW_PARA_WASM;100 /*100 /*101 // If there is nothing to upgrade, what is the point101 // If there is nothing to upgrade, what is the point102 if (!isUpgradeTesting) {102 if (!isUpgradeTesting) {120120121 await cryptoWaitReady();121 await cryptoWaitReady();122122123 // Get the relay chain info like the epoch length and spec version123 // Launch Zombienet!124 // Then restart each parachain's binaries125 // // Stop and restart each node126 // // Send specified keys to parachain nodes in case the parachain requires it127 // If it is not needed to upgrade runtimes themselves, the job is done!128129 network = await zombie.start(ZOMBIENET_CREDENTIALS, networkConfig, {silent: false});124 network = await zombie.start(ZOMBIENET_CREDENTIALS, networkConfig, {silent: false});125126 // Get the relay chain info like the epoch length and spec version127 // Then restart each parachain's binaries128 // // Stop and restart each node129 // // Send specified keys to parachain nodes in case the parachain requires it130 // If it is not needed to upgrade runtimes themselves, the job is done!130131131 // Record some required information regarding the relay chain132 // Record some required information regarding the relay chain132 await network.relay[0].connectApi();133 await network.relay[0].connectApi();133 let relayInfo = getRelayInfo(network.relay[0].apiInstance!);134 let relayInfo = getRelayInfo(network.relay[0].apiInstance!);134 await network.relay[0].apiInstance?.disconnect();135 await network.relay[0].apiInstance!.disconnect();135 if (isUpgradeTesting) {136 if (isUpgradeTesting) {136 console.log('Relay stats:', relayInfo);137 console.log('Relay stats:', relayInfo);137 }138 }172173173 await node.restart();174 await node.restart();174 // applyaurakey?175 // applyaurakey?176 // Zombienet handles it on first-time node creation175 }177 }176 }178 }177179