<p>Sites like bitnodes run their own lite nodes which are crawlers. These nodes connect to other nodes and only receive data from those nodes. When a node receives a new block, it will send it to the nodes it is connected to. If one of these is a bitnodes crawler, it can record that it received a block at height X from the node. In this way it can track the current height of a node.</p>

<p>Furthermore, nodes send their current height when they connect to another node. The crawlers, if they happen to disconnect from a node, can quickly retrieve the latest information about the node once they reconnect by simply waiting for the version message which must be sent in order for the connection to continue (it is part of the handshake at the start of every connection). The version also contains other information such as protocol version number and user agent string.</p>

<p>Other metrics such as <code>up</code> and <code>latency</code> come from the fact that the crawlers have open and active connections to those nodes. The fact that they have a connection means it is up. They can use the <code>ping</code> message to measure latency.</p>

CC BY-SA 4.0
2018-10-23T04:40:43.647Z
2018-10-23T04:40:43.647Z
Ava Chow
<p><strong>How a web-service like bitnode.earn can know each node's blockchain height?</strong></p>

<p>We can get some information of each node in bitcoin network in this web-site:
<a href="https://bitnodes.earn.com/nodes/" rel="nofollow noreferrer">https://bitnodes.earn.com/nodes/</a></p>

<p>And, it is updated regularly(in approximately every 5 minutes).</p>

<p>My question is from here.
How(the method) the web-service can get all the information from all the nodes in the network? They ask those information to all nodes in every 5 minutes? Doesn't it take quite long time to get the responses from all the nodes(about 10K nodes in the network)?
Also, doesn't it required to be in peer-relationship with all of them to request those information?</p>

<p>I'm waiting any answer from you guys. 
Thank you in advance for your nice answer! </p>

CC BY-SA 4.0
2018-10-09T14:15:33.910Z
Possible duplicate of [Is there a way to find how many nodes are there?](https://bitcoin.stackexchange.com/questions/39187/is-there-a-way-to-find-how-many-nodes-are-there)
JBaczuk
CC BY-SA 4.0
2018-10-11T03:50:12.990Z
Yes! The web-site: https://bitnodes.earn.com/nodes/ offers some information such as how many nodes are in current bitcoin network, height of each blockchain and IP addrs, etc.
Inho Choi
<blockchain.info><network><peer-discovery>
How a web-service like bitnode.earn can know each node's blockchain height?
Inho Choi
# How a web-service like bitnode.earn can know each node's blockchain height?

(Asked by: username_0 on 2018-10-09)

**How a web-service like bitnode.earn can know each node's blockchain height?**

We can get some information of each node in bitcoin network in this web-site:
<https://bitnodes.earn.com/nodes/>

And, it is updated regularly(in approximately every 5 minutes).

My question is from here.
How(the method) the web-service can get all the information from all the nodes in the network? They ask those information to all nodes in every 5 minutes? Doesn't it take quite long time to get the responses from all the nodes(about 10K nodes in the network)?
Also, doesn't it required to be in peer-relationship with all of them to request those information?

I'm waiting any answer from you guys.
Thank you in advance for your nice answer!

**Tags:** blockchain.info, network, peer-discovery

> **Comments:**
> **username_1**: Possible duplicate of [Is there a way to find how many nodes are there?](https://bitcoin.stackexchange.com/questions/39187/is-there-a-way-to-find-how-many-nodes-are-there)  
> **username_0**: Yes! The web-site: https://bitnodes.earn.com/nodes/ offers some information such as how many nodes are in current bitcoin network, height of each blockchain and IP addrs, etc.  

---

## 1 answers

### Answer by username_2 on 2018-10-23. Score: 1

Sites like bitnodes run their own lite nodes which are crawlers. These nodes connect to other nodes and only receive data from those nodes. When a node receives a new block, it will send it to the nodes it is connected to. If one of these is a bitnodes crawler, it can record that it received a block at height X from the node. In this way it can track the current height of a node.

Furthermore, nodes send their current height when they connect to another node. The crawlers, if they happen to disconnect from a node, can quickly retrieve the latest information about the node once they reconnect by simply waiting for the version message which must be sent in order for the connection to continue (it is part of the handshake at the start of every connection). The version also contains other information such as protocol version number and user agent string.

Other metrics such as `up` and `latency` come from the fact that the crawlers have open and active connections to those nodes. The fact that they have a connection means it is up. They can use the `ping` message to measure latency.


---

