Arbitrum RPC endpoint: Difference between revisions
From Chainlink Community Wiki
No edit summary |
No edit summary |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{| | {| | ||
| style="text-align:center; width: | | style="text-align:center; width: 100px; background-color:#f6f6f6;" | [[File:Arbitrum Logo.png|center|left|frameless|75px|]] | ||
| style="background-color:#f6f6f6;" | <h2>Arbitrum RPC endpoint details</h2>This is a general guide on deploying an Arbitrum RPC endpoint for your Chainlink Node(s). [https://developer.offchainlabs.com/docs/running_node Official Arbitrum Docs are available here] | | style="background-color:#f6f6f6;" | <h2>Arbitrum RPC endpoint details</h2>This is a general guide on deploying an Arbitrum RPC endpoint for your Chainlink Node(s).<br>[https://developer.offchainlabs.com/docs/running_node Official Arbitrum Docs are available here] | ||
|} | |} | ||
---- | |||
{{:Box-round|title=NOTE|This document assumes base operating system is Debian 10}} | {{:Box-round|title=NOTE|This document assumes base operating system is Debian 10}} | ||
<H2>Arbitrum RPC endpoints:</H2> | <H2>Arbitrum RPC endpoints:</H2> | ||
Line 19: | Line 12: | ||
'''Websocket''' <code>ws://<your_ip_address>:8548</code> | '''Websocket''' <code>ws://<your_ip_address>:8548</code> | ||
'''HTTP'''<code>http://<your_ip_address>:8547</code> | '''HTTP'''<code>http://<your_ip_address>:8547</code> | ||
<H2>Install Docker-CE</H2> | <H2>Install Docker-CE</H2> | ||
Install dependencies first. | Install dependencies first. | ||
<code>sudo apt update && sudo apt upgrade && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common</code> | <code>sudo apt update && sudo apt upgrade && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common</code> | ||
Now, we'll need to get our aptitude sources updated to include the Docker-CE repository. | Now, we'll need to get our aptitude sources updated to include the Docker-CE repository. | ||
Line 36: | Line 29: | ||
<code>sudo su</code> | <code>sudo su</code> | ||
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"</code> | <code>curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -</code> | ||
<code>add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"</code> | |||
Once we have added the repo and the necessary key, we want to exit the root user. | Once we have added the repo and the necessary key, we want to exit the root user. | ||
<code>exit</code> | <code>exit</code> | ||
{{:Box-round|title=NOTE|You should see your shell prompt displaying a <code>$</code> if you're a non-root user. If you're in an elevated (root) TTY session, your shell prompt will display a <code>#</code>}} | {{:Box-round|title=NOTE|You should see your shell prompt displaying a <code>$</code> if you're a non-root user. If you're in an elevated (root) TTY session, your shell prompt will display a <code>#</code>}} | ||
Line 50: | Line 46: | ||
<code>sudo apt update && sudo apt install docker-ce</code> | <code>sudo apt update && sudo apt install docker-ce</code> | ||
Now that we have Docker-CE installed, we'll need to add our user to the docker group. | Now that we have Docker-CE installed, we'll need to add our user to the docker group. | ||
Line 59: | Line 55: | ||
Next, we'll get our Arbitrum | Next, we'll get our Arbitrum RPC And Relay nodes deployed and synced, but we'll create a docker network for the containers first. | ||
< | |||
< | |||
<H2>Deploy Arbitrum | <H2>Create a Docker Network</H2> | ||
First, we'll need to create a new directory house the | |||
<code>docker network create --driver bridge --subnet 192.168.1.0/24 --gateway 192.168.1.1 arbitrum-network</code> | |||
The above will create a docker network that we will use for our containers. This enables the traffic between the containers to stay within the host. | |||
<H2>Deploy Arbitrum Relay Node</H2> | |||
First, we'll need to create a new directory house the containers volumes. | |||
<code>mkdir -p ~/.arbitrum-data/relay</code> | |||
Due to the fact that the arbitrum container uses a non-root UID 1000 user, we'll want to open the permissions on that newly created directory | Due to the fact that the arbitrum container uses a non-root UID 1000 user, we'll want to open the permissions on that newly created directory | ||
<code>chmod 777 -R ~/.arbitrum-data</code> | |||
Now that we have the host directory properly configured for the Arbitrum containers' volumes, we can deploy the containers. | |||
<code> | <code>docker run --name arbitrum-mainnet-relay --net arbitrum-network --link arbitrum-mainnet-rpc --ip 192.168.1.24 --restart unless-stopped -it -v ~/arbitrum-mainnet/relay:/home/user/.arbitrum/mainnet -p 0.0.0.0:9642:9642 --entrypoint /home/user/go/bin/arb-relay offchainlabs/arb-node:v1.4.0-f4bbe91 --feed.input.url wss://arb1.arbitrum.io/feed </code> | ||
<H2>Deploy Arbitrum RPC Node</H2> | |||
Be sure to modify the command; replace <L1_ETH_RPC> with your Ethereum Mainnet RPC endpoint. | Be sure to modify the command; replace <L1_ETH_RPC> with your Ethereum Mainnet RPC endpoint. | ||
Line 81: | Line 91: | ||
<code>--l1.url=http://10.10.10.111:8545</code>. | <code>--l1.url=http://10.10.10.111:8545</code>. | ||
<code>docker run --name arbitrum-rpc --restart unless-stopped -d -v ~/.arbitrum-data/:/home/user/.arbitrum/mainnet -p 8547:8547 -p 8548:8548 offchainlabs/arb-node:v1.2.0-9214e38 --feed.input.url=wss://arb1.arbitrum.io/feed --l1.url=<L1_ETH_RPC></code> | |||
<code>docker run --name arbitrum-rpc --net arbitrum-network --link arbitrum-mainnet-relay --ip 192.168.1.42 --restart unless-stopped -d -v ~/.arbitrum-data/:/home/user/.arbitrum/mainnet -p 8547:8547 -p 8548:8548 offchainlabs/arb-node:v1.2.0-9214e38 --feed.input.url=wss://arb1.arbitrum.io/feed --l1.url=<L1_ETH_RPC> --feed.input.url ws://192.168.1.24:9642</code> | |||
<H2>Possible Error Messages</H2> | <H2>Possible Error Messages</H2> | ||
Depending on your hypervisor/environment, your logging may throw an exit code 132, if this happens, you will need to enable Advanced Vector Extensions (AVX), or pass CPU flags to the guest OS. | Depending on your hypervisor/environment, your logging may throw an exit code 132, if this happens, you will need to enable Advanced Vector Extensions (AVX), or pass CPU flags to the guest OS. |
Latest revision as of 16:01, 4 August 2022
Arbitrum RPC endpoint detailsThis is a general guide on deploying an Arbitrum RPC endpoint for your Chainlink Node(s).Official Arbitrum Docs are available here |
NOTE
Arbitrum RPC endpoints:
You Chainlink node has two connections methods. Websocket and HTTP.
As these can vary between networks, the default values for an Arbitrum node are:
Websocket ws://<your_ip_address>:8548
HTTPhttp://<your_ip_address>:8547
Install Docker-CE
Install dependencies first.
sudo apt update && sudo apt upgrade && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
Now, we'll need to get our aptitude sources updated to include the Docker-CE repository.
These commands must be run as root.
sudo su
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
Once we have added the repo and the necessary key, we want to exit the root user.
exit
NOTE
$
if you're a non-root user. If you're in an elevated (root) TTY session, your shell prompt will display a #
Since we've modified our aptitude sources, we'll need to update them before we can install docker-ce
sudo apt update && sudo apt install docker-ce
Now that we have Docker-CE installed, we'll need to add our user to the docker group.
(The prevents us from having to run docker commands with elevated (root) permissions)
sudo usermod -aG docker $USER
Next, we'll get our Arbitrum RPC And Relay nodes deployed and synced, but we'll create a docker network for the containers first.
Create a Docker Network
docker network create --driver bridge --subnet 192.168.1.0/24 --gateway 192.168.1.1 arbitrum-network
The above will create a docker network that we will use for our containers. This enables the traffic between the containers to stay within the host.
Deploy Arbitrum Relay Node
First, we'll need to create a new directory house the containers volumes.
mkdir -p ~/.arbitrum-data/relay
Due to the fact that the arbitrum container uses a non-root UID 1000 user, we'll want to open the permissions on that newly created directory
chmod 777 -R ~/.arbitrum-data
Now that we have the host directory properly configured for the Arbitrum containers' volumes, we can deploy the containers.
docker run --name arbitrum-mainnet-relay --net arbitrum-network --link arbitrum-mainnet-rpc --ip 192.168.1.24 --restart unless-stopped -it -v ~/arbitrum-mainnet/relay:/home/user/.arbitrum/mainnet -p 0.0.0.0:9642:9642 --entrypoint /home/user/go/bin/arb-relay offchainlabs/arb-node:v1.4.0-f4bbe91 --feed.input.url wss://arb1.arbitrum.io/feed
Deploy Arbitrum RPC Node
Be sure to modify the command; replace <L1_ETH_RPC> with your Ethereum Mainnet RPC endpoint.
For example, if your local ETH Mainnet RPC endpoint was at http://10.10.10.111:8545, you'd adjust that part of the command to
--l1.url=http://10.10.10.111:8545
.
docker run --name arbitrum-rpc --net arbitrum-network --link arbitrum-mainnet-relay --ip 192.168.1.42 --restart unless-stopped -d -v ~/.arbitrum-data/:/home/user/.arbitrum/mainnet -p 8547:8547 -p 8548:8548 offchainlabs/arb-node:v1.2.0-9214e38 --feed.input.url=wss://arb1.arbitrum.io/feed --l1.url=<L1_ETH_RPC> --feed.input.url ws://192.168.1.24:9642
Possible Error Messages
Depending on your hypervisor/environment, your logging may throw an exit code 132, if this happens, you will need to enable Advanced Vector Extensions (AVX), or pass CPU flags to the guest OS.
You can check.confirm that this is your issue by running the command
sudo cat /proc/cpuinfo | grep avx
If you see that command return an empty line, then this is your issue.