node README

The project's README from github.com/inkonchain/node. As one markdown file: README.md.

Ink Node

Forked and customized from https://github.com/smartcontracts/simple-optimism-node

A Docker Compose setup for running an Ink node on the repository's current op-geth-based stack, plus the supporting healthcheck and monitoring services.

Current Status

This repository currently ships an op-geth execution client. The instructions below are the current op-geth runbook for this Compose stack, not the long-term recommendation.

Per Optimism, op-geth support ends on May 31, 2026, and nodes still running it at the L1 Glamsterdam hardfork will not be able to follow the canonical chain. op-node is not being deprecated. See the op-geth deprecation notice and the op-reth configuration guide.

If you operate a production or long-lived node, start planning an op-reth migration now. Run it in parallel, validate it over a meaningful window, and prepare a fresh snapshot before the hardfork window. Treat this as an operator-owned migration rather than something to delay until a later sequencer-side client switch.

This repository does not yet ship an op-reth Compose path. Before it can, the repo still needs:

Mainnet

Testnet

Prerequisites

On Apple Silicon, the healthcheck sidecar runs as linux/amd64. Docker Desktop handles this automatically, but the first startup can take longer.

Ubuntu install

If you are not logged in as root, log out and back in after adding yourself to the docker group.

sudo apt-get update
sudo apt-get upgrade -y

sudo apt-get install -y curl gnupg ca-certificates lsb-release

sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo usermod -aG docker $(whoami)

Verify Docker after logging back in:

docker ps

Quick Start

1. Clone the repo

git clone https://github.com/inkonchain/node
cd node

2. Copy the env template

cp .env.example .env

3. Edit .env

For the lowest-friction first run on the current op-geth stack, start with ink-sepolia and a full node:

NETWORK_NAME=ink-sepolia
NODE_TYPE=full
OP_NODE__RPC_ENDPOINT=<your Sepolia execution RPC>
OP_NODE__L1_BEACON=<your Sepolia beacon API>
OP_NODE__RPC_TYPE=basic
HEALTHCHECK__REFERENCE_RPC_PROVIDER=https://rpc-gel-sepolia.inkonchain.com

Configuration notes:

4. Start the stack

docker compose up -d --build

This pulls the service images, builds the local bedrock-init image, creates a JWT, and starts:

op-geth and op-node both wait for bedrock-init to create /shared/initialized.txt. If the stack looks stuck, check bedrock-init first.

Validate Startup

Check service status

docker compose ps

Expect the long-running services to be Up. bedrock-init is a one-time init container, so it will usually disappear from default docker compose ps output once it exits. If you want to confirm it finished successfully, run docker compose ps -a and check that bedrock-init exited with code 0.

Check the key logs

docker compose logs --tail 50 bedrock-init op-geth op-node

Good startup signals:

Smoke test the RPC endpoints

Execution RPC for the current op-geth service:

curl -fsS -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' http://127.0.0.1:9993

Rollup node RPC:

curl -fsS -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"rpc_modules","params":[],"id":1}' http://127.0.0.1:9545

On ink-sepolia, a healthy reply includes the optimism, opp2p, and health modules.

Sync status:

curl -fsS -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"optimism_syncStatus","params":[],"id":1}' http://127.0.0.1:9545

On a brand-new full node, this is the best early signal that the rollup node is moving forward. Look for current_l1 and head_l1 values to advance even while local L2 block height is still 0x0.

Healthcheck metrics:

curl -fsS http://127.0.0.1:7300/metrics | grep -E 'healthcheck_(reference_height|target_height|height_difference)'

On a brand-new full node, eth_blockNumber can stay at 0x0 for a while. That is expected. During that window it is also normal for healthcheck_target_height to stay at 0. Use optimism_syncStatus and the healthcheck metrics to confirm the node is moving forward during early sync.

Open Grafana

Grafana is available at http://localhost:3000.

The preloaded dashboard is Simple Node Dashboard.

Operating The Node

View logs

docker compose logs -f --tail 50

Or for a single service:

docker compose logs -f --tail 50 op-node

Stop

docker compose down

This stops the stack without removing data volumes.

Restart

docker compose restart

Upgrade

git pull
docker compose pull
docker compose up -d --build

Wipe All Data

docker compose down -v

This removes all local chain and monitoring data.

Monitoring

Estimate remaining sync time

progress.sh uses Foundry's cast on the host machine.

The bedrock-init container installs Foundry for its own image build, but that does not make cast available on your host shell. Install Foundry locally if you want to use progress.sh.

Install Foundry from https://getfoundry.sh/ and then run:

./progress.sh

On a brand-new full node, ./progress.sh can return Error: Not syncing while eth_blockNumber is still 0x0. In that phase, use optimism_syncStatus and the healthcheck metrics from the validation section, then retry the script after the local block height starts moving.

If you do not want to install cast, use the RPC and metrics checks above instead.

P2P endpoints

The op-node bootstrap and static peers for each network are already set in envs/<network>/op-node.env, so a clean checkout needs no manual peering setup.

The values below are execution-layer peers and are not used by the current stack: op-geth runs with --maxpeers=0 --nodiscover, because op-node runs --syncmode=consensus-layer and payloads arrive over the Engine API. They are recorded here as the reference for the op-reth migration described in Current Status.

op-reth --bootnodes, both networks:

enode://ca2774c3c401325850b2477fd7d0f27911efbf79b1e8b335066516e2bd8c4c9e0ba9696a94b1cb030a88eac582305ff55e905e64fb77fe0edcd70a4e5296d3ec@34.65.175.185:30305?discport=30305
enode://dd751a9ef8912be1bfa7a5e34e2c3785cc5253110bd929f385e07ba7ac19929fb0e0c5d93f77827291f4da02b2232240fbc47ea7ce04c46e333e452f8656b667@34.65.107.0:30305?discport=30305
enode://c5d289b56a77b6a2342ca29956dfd07aadf45364dde8ab20d1dc4efd4d1bc6b4655d902501daea308f4d8950737a4e93a4dfedd17b49cd5760ffd127837ca965@34.65.202.239:30305?discport=30305

op-reth --trusted-peers, mainnet:

enode://61164c944eba34a2d4f50682fd71fa966df42ffcf32bd962810c004acf47f574efd6d0d293bd7c6ffe964524468a98f1cd9427dca2bf54dcfa375d34e5a25fc7@34.178.90.179:30304?discport=30303
enode://3812d9e130a2f45761431935f0e2ad4a12e9389772a96e4e83e48a38722b44f02af7df32204a7a6f6fa91c38f7ba12a03178a7c6d5624dc45f87a79d076a95cb@34.6.15.128:30304?discport=30303
enode://b708474c6db25e99320daebd2d9a8b29139a676fad976e134eb6ca6271d7525510a361efe1b0828e9288b3d33cb8edcb602d8aea335fab086ad6e38251775f91@34.178.42.30:30304?discport=30303

op-reth --trusted-peers, sepolia:

enode://9978a50acf8f7c30c8cbd657a653c2faaf4033c62c9f288a2ae88b31ac121cf5c419788d4f0b45cc5fd75d05e29bd05f59c0c5339b6726c9ea41bca4108f4bcc@34.6.8.218:30304?discport=30303
enode://8e23c7c584b7b0808269dc74f825d68daa0df2a331c92b0c4c638b951607affa4ea614098f98791b68c73922ebbe146a5ae1e40a8d158babb372e11433091499@34.141.131.99:30304?discport=30303
enode://c2dd4ad2f3f5dd2e3d6c77acbb4f96a73d692f3172181caf457863bd9ac0645c4b709b98e8c2fa6e6d218135268635d85224b2623480290ac4dad22f0cb31b4b@35.204.224.2:30304?discport=30303

Troubleshooting

bedrock-init exits quickly on a full node

That is expected. full nodes do not download a snapshot. If you want a snapshot restore path, switch to NODE_TYPE=archive.

bedrock-init says Bedrock node already initialized

That means the stack is reusing existing Docker volumes. This is expected on restarts. If you intentionally want a clean first-boot flow, wipe the volumes:

docker compose down -v

bedrock-init takes a long time on an archive node

That is expected while the snapshot is downloading and extracting. Check:

docker compose logs -f bedrock-init

If image pulls or snapshot downloads fail, make sure the host can reach:

Archive geth snapshots for the current stack are resolved from these indexes:

bedrock-init downloads the matching .sha256 file and verifies the archive before extraction. This is still a geth datadir path, not an op-reth bootstrap flow.

At the time of this docs refresh, the Sepolia Ink Gelato index also exposes reth/full/datadir artifacts, but the checked mainnet Ink index does not yet show reth artifacts. This repository does not consume those reth snapshots yet.

If bedrock-init exits with Failed to resolve latest snapshot or Unexpected snapshot filename format, the index is unreachable or its format changed. Switch back to NODE_TYPE=full and retry, or pick a direct archive from the index page and update the script before retrying.

