Setting Up a Local Gateway
Below are instructions for setting up the required bloXroute local gateway.
Requirements:
The instructions below assume you already have a server, are running a node and that you are using Docker. In addition to using the docker start up command, you can set up a local gateway using the startup script provided here.
Please make sure you have downloaded the certificates available in the bloXroute account portal. Save the certificate and secret hash to a folder. For example,
/usr/local/bloxroute-certificate
You should generate a private and public key pair. (For detailed instructions on how to create a public and private key pair, go here.)
Installation
To pull the latest gateway version, run the following command:
Running your gateway
To run your gateway, copy the command below and modify it as needed. See the table below for additional information about various parameters and how you might need to change them. You will need the enode value and IP address of your blockchain node. The --eth-ws-uri
argument is optional, however we do recommend using it.
Setting your gateway as a trusted peer
The bloXroute Gateway connects to the blockchain node as a peer. If the blockchain node runs out of peer slots, it will reject the Gateway connection with a "too many peers" error. To overcome this, add the Gateway as a βtrusted peer.β
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.
You will need to obtain the gateway enode. You can look up the enode from the Gateway log during the startup process by grep-ing for the word βenodeβ.
Open the nodeβs console and add the Gateway as a trusted peer using command admin.addTrustedPeer(<gateway_enode>). Note that the IP address and port do not need to be included.
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 runninggeth dumpconfig
. This step is required asadmin.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.
Last updated