Module 3 - Setup OP Geth Node
Setup OP Geth Node
Section titled “Setup OP Geth Node”This is a non-voting RPC node that users interact with for L2 transactions.
This OP Geth node serves as a non-voting RPC node that enables executing Eth L2 transactions.
Setting up an OP Geth Node needs OP Geth, Rhea, Hercules, Light Client (AKA Proxy), and Postgres.
OP Geth has been modified to calculate gas based on the required Solana compute. It retrieves the required gas value by querying Light Client.
Rhea picks up L2 transactions from OP Geth mempool, composes them into Solana transactions, and submits them to Solana for sequencing.
Solana’s consensus voting nodes execute and vote on the ordering of these transactions. Hercules reads state from Solana nodes and confirms L2 transactions and ordering on OP Geth.
Run Docker containers sequentially in the order below
Section titled “Run Docker containers sequentially in the order below”Postgres
Section titled “Postgres”docker-compose up -d postgres_romedocker logs postgres_rome -f
Wait for the logs print out “database system is ready to accept connections”.
Apply Migrations
Section titled “Apply Migrations”docker-compose up apply_migrations
Light Client
Section titled “Light Client”Light Client provides an Ethereum interface to access Solana state.
This includes providing gas estimates to Geth.
docker-compose up -d proxydocker logs proxy -f
Wait for the logs print out “Starting the RPC server at 0.0.0.0:9090”.
Geth is the rollup client that accepts and executes Eth L2 transactions, and provides transaction results to the user. It is a non-voting RPC node.
docker-compose up -d gethdocker logs geth -f
Wait for the logs print out “HTTP server started”.
Rhea takes rollup transactions from Geth, packages them as Rome Solana transactions, and submits them to Solana for sequencing.
docker-compose up -d rheadocker logs rhea -f
Wait for the logs to print out “Polling: http://geth:8545”.
Hercules
Section titled “Hercules”docker-compose up -d herculesdocker logs hercules -f
Wait for the logs to print out “SolanaBlockLoader is in sync with Solana validator”.
If you are setting up your L2 on a remote machine, then run the nginx container.
Modify romenginx volumes in rome-setup/docker/docker-compose.yml
to use the location of your SSL cert & private key (replace caesar.devnet.romeprotocol.xyz with your domain below):
volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro - /etc/letsencrypt/live/caesar.devnet.romeprotocol.xyz/fullchain.pem:/etc/nginx/ssl/selfsigned.crt:ro - /etc/letsencrypt/live/caesar.devnet.romeprotocol.xyz/privkey.pem:/etc/nginx/ssl/selfsigned.key:ro
docker-compose up -d romenginxdocker logs romenginx -f
Wait for the logs to print out “Configuration complete; ready for start up”.
Restart services if needed
Section titled “Restart services if needed”docker stop romenginx && docker rm romenginxdocker stop hercules && docker rm herculesdocker stop rhea && docker rm rheadocker stop geth && docker rm gethdocker stop proxy && docker rm proxydocker stop postgres_rome && docker rm postgres_rome
docker-compose up -d postgres_romedocker-compose up -d proxydocker-compose up -d gethdocker-compose up -d rheadocker-compose up -d herculesdocker-compose up -d romenginx