How peer choice affects a Hyperliquid node's latency
In article 001 we ran a non-validator Hyperliquid node and compared it with the public data feed. The published root peers a new node starts from are almost all full, so a node that relies on them ends up on whatever peer has a free slot. To get a fast one you have to measure peers yourself. This article shows how we did that and what it bought our node.
Key takeaways
- Moving our node from a root peer in South Korea to a Tokyo peer that we picked by measured lag cut its median BTC trade latency from 284 ms to 179 ms, and the share of trades it received before the public feed rose from 32% to 99.7%.
- Almost no published root peer takes new nodes: 43 of the 46 that answered our free-slot check replied
Peer full. - Picking a peer yourself takes two checks per candidate: how far it lags behind the newest block, at the median or the 95th percentile, and whether it has a free slot.
1. How a node finds its peers
Blocks come from the validators. Each validator streams them to at most two non-validator nodes of its own, its sentry nodes, and every other node gets them through a chain of nodes that starts at one of these.
To join, a new node needs at least one peer to start from, listed in root_node_ips in override_gossip_config.json. Hyperliquid publishes two lists of such root peers: the API returns one for gossipRootIps, and the node README has a table of root peers run by the validator community. The peer a node streams blocks from is its parent peer, and the nodes it streams to are its child peers. A peer with no free slot replies Peer full. With try_new_peers on, the node then tries that peer's child peers, and keeps walking down the tree until one accepts it.
Figure 1. Part of the network page of our internal dashboard: the root peers with the least lag (left) and Tokyo nodes that several root peers list as a child peer (right, ×9 means nine of them). Lag is in blocks behind the newest block. Full and Open are the slot states our node saw. Screenshot taken at 09:15 UTC on 15 November 2026.
We wrote a crawler that does the same walk, asking each node for its child peers (the requests are in the appendix). Starting from the published root peers, it finds about 780 nodes, most of them on neither list. That is how we found candidate peers to measure.
Almost none of the root peers take new nodes. On 15 November our node checked each of the 52 then published for a free slot. Of the 46 that answered, 43 replied Peer full, two gave no clear answer, and one had a free slot. A new node therefore ends up on whichever node below the root peers lets it in. We wanted to know whether choosing that node ourselves makes a difference.
2. What a well-chosen peer gets you
We turned the crawler into an internal service. Every ten seconds it measures how far each node lags behind the newest block, which we take as the highest block height any published root peer reports at that moment. The history we use here runs from 16:15 UTC on 13 November to 05:10 UTC on 14 November. We ran our node (AWS r6i.4xlarge in Tokyo) with two peer setups, one after the other, and compared each with the public feed on the same machine and clock, as in article 001.
With try_new_peers off, the first setup listed 59 peers from the service: the 47 root peers that were answering at the time, then the 12 Tokyo nodes with the lowest lag. Root peers are the obvious first choice, since they are where the README points new nodes. One of B-Harvest's two root peers from the README table accepted our node. It is in South Korea, 32 ms round trip from our machine. Over the 13 hours its median lag behind the newest block was 143 ms, and it had 25 child peers.
For the second setup we pinned the node to a single peer that we selected, a node in Tokyo that is on neither list. When we picked it, its median lag over the three hours of history we had was 66 ms, lower than that of most root peers, and it had a free slot. Over the full 13 hours its median lag was 52 ms. The node restarted at 20:08 UTC, and we started measuring at 20:13.
Figure 2. Our node's median and 95th percentile lag behind the newest block in each 5-minute window. At 20:08 UTC the node was restarted with the selected peer as its only peer. The restart and catch-up are left out. Source: our gossip service, 17:50 UTC 13 November to 04:45 UTC 14 November 2026.
While our node streamed from B-Harvest, its median lag behind the newest block was 175 ms, and 253 ms at the 95th percentile. On the pinned peer it was 57 ms, lower than the median lag of 31 of the 44 root peers that were synced for most of the window, and 127 ms at the 95th percentile.
| BTC trades, ms after the exchange timestamp | Streaming from B-Harvest | Pinned to the selected peer |
|---|---|---|
| Window (UTC) | 17:50 to 20:08 | 20:13 to 04:45 |
| Matched trades | 19,830 | 167,708 |
| Our node, median / p95 / p99 | 284 / 387 / 455 | 179 / 277 / 356 |
| Public feed, median / p95 / p99 | 268 / 445 / 636 | 268 / 503 / 753 |
| Our node first | 32% | 99.7% |
Measured trade by trade, our node was 30 ms behind the public feed at the median in the first setup, and ahead only on the slowest trades. On the pinned peer it was 79 ms ahead at the median and 267 ms ahead at the 95th percentile, and it received the trade first 99.7% of the time. The public feed had the same median, 268 ms, in both windows.
Figure 3. Each dot is one BTC trade. Dots above the dashed line reached our node before the public feed, and the higher a dot sits above the line, the earlier our node got that trade. Latency is the time from the exchange timestamp until the trade arrived. 2,500 evenly spaced trades are shown for each setup, and trades slower than 700 ms (159 and 2,026) are left out. Source: our node and a public-feed collector on the same machine and clock, windows as in the table.
This is one node and one peer per setup, run one setup after the other within 11 hours, for BTC trades only. The two windows differ in more than the peer. The first ran during US trading hours on a Friday, and the second from the US close into the Asian morning, with more than twice as many trades a minute (about 330 against 145). A steady public feed does not show that our node's network conditions were the same in both windows, so these runs alone cannot say how much of the gain came from the peer. Running both setups at the same time on two machines would.
3. How we pick and keep a peer
Our internal service and dashboard (Figure 4) do the following for our node. Each step can also be done by hand.
- Read each candidate's block height (
GossipStatus, port 4002) together with a few root peers' heights, and rank candidates by their median or 95th percentile lag. - Check that a candidate has a free slot by opening a block stream on port 4001 and closing it straight away. The reply is either
Peer fullor the start of the stream. Peers only reply to the IP of a running node, so do this from your node. - List three or four peers in order. On 15 November the selected peer stopped accepting our node. With three more peers listed after it, the node moved to the next one and caught up.
- After switching peers, check the improvement by comparing the latency of your node's trade stream with the public feed's on the same machine, as in Section 2.
Figure 4. The peer-picking page of our internal dashboard, with our node's own card at the top. Screenshot taken at 05:30 UTC on 14 November 2026.
Appendix: the gossip messages and how we measured lag
The gossip protocol is not documented, so we captured our node's traffic with tcpdump while it was looking for peers and matched the bytes against the message names in its log. Each message is a 4-byte big-endian length, a flag byte and a binary payload. We used two requests on port 4002. 0x01 (Peers) returns a peer's child peers, each as an IP address with two flags, verified and connection_count: the same fields the node writes to its log as its child peers. We checked this on our own node: the only node that listed ours as a child was the parent it was streaming from. 0x02 (GossipStatus) returns, among other fields, the peer's latest block height, or nothing while it is still syncing. On port 4001 a node opens a block stream with a short greeting. A peer with no free slot replies with a single byte, 0x04, and otherwise starts the stream. In the node's log the same things appear as verified_node_ips (a peer's Peers list), latest_height (in GossipStatus), Peer full (the reply when a peer has no free slot) and abci stream (the block stream on port 4001).
For lag, we query all nodes at once every ten seconds. We move each answer back by half the lowest round trip we have seen to that node, then shift its height to the round's median time using the chain's block rate, measured from the root peers over the last minute. The newest block is the highest height any root peer reports in that round if a second root peer is within two blocks of it, and the second highest otherwise. We ignore root peers that report heights more than 50 blocks from the rest. Nodes that are still syncing, and a few that report heights from another chain, are left out. Each node's samples are kept as 5-minute medians and 95th percentiles. Lag in blocks is converted to time at the chain's rate of about 14 blocks a second, so one block is about 71 ms.
Our setup
- Node: AWS
r6i.4xlargein Tokyo (ap-northeast-1, zone ID apne1-az1), 16 vCPU, 128 GiB of memory, gp3 volume, Ubuntu 24.04, the machine from article 001.hl-nodeunderhl-visor, run with--write-trades --stream-with-block-info --disable-output-file-buffering. - Peers:
override_gossip_config.jsonwithtry_new_peersoff androot_node_ipsset to the peer list of each setup in Section 2. - Service and dashboard: our own Python crawler, height sampler and web front end on an AWS
t3.smallin Tokyo, with history in SQLite. The free-slot check runs on the node's machine. - Public feed: the same collector as in article 001, subscribed to BTC trades on the public WebSocket API, on the node's machine and clock.

