6

Where should I start and what advice can you give to help me get started with this task.

I guess my goal is to build a network monitoring tool that can check the health, uptime and reputation of the nodes in the network on per chain basis.

I also want to use this list to build out my bootstrap list dynamically as the network grows, publishing this to DNS/IPFS/other so that our implementation can consume this list.

3
  • 1
    You can retrieve the currently connected peers of your substate nodes using the system_peers RPC call. The current telemetry server can give you an idea of how many nodes are on each network (at least those who have enabled telemetry), however it doesn't publish the nodes IP and Ports. Commented Mar 24, 2022 at 9:36
  • Maybe the question should be what existing polkadot network monitoring tools are out there?
    – Squirrel
    Commented Mar 24, 2022 at 10:40
  • Well I'd like to walk the network if possible. But yeah great idea for another Q
    – M Kemp
    Commented Mar 24, 2022 at 11:31

1 Answer 1

4

An easy way to monitor the network condition is to host your own Telemetry server just like how Parity provides the public service. You can find the code at here. The substrate client will connect to the default telemetry endpoint if the user doesn't change it by cli flags. The default endpoint is stored in your chain spec file. So if you want to monitor your own blockchain, this could be a good enough approach.

However, as pointed out in the comments, the Telemetry connection can always be opt-out by the user. To get a more accurate list, you can run your own crawler to walk the network. This is especially useful if you want to monitor a network without asking users to opt-in your telemetry service. Walking the p2p network is a pretty common pattern used by Bitcoin dns seed crawler. I didn't see any working code for Substrate, but since Substrate uses libp2p, maybe you can check if some existing ipfs crawler can work with slightly tweaks.

1
  • 1
    If you manage to run a crawler on a substrate network, please share with us! It's super interesting.
    – h4x3rotab
    Commented Apr 11, 2022 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.