filnetdiag

command module
v0.0.0-...-20ab36f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2021 License: Apache-2.0, MIT Imports: 44 Imported by: 0

README

Filecoin Network Diagnosis tool

filnetdiag is a tool for performing network connectivity checks. It can perform several checks:

  • check-bootstrappers: verifies and records whether bootstrapper nodes are reachable.
  • check-miners: verifies and records whether miners are connectable. For each miner, it attempts to resolve multiaddrs from the DHT and from their miner actor. It subsequently tries to connect to them by establishing a libp2p connection.
  • check-block-publishers: verifies and records whether nodes publishing blocks in blocks gossipsub topic are connectable. It subscribes to the topic, and for each message, it attempts to locate the author's peer ID in the DHT. If found, it attempts to establish a libp2p connection.

There are 60k+ miners registered in the Filecoin network, but around 1400 of them are actively mining (as of 19th Feburary 2021). To speed up the check-miners check, this repo ships with a cache of all miners, in descending order of their quality-adjusted power. By default, the check-miners check runs against the 100 top miners, but you can adjust this passing in a different value to the --top flag.

To regenerate the cache, use the gen-miner-cache subcommand.

Finally, there is a WIP analyze to process reports and print a summary.

Run it

Assuming you have the Go toolchain installed:

$ git clone https://github.com/raulk/filnetdiag
$ go build .
$ ./filnetdiag --help

External IP

This tool records your external IP in the report, to aid analysis. It records four observations, as reported by:

JSON-RPC API endpoints

This tool uses the JSON-RPC endpoints hosted by the Glif team (thanks!). Overriding at runtime is currently not implemented. To use a different API endpoint (e.g. a local Filecoin node), change te Endpoint const before compiling.

Author/maintainer

@raulk.

License

Dual-licensed: MIT, Apache Software License v2, by way of the Permissive License Stack.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL