Skip to main content

FiberGuard

On the consensus layer (eth2) network, we offer direct peering connections to our nodes. As a result, your connected beacon node will receive blocks over the P2P connection as soon as our network sees them. This can result in a significant latency decrease compared to the standard P2P network: anywhere from 500ms to 2 seconds. For more information about FiberGuard, check out this section in the use cases.

Requirements

note

We assume that you've signed up for the FiberGuard plan and we have your ENR registered in our system. To get this information about your node, you can query the following endpoint: http://<beacon_node_api>/eth/v1/node/identity.

Fiber Multiaddress

Once you've signed up for the plan, you will have received the multiaddress of one of our nodes based on your location. A multiaddress looks like this: /ip4/151.150.191.80/tcp/9000/p2p/16Ui...aXRz. This multiaddress encodes the network information (IP address and TCP port), as well as the P2P peer ID (16Ui...aXRz).

Static Peer ID

Ideally, you have configured your node with a static peer ID so we don't have to go through the process of registering your information every time you restart your beacon node. Instructions on how to do that for the major consensus clients can be found below:

Enabled by default.

Setting Up

For ensuring the most reliable connection, your beacon node should add the Fiber peer as a static and trusted peer. Static means the connection will always be retried on failure. Trusted means the peer is safe from any peer scoring systems or pruning routines. Below we outline how to do this for the different consensus clients:

Lighthouse requires 2 options to be set. Static multiaddress:

--libp2p-addresses <MULTIADDR>

Trusted peer:

--trusted-peers <PEER_ID>

Checking the Connection

If everything went well, your beacon node should now be connected to our Fiber node. You can check the connection status by querying the beacon API (usually on port 5052).

For example:

curl localhost:5052/eth/v1/node/peers/<PEER_ID>

where <PEER_ID> is the peer ID of the Fiber node.

The response should indicate a connected state like in the example response below:

{
"data": {
"peer_id": "QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N",
"enr": "enr:-IS4QHCYrYZbAKWCBRlAy5zzaDZXJBGkcnh4MHcBFZntXNFrdvJjX04jRzjzCBOonrkTfj499SZuOh8R33Ls8RRcy5wBgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQPKY0yuDUmstAHYpMa2_oxVtw0RW_QAdpzBQA8yWM0xOIN1ZHCCdl8",
"last_seen_p2p_address": "/ip4/7.7.7.7/tcp/4242/p2p/QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N",
"state": "connected",
"direction": "outbound"
}
}