Created a pair of network debugging tools to help with some issues we were having, but they should work for other parachains as well. Mostly for my own use cases, but feel free to fork/PR/hack away!
- A generic libp2p tool to check connections GitHub - ProjectLibertyLabs/p2p-peer-test: CLI tool to test libp2p connections and discover peer protocols
Why? If you run a chain node in a more complex setup, you have to setup the p2p ports correctly. This can be hard to test directly, but now you can! Take that multiaddr and run npx @projectlibertylabs/p2p-peer-test <multiaddr> and see if it can connect and fetch the list!
Example:
$ npx @projectlibertylabs/p2p-peer-test /dns/polkadot-bootnode-0.polkadot.io/tcp/30333/p2p/12D3KooWSz8r2WyCdsfWHgPyvD8GKQdJ1UAiRmrcrs8sQB3fe2KU
Testing 1 multiaddr...
[1/1] /dns/polkadot-bootnode-0.polkadot.io/tcp/30333/p2p/12D3KooWSz8r2WyCdsfWHgPyvD8GKQdJ1UAiRmrcrs8sQB3fe2KU
✅ Connected (814ms)
Peer ID: 12D3KooWSz8r2WyCdsfWHgPyvD8GKQdJ1UAiRmrcrs8sQB3fe2KU
Protocols (33):
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/beefy/2
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/beefy/justifications/1
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/block-announces/1
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/grandpa/1
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/kad
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/light/2
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/req_attested_candidate/2
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/req_available_data/1
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/req_chunk/1
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/req_chunk/2
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/req_collation/1
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/req_collation/2
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/req_pov/1
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/send_dispute/1
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/state/2
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/sync/2
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/sync/warp
• /91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3/transactions/1
• /dot/block-announces/1
• /dot/light/2
• /dot/state/2
• /dot/sync/2
• /dot/sync/warp
• /dot/transactions/1
• /ipfs/id/1.0.0
• /ipfs/id/push/1.0.0
• /ipfs/ping/1.0.0
• /paritytech/grandpa/1
• /polkadot/req_available_data/1
• /polkadot/req_chunk/1
• /polkadot/req_collation/1
• /polkadot/req_pov/1
• /polkadot/send_dispute/1
==================================================
Summary: 1/1 connections successful
Total time: 827ms
✅ /dns/polkadot-bootnode-0.polkadot.io/tcp/30333/p2p/12D3KooWSz8r2WyCdsfWHgPyvD8GKQdJ1UAiRmrcrs8sQB3fe2KU
✅ 1 successful
Also should work on any other libp2p using setups, but mostly tested on Polkadot-SDK nodes.
- A visualizer for forks and inclusion: Rollup Inspector
- Visit: https://frequency-chain.github.io/rollup-inspector/
- Github: GitHub - frequency-chain/rollup-inspector: A Polkadot Rollup Inspector
The visual view of the PAPI Dev Console has been great, but if you are debugging inclusion, slots, or other forking issues it can be a pain to collect the data. Instead just connect up and this tool gets you all the details from both the parachain and relay chain at the same time! Test it out on most any active parachain and see. (hasn’t been well tested on all chains as is mostly aura-based assumptions)
Mostly built for my own needs, but if they are helpful to others, all the better!