Published on

Understanding What Ethstats Peer Colours Mean


When working with Ethereum one of the ways of visualising what is happening on the blockchain is using the visual tool Ethstats. The version of this for the public Ethereum blockchain can be found here (Note: this only shows nodes where the owner of those nodes has configured it to communicate with Ethstats and does not show all nodes on the public blockchain).

The one issue I ran into was not understanding what the different colours mean for the different peers. There are 4 colours as can be seen in the screenshot below:

Ethstats peer colours

If you hover over one of the node names (the values in the second column) it does not give a reason for the colour. The source code for this is available on Github here. After searching through it I found the following which explains the meaning behind these colours:

function peerClass(peers, active) {
  if (!active) return 'text-gray'

  return peers <= 1 ? 'text-danger' : peers > 1 && peers < 4 ? 'text-warning' : 'text-success'

So in a nutshell the colours are assigned as follows:

  1. Green: numPeers >=4
  2. Orange: numPeers > 1 and numPeers < 4
  3. Red: numPeers <=1
  4. Grey: the node is offline