- Published on
Understanding What Ethstats Peer Colours Mean
- Authors
- Name
- Yair Mark
- @yairmark
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:
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:
- Green: numPeers >=4
- Orange: numPeers > 1 and numPeers < 4
- Red: numPeers <=1
- Grey: the node is offline