Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync fork repo #18

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d3770e1
Update op-node to v1.7.6 and op-geth to v1.101315.1 (#263)
danyalprout May 28, 2024
f722031
docs(readme): HDD requirements (#262)
wbnns Jun 8, 2024
2dfb660
clarify that HOST_IP should be set to external ip address for better …
Jun 12, 2024
b63b798
fix missing end quote on nat IP (#273)
coffeexcoin Jun 13, 2024
acc4e30
chore: add reth configuration & cleanup configs (#271)
danyalprout Jun 14, 2024
d056b51
Update Reth for Fjord CL Support (#277)
danyalprout Jun 17, 2024
f0eb7f1
op-node: v1.7.7 / op-geth: v1.101315.2 / op-reth: v1.0.0-rc.2 (#279)
danyalprout Jun 20, 2024
2dbf4a4
fix: typo in natextip for op-geth (#281)
danyalprout Jun 20, 2024
50fc6e9
restore recommendation for NVME drive (#282)
Jun 24, 2024
8e7460e
Update Reth (#286)
danyalprout Jun 27, 2024
5652221
chore: remove unused env vars (#291)
danyalprout Jul 7, 2024
44912b2
Update README.md (#302)
evslatts Jul 22, 2024
37a3020
chore: update reth version & return to upstream (#308)
danyalprout Aug 7, 2024
90f047f
Update op-node to 1.9.0 and op-geth to v1.101315.3 (#309)
henridevieux Aug 7, 2024
d1639e1
chore: update reth (v1.0.5), op-node (v1.9.0) (#310)
danyalprout Aug 10, 2024
5234654
Update geth-entrypoint (#311)
web3-nodeops Aug 12, 2024
f69654d
Upgrade to op-node 1.9.1 (#317)
henridevieux Aug 30, 2024
fb05db2
docs(readme): Add additional recommended specs for running a node (#307)
wbnns Sep 17, 2024
d42810f
Allow execution nodes to act as peers for other nodes (#330)
benaadams Sep 27, 2024
c41489f
Enable discovery for reth node (#314)
walkerlala Sep 30, 2024
f038903
Add Nethermind (#329)
stdevMac Oct 21, 2024
47c0680
op-node(1.9.4), op-geth(v1.101411.0), op-reth(1.1.0) (#337)
danyalprout Oct 21, 2024
d15d4fe
Remove reth arm64 build (running out of memory) (#338)
mdehoog Oct 21, 2024
d44e4da
Upgrade to OP version 1.9.5 (#350)
henridevieux Nov 18, 2024
f9ab89c
Upgrade op-node(v1.10.0), op-geth(v1.101411.2), and op-reth(v1.1.2) (…
henridevieux Nov 22, 2024
923f340
Update README.md (#345)
Olexandr88 Nov 28, 2024
1d5d06b
Upgrade op-node(v1.10.2) op-geth(v1.101411.4) and reth(v1.1.4) (#367)
henridevieux Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
geth-data/
reth-data/
nethermind-data/
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
GETH_HOST_DATA_DIR=./geth-data
CLIENT=${CLIENT:-geth}
HOST_DATA_DIR=./${CLIENT}-data
12 changes: 8 additions & 4 deletions .env.mainnet
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
OP_GETH_GENESIS_FILE_PATH=mainnet/genesis-l2.json
RETH_CHAIN=base
RETH_SEQUENCER_HTTP=https://mainnet-sequencer.base.org
OP_GETH_SEQUENCER_HTTP=https://mainnet-sequencer.base.org
OP_SEQUENCER_HTTP=https://mainnet-sequencer.base.org

# [optional] used to enable geth stats:
# OP_GETH_ETH_STATS=nodename:secret@host:port
# OP_NETHERMIND_ETHSTATS_ENABLED=true
# OP_NETHERMIND_ETHSTATS_NODE_NAME=NethermindNode
# OP_NETHERMIND_ETHSTATS_ENDPOINT=ethstats_endpoint

# [required] replace with your preferred L1 (Ethereum, not Base) node RPC URL:
OP_NODE_L1_ETH_RPC=https://1rpc.io/eth
Expand All @@ -13,9 +18,8 @@ OP_NODE_L1_BEACON=https://your.mainnet.beacon.node/endpoint-here
# auth secret used by op-geth engine API:
OP_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a

OP_NODE_BETA_EXTRA_NETWORKS=true
OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt
OP_NODE_L2_ENGINE_RPC=ws://geth:8551
OP_NODE_L2_ENGINE_RPC=ws://execution:8551
OP_NODE_LOG_LEVEL=info
OP_NODE_METRICS_ADDR=0.0.0.0
OP_NODE_METRICS_ENABLED=true
Expand All @@ -26,7 +30,6 @@ OP_NODE_P2P_BOOTNODES=enr:-J24QNz9lbrKbN4iSmmjtnr7SjUMk4zB7f1krHZcTZx-JRKZd0kA2g
OP_NODE_P2P_LISTEN_IP=0.0.0.0
OP_NODE_P2P_LISTEN_TCP_PORT=9222
OP_NODE_P2P_LISTEN_UDP_PORT=9222
OP_NODE_ROLLUP_CONFIG=mainnet/rollup.json
OP_NODE_RPC_ADDR=0.0.0.0
OP_NODE_RPC_PORT=8545
OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log
Expand All @@ -43,4 +46,5 @@ OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true
# To enable snap sync, uncomment and set the env vars below:
# OP_NODE_SYNCMODE=execution-layer
# OP_GETH_BOOTNODES=enode://87a32fd13bd596b2ffca97020e31aef4ddcc1bbd4b95bb633d16c1329f654f34049ed240a36b449fda5e5225d70fe40bc667f53c304b71f8e68fc9d448690b51@3.231.138.188:30301,enode://ca21ea8f176adb2e229ce2d700830c844af0ea941a1d8152a9513b966fe525e809c3a6c73a2c18a12b74ed6ec4380edf91662778fe0b79f6a591236e49e176f9@184.72.129.189:30301,enode://acf4507a211ba7c1e52cdf4eef62cdc3c32e7c9c47998954f7ba024026f9a6b2150cd3f0b734d9c78e507ab70d59ba61dfe5c45e1078c7ad0775fb251d7735a2@3.220.145.177:30301,enode://8a5a5006159bf079d06a04e5eceab2a1ce6e0f721875b2a9c96905336219dbe14203d38f70f3754686a6324f786c2f9852d8c0dd3adac2d080f4db35efc678c5@3.231.11.52:30301,enode://cdadbe835308ad3557f9a1de8db411da1a260a98f8421d62da90e71da66e55e98aaa8e90aa7ce01b408a54e4bd2253d701218081ded3dbe5efbbc7b41d7cef79@54.198.153.150:30301
# OP_NETHERMIND_BOOTNODES=enode://87a32fd13bd596b2ffca97020e31aef4ddcc1bbd4b95bb633d16c1329f654f34049ed240a36b449fda5e5225d70fe40bc667f53c304b71f8e68fc9d448690b51@3.231.138.188:30301,enode://ca21ea8f176adb2e229ce2d700830c844af0ea941a1d8152a9513b966fe525e809c3a6c73a2c18a12b74ed6ec4380edf91662778fe0b79f6a591236e49e176f9@184.72.129.189:30301,enode://acf4507a211ba7c1e52cdf4eef62cdc3c32e7c9c47998954f7ba024026f9a6b2150cd3f0b734d9c78e507ab70d59ba61dfe5c45e1078c7ad0775fb251d7735a2@3.220.145.177:30301,enode://8a5a5006159bf079d06a04e5eceab2a1ce6e0f721875b2a9c96905336219dbe14203d38f70f3754686a6324f786c2f9852d8c0dd3adac2d080f4db35efc678c5@3.231.11.52:30301,enode://cdadbe835308ad3557f9a1de8db411da1a260a98f8421d62da90e71da66e55e98aaa8e90aa7ce01b408a54e4bd2253d701218081ded3dbe5efbbc7b41d7cef79@54.198.153.150:30301
# OP_GETH_SYNCMODE=snap
12 changes: 8 additions & 4 deletions .env.sepolia
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
OP_GETH_GENESIS_FILE_PATH=sepolia/genesis-l2.json
RETH_CHAIN=base-sepolia
RETH_SEQUENCER_HTTP=https://sepolia-sequencer.base.org
OP_GETH_SEQUENCER_HTTP=https://sepolia-sequencer.base.org
OP_SEQUENCER_HTTP=https://sepolia-sequencer.base.org

# [optional] used to enable geth stats:
# OP_GETH_ETH_STATS=nodename:secret@host:port
# OP_NETHERMIND_ETHSTATS_ENABLED=true
# OP_NETHERMIND_ETHSTATS_NODE_NAME=NethermindNode
# OP_NETHERMIND_ETHSTATS_ENDPOINT=ethstats_endpoint

# [required] replace with your preferred L1 (Ethereum, not Base) node RPC URL:
OP_NODE_L1_ETH_RPC=https://rpc.sepolia.org
Expand All @@ -13,9 +18,8 @@ OP_NODE_L1_BEACON=https://your.sepolia.beacon.node/endpoint-here
# auth secret used by op-geth engine API:
OP_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a

OP_NODE_BETA_EXTRA_NETWORKS=true
OP_NODE_L2_ENGINE_AUTH=/tmp/engine-auth-jwt
OP_NODE_L2_ENGINE_RPC=ws://geth:8551
OP_NODE_L2_ENGINE_RPC=ws://execution:8551
OP_NODE_LOG_LEVEL=info
OP_NODE_METRICS_ADDR=0.0.0.0
OP_NODE_METRICS_ENABLED=true
Expand All @@ -26,7 +30,6 @@ OP_NODE_P2P_BOOTNODES=enr:-J64QBwRIWAco7lv6jImSOjPU_W266lHXzpAS5YOh7WmgTyBZkgLgO
OP_NODE_P2P_LISTEN_IP=0.0.0.0
OP_NODE_P2P_LISTEN_TCP_PORT=9222
OP_NODE_P2P_LISTEN_UDP_PORT=9222
OP_NODE_ROLLUP_CONFIG=sepolia/rollup.json
OP_NODE_RPC_ADDR=0.0.0.0
OP_NODE_RPC_PORT=8545
OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log
Expand All @@ -43,4 +46,5 @@ OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true
# To enable snap sync, set env vars below:
# OP_NODE_SYNCMODE=execution-layer
# OP_GETH_BOOTNODES=enode://548f715f3fc388a7c917ba644a2f16270f1ede48a5d88a4d14ea287cc916068363f3092e39936f1a3e7885198bef0e5af951f1d7b1041ce8ba4010917777e71f@18.210.176.114:30301,enode://6f10052847a966a725c9f4adf6716f9141155b99a0fb487fea3f51498f4c2a2cb8d534e680ee678f9447db85b93ff7c74562762c3714783a7233ac448603b25f@107.21.251.55:30301
# OP_NETHERMIND_BOOTNODES=enode://548f715f3fc388a7c917ba644a2f16270f1ede48a5d88a4d14ea287cc916068363f3092e39936f1a3e7885198bef0e5af951f1d7b1041ce8ba4010917777e71f@18.210.176.114:30301,enode://6f10052847a966a725c9f4adf6716f9141155b99a0fb487fea3f51498f4c2a2cb8d534e680ee678f9447db85b93ff7c74562762c3714783a7233ac448603b25f@107.21.251.55:30301
# OP_GETH_SYNCMODE=snap
92 changes: 89 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
NAMESPACE: ghcr.io/base-org
GETH_DEPRECATED_IMAGE_NAME: node
GETH_IMAGE_NAME: node-geth
RETH_IMAGE_NAME: node-reth
NETHERMIND_IMAGE_NAME: node-nethermind

jobs:
build:
geth:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -29,7 +33,9 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: |
${{ env.NAMESPACE }}/${{ env.GETH_DEPRECATED_IMAGE_NAME }}
${{ env.NAMESPACE }}/${{ env.GETH_IMAGE_NAME }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -38,7 +44,87 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
file: geth/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
reth:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: linux/amd64
features: jemalloc,asm-keccak,optimism
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Log into the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.NAMESPACE }}/${{ env.RETH_IMAGE_NAME }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push the Docker image
uses: docker/build-push-action@v4
with:
context: .
file: reth/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
FEATURES=${{ matrix.features }}
platforms: ${{ matrix.arch }}
nethermind:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux/amd64]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Log into the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: ${{ matrix.arch }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }}

- name: Build and push the Docker image
uses: docker/build-push-action@v6
with:
context: .
file: nethermind/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ matrix.arch }}
47 changes: 46 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: Pull Request

on:
pull_request:
workflow_dispatch:

jobs:
build:
geth:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -20,5 +21,49 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
file: geth/Dockerfile
push: false
platforms: ${{ matrix.arch }}
reth:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: linux/amd64
features: jemalloc,asm-keccak,optimism
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build the Docker image
uses: docker/build-push-action@v4
with:
context: .
file: reth/Dockerfile
push: false
build-args: |
FEATURES=${{ matrix.features }}
platforms: ${{ matrix.arch }}
nethermind:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ linux/amd64 ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build the Docker image
uses: docker/build-push-action@v6
with:
context: .
file: nethermind/Dockerfile
push: false
platforms: ${{ matrix.arch }}

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/.idea/
/geth-data/
/geth-data/
/reth-data/
/nethermind-data/
.DS_Store
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This repository contains the relevant Docker builds to run your own node on the
<!-- Badge row 1 - status -->

[![GitHub contributors](https://img.shields.io/github/contributors/base-org/node)](https://github.com/base-org/node/graphs/contributors)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/base-org/node)](https://github.com/base-org/node/graphs/contributors)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/base-org/node)](https://github.com/base-org/node/graphs/commit-activity)
[![GitHub Stars](https://img.shields.io/github/stars/base-org/node.svg)](https://github.com/base-org/node/stargazers)
![GitHub repo size](https://img.shields.io/github/repo-size/base-org/node)
[![GitHub](https://img.shields.io/github/license/base-org/node?color=blue)](https://github.com/base-org/node/blob/main/LICENSE)
Expand All @@ -20,7 +20,7 @@ This repository contains the relevant Docker builds to run your own node on the
[![Blog](https://img.shields.io/badge/blog-up-green)](https://base.mirror.xyz/)
[![Docs](https://img.shields.io/badge/docs-up-green)](https://docs.base.org/)
[![Discord](https://img.shields.io/discord/1067165013397213286?label=discord)](https://base.org/discord)
[![Twitter Base](https://img.shields.io/twitter/follow/Base?style=social)](https://twitter.com/Base)
[![Twitter Base](https://img.shields.io/twitter/follow/Base?style=social)](https://x.com/Base)

<!-- Badge row 3 - detailed status -->

Expand All @@ -33,21 +33,24 @@ We recommend you have this hardware configuration to run a node:

- a modern multi-core CPU with good single-core performance
- at least 16 GB RAM (32 GB recommended)
- a high performance SSD drive with at least 4 TB free (NVME recommended)
- a locally attached NVMe SSD drive
- adequate storage capacity to accommodate both the snapshot restoration process (if restoring from snapshot) and chain data, ensuring a minimum of (2 \* current_chain_size) + snapshot_size + 20%\_buffer

**Note:** If utilizing Amazon Elastic Block Store (EBS), ensure timing buffered disk reads are fast enough in order to avoid latency issues alongside the rate of new blocks added to Base during the initial synchronization process; `io2 block express` is recommended.

### Troubleshooting

If you encounter problems with your node, please open a [GitHub issue](https://github.com/base-org/node/issues/new/choose) or reach out on our [Discord](https://discord.gg/buildonbase):

- Once you've joined, in the Discord app go to `server menu` > `Linked Roles` > `connect GitHub` and connect your GitHub account so you can gain access to our developer channels
- Report your issue in `#🛟|node-support`
- Report your issue in `#🛟|developer-support` or `🛠|node-operators`

### Supported networks

| Ethereum Network | Status |
|------------------| ------ |
| Sepolia testnet | ✅ |
| Mainnet | ✅ |
| Base Network | Status |
|-------------------| ------ |
| Testnet (Sepolia) | ✅ |
| Mainnet | ✅ |

### Usage

Expand All @@ -59,6 +62,15 @@ If you encounter problems with your node, please open a [GitHub issue](https://g
docker compose up --build
```

> [!NOTE]
> To run the node using a supported client, you can use the following command:
> `CLIENT=supported_client docker compose up --build`
>
> Supported clients:
> - geth
> - reth
> - nethermind

4. You should now be able to `curl` your Base node:

```
Expand All @@ -68,7 +80,6 @@ curl -d '{"id":0,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["late

Note: Some L1 nodes (e.g. Erigon) do not support fetching storage proofs. You can work around this by specifying `--l1.trustrpc` when starting op-node (add it in `op-node-entrypoint` and rebuild the docker image with `docker compose build`.) Do not do this unless you fully trust the L1 node provider.


#### Persisting Data

By default, the data directory is stored in `${PROJECT_ROOT}/geth-data`. You can override this by modifying the value of
Expand All @@ -83,6 +94,7 @@ This is useful for running the node in a Kubernetes cluster, for example.

Note that you'll need to override some of the default configuration that assumes a multi-container environment (`OP_NODE_L2_ENGINE_RPC`) and any port conflicts (`OP_NODE_RPC_PORT`).
Example:

```
docker run --env-file .env.sepolia -e OP_NODE_L2_ENGINE_RPC=ws://localhost:8551 -e OP_NODE_RPC_PORT=7545 ghcr.io/base-org/node:latest
```
Expand Down
Loading