Network check

Check whether RPC and GraphQL endpoints are sync and running same currency

Same backend implementation, two different usage:

  • Runs in the background which can be disabled with -d/--disable-check general option. The executed command will fail in case of an issue
  • With network-check command to display a table (green or red fields)

Checks

  • Check the indexer and RPC endpoints are running the same currency by checking the genesis block hash
  • Check the indexer and the RPC endpoint are sync: same block number and hash, one block late on the indexer is accepted and should be warned
  • Indexer type and version compatibility

Checks at start-up

  • Run checks at start-up
  • Checked by default, option to disable check

When would a user want to disable the check? To get faster command execution in case we are sure the network is fine (ie check earlier). Or if we want to hack around.

Otherwise, being able to disable the check is convenient for the tests. The tests fails since requests are made twice on the indexer with same function (the network check, then the command it-self) which can be patch once.

Inconsistencies

  • network-check: check done twice: use "caching": re-use NetworkCheck instance stored into the context
  • about: running a network check on a command not requiring network access
Edited by Moul