If bedrock-init exits with Unexpected checksum file format, Checksum file does not match downloaded archive, or SHA256 verification failed, do not reuse that download. Retry later or verify the checksum file from the index page before attempting another restore.

eth_blockNumber stays at 0x0 right after startup

That is normal for a fresh full node. Check the rollup node instead:

curl -fsS -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"optimism_syncStatus","params":[],"id":1}' http://127.0.0.1:9545

./progress.sh says Error: Not syncing

That is expected during the earliest part of a fresh full node bootstrap. The script samples eth_blockNumber twice over 10 seconds, so it cannot estimate sync speed until the local execution client starts importing blocks. Use optimism_syncStatus and the healthcheck metrics first, then retry later.

op-node cannot connect to L1

Double-check:

Then restart the stack:

docker compose down
docker compose up -d --build

error dialing static peer appears in op-node logs

That can happen during early bootstrap if a configured static peer is temporarily unavailable. If those errors continue against every configured peer, inspect envs/<network>/op-node.env and your outbound network access; stale peer endpoints are the usual cause. Note that current_l1 can keep advancing with zero peers, since the node still derives the safe chain from L1 — check opp2p_peerStats.connected to confirm P2P health.

Walking back L1Block appears in the logs

A few reset lines during first startup are normal. If the node keeps printing them without any L1 progress, verify the L1 endpoints above and restart the stack.

node (inkonchain/node)

Searching Database…

36.4K ·GitHub
这是什么?这是一个用于运行 Ink 节点的 Docker Compose 配置。Ink 是基于 OP Stack 构建的以太坊 L2 网络,该配置包括执行客户端、rollup 节点和监控组件。
全节点还是归档节点,我该选哪个?NODETYPE=full 会从空的数据目录(datadir)开始,是经过验证的首次运行方式;NODETYPE=archive 则会从 Gelato ChainSnap 索引下载并校验快照,耗时要长得多。
要怎么把它跑起来?克隆仓库,复制 .env 模板,编辑 NETWORKNAME 和 NODETYPE,然后运行 docker compose up,启动 bedrock-init、op-geth、op-node、healthcheck、prometheus、grafana 和 influxdb。
开始之前需要有 L1 的 RPC 端点吗?需要。你需要一个可用的 L1 执行层 RPC 和 L1 信标(Beacon)API,且其所属的以太坊网络要与你要连接的 Ink 网络相对应。另外,Linux 上需要 Docker Engine/Compose v2,macOS 或 Windows 上需要 Docker Desktop。
op-geth 能一直用下去吗?不能。Optimism 将于 2026 年 5 月 31 日停止对 op-geth 的支持,仍在使用它的节点在 L1 的 Glamsterdam 硬分叉之后将无法继续跟随链的进展。目前这个仓库还没有 op-reth 的 Compose 方案,因此运营者需要自行规划迁移。
谁应该运行它?应该先跑主网还是测试网?文档建议先从 ink-sepolia(测试网)开始,并使用全节点,这是门槛最低的首次运行方式。主网需要 16GB 以上内存和 2TB 的 NVMe SSD,测试网则只需 500GB 存储。
这个也能在 macOS 和 Windows 上跑吗,还是只支持 Linux?支持。Linux 上可使用 Docker Engine/Compose,macOS 和 Windows 上可使用 Docker Desktop。在 Apple Silicon 芯片上,healthcheck 辅助容器会以 linux/amd64 模拟运行,这可能会让首次启动变慢。
我怎么确认节点是否真的在同步?查询 rollup 节点的 optimism_syncStatus,观察 currentL1 和 headL1 是否在不断推进。全新的全节点上,本地 L2 区块高度(eth_blockNumber)可能会在一段时间内保持 0x0,这是正常现象。
在哪里查看节点指标?仓库内置了 Grafana,并预装了 'Simple Node Dashboard'。使用用户名 admin 和密码 ink 登录即可。
能估算剩余的同步时间吗?可以,使用内置的 progress.sh 脚本即可。但它需要在宿主机(而不是容器内)安装 Foundry 的 cast 才能运行。
如果 op-node 连不上 L1 怎么办?请仔细核对 .env 中的 OP_NODE_RPC_ENDPOINT、OP_NODE_L1_BEACON 和 OP_NODE_RPC_TYPE,然后重启整个服务栈。op-node 需要有效的 L1 执行层和信标端点,才能推导出链的数据。
Creator
inkonchain
Size
0.2 MB
Stars
36.4K
Age
2y
Commits · 90 Days