Actions

Arbitrum RPC endpoint: Difference between revisions

From Chainlink Community Wiki

(Created page with "{{:Box-round|title=NOTE|This document assumes base operating system is Debian 10}} <br> This is a general guide on deploying an Arbitrum RPC endpoint for your Chainlink Node(s). Official Arbitrum Docs are available [https://developer.offchainlabs.com/docs/running_node here] <br> <br> <H2>Arbitrum RPC endpoints:</H2> '''Websocket''' <code>ws://<your_ip_address>:8548</code> <br> <br> '''HTTP'''<code>http://<your_ip_address>:8547</code> <br> <br> <H2>Install Docker-CE</H2...")
 
No edit summary
Line 1: Line 1:
[[File:Arbitrum Logo.png|center|thumb]]
{{: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}}
<br>
<br>
Line 7: Line 8:
<br>
<br>
<H2>Arbitrum RPC endpoints:</H2>
<H2>Arbitrum RPC endpoints:</H2>
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''' <code>ws://<your_ip_address>:8548</code>
'''Websocket''' <code>ws://<your_ip_address>:8548</code>
<br>
<br>
Line 17: Line 22:


<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.
Now, we'll need to get our aptitude sources updated to include the Docker-CE repository.
Line 26: Line 32:
<code>curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
<code>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"</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.
<code>exit</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.
Line 32: Line 39:


{{: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>}}


Since we've modified our aptitude sources, we'll need to update them before we can install docker-ce
Since we've modified our aptitude sources, we'll need to update them before we can install docker-ce


<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.
Now that we have Docker-CE installed, we'll need to add our user to the docker group.
Line 43: Line 52:
<code>sudo usermod -aG docker $USER</code>
<code>sudo usermod -aG docker $USER</code>
   
   
Next, we'll get our Arbitrum node deployed and synced.
Next, we'll get our Arbitrum node deployed and synced.
<br>
<br>
Line 50: Line 60:


<code>mkdir ~/.arbitrum-data</code>
<code>mkdir ~/.arbitrum-data</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
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 ~/.arbitrum-data</code>
<code>chmod 777 ~/.arbitrum-data</code>
Now that we have the host directory properly configured for the Arbitrum container's volume, we can deploy the container.


Now that we have the host directory properly configured for the Arbitrum container's volume, we can deploy the container.
Now that we have the host directory properly configured for the Arbitrum container's volume, we can deploy the container.

Revision as of 17:11, 21 March 2022

Arbitrum Logo.png

NOTE

This document assumes base operating system is Debian 10


This is a general guide on deploying an Arbitrum RPC endpoint for your Chainlink Node(s).

Official Arbitrum Docs are available here

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.

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

Once we have added the repo and the necessary key, we want to exit the root user. exit

NOTE

You should see your shell prompt displaying a $ 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.

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 node deployed and synced.

Deploy Arbitrum RPC Node

First, we'll need to create a new directory house the container volume.

mkdir ~/.arbitrum-data 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

chmod 777 ~/.arbitrum-data Now that we have the host directory properly configured for the Arbitrum container's volume, we can deploy the container.

Now that we have the host directory properly configured for the Arbitrum container's volume, we can deploy the container.

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 --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>

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.