From 7dd878f2f7764db8c04d7e7313092725be40d420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hussein?= <80422357+nhussein11@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:33:25 -0300 Subject: [PATCH] [Content migration] - Zombienet missing terminal outputs (#60) * fix: adding terminal outputs complments to zombie tutorial * fix: testing pre-commit hook * fix: test4 * fix: formatting --- .../spawn-a-basic-network/alice-logs.html | 26 +++++++ .../spawn-a-basic-network-test-output.html | 74 +++++++++++++++++++ .../tutorials/spawn-a-basic-network.md | 10 ++- 3 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 .snippets/code/tutorials/tooling/zombienet/tutorials/spawn-a-basic-network/alice-logs.html create mode 100644 .snippets/code/tutorials/tooling/zombienet/tutorials/spawn-a-basic-network/spawn-a-basic-network-test-output.html diff --git a/.snippets/code/tutorials/tooling/zombienet/tutorials/spawn-a-basic-network/alice-logs.html b/.snippets/code/tutorials/tooling/zombienet/tutorials/spawn-a-basic-network/alice-logs.html new file mode 100644 index 000000000..9c50e5d1b --- /dev/null +++ b/.snippets/code/tutorials/tooling/zombienet/tutorials/spawn-a-basic-network/alice-logs.html @@ -0,0 +1,26 @@ +
+ tail -f /var/folders/f4/7rdt2m9d7j361dm453cpggbm0000gn/T/zombie-75a01b93c92d571f6198a67bcb380fcd_21724-SEzfCidQ1za4/alice.log +
+ 2024-08-29 16:03:54 🙌 Starting consensus session on top of parent 0x81bfcf7de46ca0f5c0eca78639dbfa67afa0a22c7f1a98dfc5778449cb0a82f9 + 2024-08-29 16:03:54 🎁 Prepared block for proposing at 11 (1 ms) [hash: 0x4ae2c654439a9be25cedd03fb9a091a5be7b53eae82276850e8c7061cb656d26; parent_hash: 0x81bf…82f9; extrinsics (2): [0x469d…d7d3, 0x8dd2…66e8] + 2024-08-29 16:03:54 🔖 Pre-sealed block for proposal at 11. Hash now 0xb74014d0fcd6df55fbe42848e21ddb556aa5f7358c66795e9a5131f0a666dbbc, previously 0x4ae2c654439a9be25cedd03fb9a091a5be7b53eae82276850e8c7061cb656d26. + 2024-08-29 16:03:54 👶 New epoch 1 launching at block 0xb740…dbbc (block slot 287493039 >= start slot 287493039). + 2024-08-29 16:03:54 👶 Next epoch starts at slot 287493049 + 2024-08-29 16:03:54 🏆 Imported #11 (0x81bf…82f9 → 0xb740…dbbc) + 2024-08-29 16:03:54 Node uses the following topology indices index_in_gossip_topology=Some(ValidatorIndex(0)) index_in_parachain_authorities=Some(Active(ValidatorIndex(0))) + 2024-08-29 16:03:57 💤 Idle (2 peers), best: #11 (0xb740…dbbc), finalized #8 (0x2282…6f0d), ⬇ 2.7kiB/s ⬆ 2.1kiB/s + 2024-08-29 16:04:00 🏆 Imported #12 (0xb740…dbbc → 0x49f4…fbd8) + 2024-08-29 16:04:02 💤 Idle (2 peers), best: #12 (0x49f4…fbd8), finalized #9 (0x470a…9184), ⬇ 2.4kiB/s ⬆ 2.1kiB/s + 2024-08-29 16:04:06 🙌 Starting consensus session on top of parent 0x49f420d6d1d84031712f8b7535fdcd73fda740e7a1db6c61c4cf35d8aef9fbd8 + 2024-08-29 16:04:06 🎁 Prepared block for proposing at 13 (5 ms) [hash: 0xd5cb11f7ebc5ece3f9a6c304ab5f6209f1ba148c334efc0844e76dd0815b4ff9; parent_hash: 0x49f4…fbd8; extrinsics (2): [0x9e7c…30ff, 0x7e55…1806] + 2024-08-29 16:04:06 🔖 Pre-sealed block for proposal at 13. Hash now 0xa5022ff182095544d5db8714b2c10d81c75d8aff53c53515f22fcd7220ce97d5, previously 0xd5cb11f7ebc5ece3f9a6c304ab5f6209f1ba148c334efc0844e76dd0815b4ff9. + 2024-08-29 16:04:06 🏆 Imported #13 (0x49f4…fbd8 → 0xa502…97d5) + 2024-08-29 16:04:06 ♻️ Reorg on #13,0xa502…97d5 to #13,0xb6c8…5c34, common ancestor #12,0x49f4…fbd8 + 2024-08-29 16:04:06 🏆 Imported #13 (0x49f4…fbd8 → 0xb6c8…5c34) + 2024-08-29 16:04:07 💤 Idle (2 peers), best: #13 (0xb6c8…5c34), finalized #10 (0x81bf…82f9), ⬇ 4.0kiB/s ⬆ 4.0kiB/s + 2024-08-29 16:04:11 🥩 New Rounds for validator set id: 1 with session_start 11 + 2024-08-29 16:04:11 🥩 Concluded mandatory round #11 + 2024-08-29 16:04:12 🏆 Imported #14 (0xb6c8…5c34 → 0xb51a…f125) + 2024-08-29 16:04:12 💤 Idle (2 peers), best: #14 (0xb51a…f125), finalized #11 (0xb740…dbbc), ⬇ 2.8kiB/s ⬆ 3.5kiB/s + ... +
diff --git a/.snippets/code/tutorials/tooling/zombienet/tutorials/spawn-a-basic-network/spawn-a-basic-network-test-output.html b/.snippets/code/tutorials/tooling/zombienet/tutorials/spawn-a-basic-network/spawn-a-basic-network-test-output.html new file mode 100644 index 000000000..9c0852051 --- /dev/null +++ b/.snippets/code/tutorials/tooling/zombienet/tutorials/spawn-a-basic-network/spawn-a-basic-network-test-output.html @@ -0,0 +1,74 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
🛎️ Tests are currently running. Results will appear at the end
Test Results
8/29/2024, 4:34:53 PM✅ alice: is up (104ms)
2024-08-29 16:34:54 API/INIT: RPC methods not decorated: chainHead_v1_body, chainHead_v1_call, chainHead_v1_continue, chainHead_v1_follow, chainHead_v1_header, chainHead_v1_stopOperation, chainHead_v1_storage, chainHead_v1_unfollow, chainHead_v1_unpin, chainSpec_v1_chainName, chainSpec_v1_genesisHash, chainSpec_v1_properties, transactionWatch_v1_submitAndWatch, transactionWatch_v1_unwatch, transaction_v1_broadcast, transaction_v1_stop
2024-08-29 16:34:54 API/INIT: rococo/1014000: Not decorating unknown runtime apis: 0x6ff52ee858e6c5bd/1, 0x91b1c8b16328eb92/1, 0x9ffb505aa738d69c/1
8/29/2024, 4:34:56 PM✅ alice: parachain 100 is registered within 225 seconds (2362ms)
8/29/2024, 4:34:58 PM✅ alice: parachain 100 block height is at least 10 within 250 seconds (2037ms)
8/29/2024, 4:34:58 PM✅ bob: is up (43ms)
2024-08-29 16:34:58 API/INIT: RPC methods not decorated: chainHead_v1_body, chainHead_v1_call, chainHead_v1_continue, chainHead_v1_follow, chainHead_v1_header, chainHead_v1_stopOperation, chainHead_v1_storage, chainHead_v1_unfollow, chainHead_v1_unpin, chainSpec_v1_chainName, chainSpec_v1_genesisHash, chainSpec_v1_properties, transactionWatch_v1_submitAndWatch, transactionWatch_v1_unwatch, transaction_v1_broadcast, transaction_v1_stop
2024-08-29 16:34:58 API/INIT: rococo/1014000: Not decorating unknown runtime apis: 0x6ff52ee858e6c5bd/1, 0x91b1c8b16328eb92/1, 0x9ffb505aa738d69c/1
8/29/2024, 4:35:00 PM✅ bob: parachain 100 is registered within 225 seconds (2206ms)
8/29/2024, 4:35:02 PM✅ bob: parachain 100 block height is at least 10 within 250 seconds (2037ms)
8/29/2024, 4:35:02 PM✅ alice: reports node_roles is 4 (0ms)
8/29/2024, 4:35:02 PM✅ alice: reports sub_libp2p_is_major_syncing is 0 (0ms)
8/29/2024, 4:35:02 PM✅ bob: reports node_roles is 4 (1ms)
8/29/2024, 4:35:02 PM✅ collator01: reports node_roles is 4 (22ms)
📓 To see the full logs of the nodes please go to:
/var/folders/f4/7rdt2m9d7j361dm453cpggbm0000gn/T/zombie-68b7ea2539c6ce9ad6350d8a88674147_-90400-wSMnGnsj9Gnu/logs
Result: 10/10
exit code 0
+
diff --git a/develop/application-devs/tooling/zombienet/tutorials/spawn-a-basic-network.md b/develop/application-devs/tooling/zombienet/tutorials/spawn-a-basic-network.md index b9d77f4b4..90c2bc91b 100644 --- a/develop/application-devs/tooling/zombienet/tutorials/spawn-a-basic-network.md +++ b/develop/application-devs/tooling/zombienet/tutorials/spawn-a-basic-network.md @@ -191,7 +191,11 @@ To check the nodes’ logs, you can use the provided command listed by the outpu tail -f /var/folders/f4/7rdt2m9d7j361dm453cpggbm0000gn/T/zombie-75a01b93c92d571f6198a67bcb380fcd_21724-SEzfCidQ1za4/alice.log ``` -After running this command, you will see the logs of the `alice` node in real-time, which can be useful for debugging purposes. The logs of the `bob` and `collator01` nodes can be checked similarly. +After running this command, you will see the logs of the `alice` node in real-time, which can be useful for debugging purposes. The logs will be displayed in the terminal in the following format: + +--8<-- 'code/tutorials/tooling/zombienet/tutorials/spawn-a-basic-network/alice-logs.html' + +The logs of the `bob` and `collator01` nodes can be checked similarly. ## Running a Test @@ -234,4 +238,6 @@ To run the test, execute the following command: zombienet -p native test spawn-a-basic-network-test.zndsl ``` -This command will execute the test scenario defined in the `spawn-a-basic-network-test.zndsl` file on the network. If successful, the terminal will display the test output, indicating whether the test passed or failed. \ No newline at end of file +This command will execute the test scenario defined in the `spawn-a-basic-network-test.zndsl` file on the network. If successful, the terminal will display the test output, indicating whether the test passed or failed. For example, the following output shows the test results for the basic network: + +--8<-- 'code/tutorials/tooling/zombienet/tutorials/spawn-a-basic-network/spawn-a-basic-network-test-output.html' \ No newline at end of file