¶ Optimism RPC endpoint detailsThis is a general guide on deploying an Optimism RPC endpoint for your Chainlink Node(s). |
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>:9546
HTTPhttp://<your_ip_address>:9545
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: 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
For the above permission change to take effect, you must log out of your SSH session and reconnect
Lastly, we'll install docker-compose
sudo curl -L "
https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose
Next, we'll get our Optimism node deployed and synced.
With docker and docker-compose installed, we're good to get our Optimism Node deployed.
First, we'll clone the Optimism repository.
git clone
https://github.com/ethereum-optimism/optimism.git
Change directory into the optimism/infra/op-replica/docker-compose
cd optimism/infra/op-replica/docker-compose
Copy the example example environment file to one that we will use.
cp default-mainnet.env .env
With a copy of the default values, let's edit the new .env file to the desired values
nano .env
An example .env file is provided below:
Be sure to change <http://your_eth_rpc:8545> to your desired Ethereum Mainnet RPC endpoint.
For example, if you wanted to use a local RPC endpoint at IP address 10.10.10.111, you'd adjust that line from <http://your_eth_rpc:8545> to http://10.10.10.111:8545
### SYNC FROM L1 ###
DATA_TRANSPORT_LAYER__SYNC_FROM_L1=false
#ROLLUP_BACKEND=l1
DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT=https://$YOUR_ETHEREUM_RPC:8545
### SYNC FROM L2 ###
DATA_TRANSPORT_LAYER__SYNC_FROM_L2=true
ROLLUP_BACKEND=l2
DATA_TRANSPORT_LAYER__L2_RPC_ENDPOINT=https://$THIRD_PARTY_OPTIMISM_RPC
#DATA_TRANSPORT_LAYER__L2_RPC_ENDPOINT=https://#THIRD_PARTY_OPTIMISM_RPC
DATA_TRANSPORT_LAYER__POLLING_INTERVAL=500
### FAULT DETECTOR ###
FAULT_DETECTOR__L1_RPC_PROVIDER=https://$YOUR_ETHEREUM_RPC8545
### HEALTH CHECK ###
HEALTHCHECK__REFERENCE_RPC_PROVIDER=https://$THIRD_PARTY_OPTIMISM_RPC
#HEALTHCHECK__REFERENCE_RPC_PROVIDER=https://$THIRD_PARTY_OPTIMISM_RPC
#SEQUENCER_CLIENT_HTTP=https://$THIRD_PARTY_OPTIMISM_RPC
SEQUENCER_CLIENT_HTTP=https://$THIRD_PARTY_OPTIMISM_RPC
Now that we've made the necessary changes to the environment file, we can go ahead and start the containers.
docker-compose up -d
We can check the status of our node by checking the logs in the replica-healthcheck container
docker-compose logs -f replica-healthcheck