git clone https://github.com/smartcontracts/simple-optimism-node.git
cd simple-optimism-node
Copy .env.example to .env
cp .env.example .env
Configure the .env file
This is a sample of how to configure the .env for op-sepolia node
If port 8545 isn't working, you can connect to the default port for the l2 geth execution node port - 9993
###############################################################################
# ↓ REQUIRED ↓ #
###############################################################################
# Network to run the node on ("op-mainnet" or "op-sepolia")
NETWORK_NAME=op-sepolia
# Type of node to run ("full" or "archive"), note that "archive" is 10x bigger
NODE_TYPE=archive
###############################################################################
# ↓ REQUIRED (BEDROCK) ↓ #
###############################################################################
# L1 node that the op-node (Bedrock) will get chain data from
OP_NODE__RPC_ENDPOINT=<l1-endpoint>
# L1 beacon endpoint, you can setup your own or use Quicknode
OP_NODE__L1_BEACON=<l1-beacon-endpoint>
# Type of RPC that op-node is connected to, see README
OP_NODE__RPC_TYPE=basic
# Reference L2 node to run healthcheck against
HEALTHCHECK__REFERENCE_RPC_PROVIDER=https://sepolia.optimism.io
###############################################################################
# ↓ OPTIONAL (BEDROCK) ↓ #
###############################################################################
# Optional provider to serve legacy RPC requests, see README
OP_GETH__HISTORICAL_RPC=https://mainnet.optimism.io
# Set to "full" to force op-geth to use --syncmode=full
OP_GETH__SYNCMODE=
###############################################################################
# ↓ OPTIONAL ↓ #
###############################################################################
# Feel free to customize your image tag if you want, uses "latest" by default
# See here for all available images: https://hub.docker.com/u/ethereumoptimism
IMAGE_TAG__L2GETH=
IMAGE_TAG__DTL=
IMAGE_TAG__HEALTCHECK=
IMAGE_TAG__PROMETHEUS=
IMAGE_TAG__GRAFANA=
IMAGE_TAG__INFLUXDB=
IMAGE_TAG__OP_GETH=
IMAGE_TAG__OP_NODE=
# Exposed server ports (must be unique)
# See docker-compose.yml for default values
PORT__L2GETH_HTTP=8545
PORT__L2GETH_WS=
PORT__DTL=
PORT__HEALTHCHECK_METRICS=
PORT__PROMETHEUS=
PORT__GRAFANA=
PORT__INFLUXDB=
PORT__TORRENT_UI=
PORT__TORRENT=
PORT__OP_GETH_HTTP=
PORT__OP_GETH_WS=
PORT__OP_GETH_P2P=
PORT__OP_NODE_P2P=
PORT__OP_NODE_HTTP=
Run progress.sh to estimate remaining sync time and speed.
./progress.sh
Chain ID: 11155420
Sampling, please wait
Blocks per minute: 30
Hours until sync completed: ...
Grafana dashboard
Grafana is exposed at http://localhost:3000 and comes with one pre-loaded dashboard ("Simple Node Dashboard").
Use the following login details to access the dashboard:
Username: admin
Password: optimism
Query Node
Check Sync Status
curl -H "Content-Type: application/json" \
-X POST --data '{"jsonrpc":"2.0", "method":"eth_syncing", "params":[], "id":1}' \
http://localhost:8545 or 9993
# If node is done syncing - the response should resemble the below.
{"jsonrpc":"2.0","id":1,"result":false}