Actions

Metis RPC endpoint

From Chainlink Community Wiki

Revision as of 16:40, 3 May 2022 by Devtrace (talk | contribs)
MetisLogo.png

Metis RPC endpoint details

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

NOTE

This document assumes base operating system is Debian 10

Metis RPC endpoints:

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

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

Websocket ws://<your_ip_address>:8546

HTTPhttp://<your_ip_address>:8545

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

Deploy Metis RPC Node

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

mkdir ~/.metis-data

We'll need to clone the Metis repo

git clone https://github.com/ericlee42/metis-replica-node-guide

Navigate into the newly cloned directory.

cd metis-replica-node-guide

Then we'll copy the example docker-compose configuration to a used file.

cp docker-compose-mainnet.yml docker-compose.yml

Be sure to update DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT in the newly copied coker-compose file with either your local Ethereum RPC endpoint if you have one, or a reliably hosted option if you don't.

For example, if your local ETH Mainnet RPC endpoint was at http://10.10.10.111:8545, you'd update the file to

DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT=http://10.10.10.111:8545.

With the file updated, we can start the container.

docker-compose up -d dtl

Once that has started successfully, we'll then want to start the L2 service

docker-compose up -d l2geth

Lastly, we'll start the proxy service.

docker-compose up -d proxy