git.delta.rocks / unique-network / refs/commits / 15ffc18e7f8a

difftreelog

refactor(zombienet) minor fixes and clarity

Fahrrader2023-04-28parent: #48f9af6.patch.diff
in: master

3 files changed

modified.docker/forkless-config/zombienet-forkless-nodata.tomldiffbeforeafterboth
--- a/.docker/forkless-config/zombienet-forkless-nodata.toml
+++ b/.docker/forkless-config/zombienet-forkless-nodata.toml
@@ -18,12 +18,6 @@
 
 [[parachains]]
 id = 1000
-chain_spec_modifier_commands = [[
-  "chainql",
-  "--tla-code=rawSpec=import '{{'raw'|chainSpec}}'",
-  "--tla-str=forkFrom={{ REPLICA_FROM }}",
-  "fork.jsonnet",
-]]
 
   [[parachains.collators]]
   name = "alice"
modifiedlaunch-zombienet.tomldiffbeforeafterboth
--- a/launch-zombienet.toml
+++ b/launch-zombienet.toml
@@ -1,10 +1,10 @@
-# To launch this zombienet out-of-the-box, you can use `yarn frankenstein` in the `tests` folder.
+# To launch this zombienet out-of-the-box, run `yarn frankenstein` in the `tests` folder.
 
 [settings]
 provider = "native"
 
 [relaychain]
-# RELAY_DIR is an environment variable. You should likely specify it as ../polkadot/
+# RELAY_DIR is an environment variable. If you're launching ZN from the repository's root, you should likely specify it as ../polkadot/
 default_command = "{{RELAY_DIR}}target/release/polkadot"
 default_args = [ "-lparachain::candidate_validation=debug", "-lxcm=trace", ]
 chain = "rococo-local"
@@ -24,7 +24,7 @@
 
   [[parachains.collators]]
   name = "alice"
-  # PARA_DIR is an environment variable. You should likely specify it as ./
+  # PARA_DIR is an environment variable. If you're launching ZN from the repository's root, you should likely specify it as ./
   command = "{{PARA_DIR}}target/release/unique-collator"
   ws_port = 9944
   rpc_port = 9933
@@ -33,7 +33,7 @@
 
   [[parachains.collators]]
   name = "bob"
-  # PARA_DIR is an environment variable. You should likely specify it as ./
+  # PARA_DIR is an environment variable. If you're launching ZN from the repository's root, you should likely specify it as ./
   command = "{{PARA_DIR}}target/release/unique-collator"
   ws_port = 9945
   rpc_port = 9934
modifiedtests/src/util/frankenstein.tsdiffbeforeafterboth
96}96}
9797
98const 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 point
102 if (!isUpgradeTesting) {102 if (!isUpgradeTesting) {
120120
121 await cryptoWaitReady();121 await cryptoWaitReady();
122122
123 // Get the relay chain info like the epoch length and spec version123 // Launch Zombienet!
124 // Then restart each parachain's binaries
125 // // Stop and restart each node
126 // // Send specified keys to parachain nodes in case the parachain requires it
127 // If it is not needed to upgrade runtimes themselves, the job is done!
128
129 network = await zombie.start(ZOMBIENET_CREDENTIALS, networkConfig, {silent: false});124 network = await zombie.start(ZOMBIENET_CREDENTIALS, networkConfig, {silent: false});
125
126 // Get the relay chain info like the epoch length and spec version
127 // Then restart each parachain's binaries
128 // // Stop and restart each node
129 // // Send specified keys to parachain nodes in case the parachain requires it
130 // If it is not needed to upgrade runtimes themselves, the job is done!
130131
131 // Record some required information regarding the relay chain132 // Record some required information regarding the relay chain
132 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 }
172173
173 await node.restart();174 await node.restart();
174 // applyaurakey?175 // applyaurakey?
176 // Zombienet handles it on first-time node creation
175 }177 }
176 }178 }
177179