设置 OP Geth 节点

通过 Docker 启动 Postgres、轻客户端、Geth、Rhea、Hercules 以及可选的 Nginx 的步骤。

此 OP Geth 节点作为一个非投票的 RPC 节点,用于执行以太坊 L2 交易。

  • 设置 OP Geth 节点需要 OP Geth、Rhea、Hercules、轻客户端(也称为 Proxy)和 Postgres。

  • 已对 OP Geth 进行修改以根据所需的 Solana 计算量来计算 gas。它通过查询轻客户端来获取所需的 gas 值。

  • Rhea 从 OP Geth 的内存池中获取 L2 交易,将其组装为 Solana 交易,并将其提交到 Solana 以进行排序。

  • Solana 的共识投票节点执行并对这些交易的排序进行投票。Hercules 从 Solana 节点读取状态,并在 OP Geth 上确认 L2 交易及其排序。

机器规格

我们建议使用具有以下规格的 Ubuntu 机器。但也支持 macOS。

4 核,8GB 内存,1TB 存储,8MBit/sec 网络带宽

例如:AWS c5a.2xlarge,Ubuntu,x86_64,EBS 1 TB GP3

通过一条命令运行 Docker 容器

docker compose up -d

或者,按顺序运行下面的 Docker 容器

1

Postgres

docker compose up -d postgres_rome
docker logs postgres_rome -f

等待日志打印出 “database system is ready to accept connections”。

2

应用迁移

docker compose up apply_migrations
3

轻客户端

轻客户端为以太坊提供访问 Solana 状态的接口。

这包括为 Geth 提供 gas 估算。

docker compose up -d proxy_rome
docker logs proxy_rome -f

等待日志打印出 “Starting the RPC server at 0.0.0.0:9090”。

4

Geth

Geth 是接收并执行以太坊 L2 交易的 rollup 客户端,并向用户提供交易结果。它是一个非投票的 RPC 节点。

docker compose up -d geth
docker logs geth -f

等待日志打印出 “HTTP server started”。

5

Rhea

Rhea 从 Geth 获取 rollup 交易,将其打包为 Rome Solana 交易,并将其提交到 Solana 以进行排序。

docker compose up -d rhea
docker logs rhea -f

等待日志打印出 “Polling: http://geth:8545”。

6

Hercules

Hercules 从 Solana 节点读取状态,并在 OP Geth 上确认 L2 交易及其排序。

docker compose up -d hercules
docker logs hercules -f

等待日志打印出 “SolanaBlockLoader is in sync with Solana validator”。

7

存款界面

存款界面允许用户存入和提取 SOL,以兑换用于 Rome 上 gas 支付的 rSOL。

docker compose up -d depositui
docker logs depositui -f
8

Nginx

docker compose up -d romenginx
docker logs romenginx -f

等待日志打印出 “Configuration complete; ready for start up”。

如有需要,重启服务

Docker 容器概览

你运行的 Docker 容器列在如下。

Docker 容器
用途

proxy_rome

轻客户端

geth

OP Geth

rhea

Rhea

hercules

Hercules

postgres_rome

Postgres 数据库

apply_migrations

Postgres 迁移

deposuitui

存款界面

romenginx

Nginx 代理

最后更新于

这有帮助吗?