Actions

Moonbeam RPC endpoint: Difference between revisions

From Chainlink Community Wiki

(Created page with "{| | style="text-align:center; width: 100px; background-color:#f6f6f6;" | 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).<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 D...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{|
{|
| style="text-align:center; width: 100px; background-color:#f6f6f6;" | [[File:Arbitrum Logo.png|center|left|frameless|75px|]]
| style="text-align:center; width: 100px; background-color:#f6f6f6;" | [[File:Moonbeam.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).<br>[https://developer.offchainlabs.com/docs/running_node Official Arbitrum Docs are available here]
| style="background-color:#f6f6f6;" | <h2>Moonbeam RPC endpoint details</h2>This is a general guide on deploying an Moonbeam RPC endpoint for your Chainlink Node(s).<br>[https://docs.moonbeam.network/node-operators/networks/run-a-node/docker/ Official Moonbeam 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>Moonbeam RPC endpoints:</H2>
You Chainlink node has two connections methods.  Websocket and HTTP.
You Chainlink node has two connections methods.  Websocket and HTTP.


As these can vary between networks, the default values for an Arbitrum node are:
As these can vary between networks, the default values for an Moonbeam node are:


'''Websocket''' <code>ws://<your_ip_address>:8548</code>
'''Websocket''' <code>ws://<your_ip_address>:8548</code>
Line 52: Line 52:
   
   


Next, we'll get our Arbitrum node deployed and synced.
Next, we'll get our Moonbeam node deployed and synced.
<br>
<br>
<br>
<br>
<H2>Deploy Arbitrum RPC Node</H2>
<H2>Deploy Moonbeam RPC Node</H2>
First, we'll need to create a new directory house the container volume.
First, we'll need to create a new directory house the container volume.


<code>mkdir ~/.arbitrum-data</code>
<code>sudo mkdir /var/lib/moonbeam-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
<code>sudo chown -R <username> /var/lib/moonbeam-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
Now that we have the host directory properly configured for the Moonbeam container's volume, we can deploy the container.


<code>chmod 777 ~/.arbitrum-data</code>
<pre style="white-space:pre-wrap; width:100%; border:1px solid lightgrey; background:black; color:white;">docker run --network="host" -v "/var/lib/moonbeam-data:/data" \
Now that we have the host directory properly configured for the Arbitrum container's volume, we can deploy the container.
  --name moonbeam-rpc-node \
 
  -u $(id -u ${USER}):$(id -g ${USER}) \
Now that we have the host directory properly configured for the Arbitrum container's volume, we can deploy the container.
  -d purestake/moonbeam:v0.21.0 \
 
  --base-path=/data \
Be sure to modify the command; replace <L1_ETH_RPC> with your Ethereum Mainnet RPC endpoint.
  --chain moonbeam \
 
  --name="<username>" \
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
  --execution wasm \
 
  --wasm-execution compiled \
<code>--l1.url=http://10.10.10.111:8545</code>.
  --pruning archive \
 
  --state-cache-size 1 \
<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>
  --db-cache 6144 \
<br>
  -- \
<br>
  --execution wasm \
<H2>Possible Error Messages</H2>
  --pruning 1000 \
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.
  --name="<username>"</pre>
 
You can check.confirm that this is your issue by running the command
<code>sudo cat /proc/cpuinfo | grep avx</code>
If you see that command return an empty line, then this is your issue.

Latest revision as of 16:14, 11 April 2022

Moonbeam.png

Moonbeam RPC endpoint details

This is a general guide on deploying an Moonbeam RPC endpoint for your Chainlink Node(s).
Official Moonbeam Docs are available here

NOTE

This document assumes base operating system is Debian 10

Moonbeam RPC endpoints:

You Chainlink node has two connections methods. Websocket and HTTP.

As these can vary between networks, the default values for an Moonbeam 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 Moonbeam node deployed and synced.

Deploy Moonbeam RPC Node

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

sudo mkdir /var/lib/moonbeam-data sudo chown -R <username> /var/lib/moonbeam-data

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

docker run --network="host" -v "/var/lib/moonbeam-data:/data" \
  --name moonbeam-rpc-node \
  -u $(id -u ${USER}):$(id -g ${USER}) \
  -d purestake/moonbeam:v0.21.0 \
  --base-path=/data \
  --chain moonbeam \
  --name="<username>" \
  --execution wasm \
  --wasm-execution compiled \
  --pruning archive \
  --state-cache-size 1 \
  --db-cache 6144 \
  -- \
  --execution wasm \
  --pruning 1000 \
  --name="<username>"