Add Your Gateway as a Trusted Peer to Your Execution Layer Client

To ensure your gateway and your node stay connected, you must add the gateway to your node's list of trusted peers.

Adding your gateway enode to your node's console

The bloXroute Gateway connects to your blockchain node as a peer. In some situations, your node might reach the limit of peers it can connect to. At this point, the node will start rejecting certain connections. To ensure the connection to the gateway is not rejected, you should set the gateway as a trusted peer by suppling the gateway enode to the node.
The below instructions are for adding a gateway as a trusted peer in Geth. Over 70% of the nodes in the Ethereum Mainnet use Geth. If your node runs a different client and you do not know how to change the commands below accordingly, please contact support.
  1. 1.
    Open the node’s console and add the gateway as a trusted peer using the command below. Note that for this to work, you should have started your gateway with your gateway's private key, which is specified using the --private-key startup argument.
  1. 2.
    Edit the geth config file and add the gateway to TrustedNodes in the [Node.P2P] section. You can generate a config file that matches your current configuration by running geth dumpconfig.
This step is required as admin.addTrustedPeer is not retained after a node restarts. If you do not change this configuration, you will need to add the gateway as a trusted peer every time you restart your node.


I do not have my gateway's public key. What should I do?

We highly recommend starting off the gateway setup process by generating a public and private key pair as not doing so might cause problems whenever you restart the gateway. More information can be found in the Requirements page.
However, if needed, you can use the enode generated automatically by the Gateway. Grep for the word “enode” in the gateway log file that was generated during the startup process. Below is an example of the log reporting the enode:
grep example
"Started P2P networking self=enode://08141a65c2b5fa0e9d1e562bd732743c07a1d2a2e921b0fe209a74b59dca2d0cbbc4bc3ea21138e405f6e77ba804c996e9b2ae2d20bab30bd6b58b2d041a85f5@"
A new Gatewayenode will be generated every time the gateway is restarted or updated, which means you will need to add the Gateway enode as a trusted peer in geth again. For an immutable enode Gateway ID, please use the process at the top of the page.