1

Is there a way to find the number of nodes in the ethereum network using the web3 javascript console?

There is a command to find the number of peers, but couldn't find a query to get the total number of nodes in the network.

2

The decentralized nature of the Ethereum network makes it hard to know how many nodes are connected at a given moment, since there's no central registry where every node should connect. Web3.js doesn't have a method that returns such query.

Block explorer like ethernodes.org approximate that number querying seval known nodes. You can try asking them if they provide a public api.

0

To have info about the no of peers connected at any moment try admin.peers.

  • 1
    Question is about the total number of nodes, not peers. – Roman Frolov Jan 31 '18 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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