Skip to content

Commit

Permalink
Merge branch 'main' into patch-5
Browse files Browse the repository at this point in the history
  • Loading branch information
mdehoog authored Feb 11, 2025
2 parents 368f80e + 69e2895 commit b03e9e3
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 50 deletions.
32 changes: 20 additions & 12 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: Tag Docker image
on:
push:
branches:
- 'main'
- "main"
tags:
- 'v*'
- "v*"

env:
REGISTRY: ghcr.io
NAMESPACE: ghcr.io/base-org
NAMESPACE: ghcr.io/base
GETH_DEPRECATED_IMAGE_NAME: node
GETH_IMAGE_NAME: node-geth
RETH_IMAGE_NAME: node-reth
Expand All @@ -18,9 +18,12 @@ env:
jobs:
geth:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [linux/amd64]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Log into the Container registry
uses: docker/login-action@v3
Expand All @@ -29,6 +32,11 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

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

- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@v4
Expand All @@ -41,14 +49,14 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Build and push the Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
file: geth/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
platforms: ${{ matrix.arch }}
reth:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -78,7 +86,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Build and push the Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
file: reth/Dockerfile
Expand All @@ -96,29 +104,29 @@ jobs:
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:
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,23 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ linux/amd64, linux/arm64 ]
arch: [linux/amd64]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- 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: Build the Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
file: geth/Dockerfile
Expand All @@ -39,7 +46,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build the Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
file: reth/Dockerfile
Expand All @@ -51,7 +58,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ linux/amd64 ]
arch: [linux/amd64]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -66,4 +73,3 @@ jobs:
file: nethermind/Dockerfile
push: false
platforms: ${{ matrix.arch }}

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ be locked to prevent further discussion.

All support requests must be made via [our support team][3].

[1]: https://github.com/base-org/node/issues
[1]: https://github.com/base/node/issues
[2]: https://medium.com/brigade-engineering/the-secrets-to-great-commit-messages-106fc0a92a25
[3]: https://support.coinbase.com/customer/en/portal/articles/2288496-how-can-i-contact-coinbase-support-

32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

# Base node

Base is a secure, low-cost, developer-friendly Ethereum L2 built to bring the next billion users onchain. It's built on Optimisms open-source [OP Stack](https://stack.optimism.io/).
Base is a secure, low-cost, developer-friendly Ethereum L2 built to bring the next billion users onchain. It's built on Optimism's open-source [OP Stack](https://stack.optimism.io/).

This repository contains the relevant Docker builds to run your own node on the Base network.

<!-- 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/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)](https://github.com/base-org/node?tab=readme-ov-file)
[![GitHub](https://img.shields.io/github/license/base-org/node?color=blue)](https://github.com/base-org/node/blob/main/LICENSE)
[![GitHub contributors](https://img.shields.io/github/contributors/base/node)](https://github.com/base/node/graphs/contributors)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/w/base/node)](https://github.com/base/node/graphs/commit-activity)
[![GitHub Stars](https://img.shields.io/github/stars/base/node.svg)](https://github.com/base/node/stargazers)
[![GitHub repo size](https://img.shields.io/github/repo-size/base/node)](https://github.com/base/node?tab=readme-ov-file)
[![GitHub](https://img.shields.io/github/license/base/node?color=blue)](https://github.com/base/node/blob/main/LICENSE)

<!-- Badge row 2 - links and profiles -->

Expand All @@ -24,8 +24,8 @@ This repository contains the relevant Docker builds to run your own node on the

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

[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/base-org/node)](https://github.com/base-org/node/pulls)
[![GitHub Issues](https://img.shields.io/github/issues-raw/base-org/node.svg)](https://github.com/base-org/node/issues)
[![GitHub pull requests by-label](https://img.shields.io/github/issues-pr-raw/base/node)](https://github.com/base/node/pulls)
[![GitHub Issues](https://img.shields.io/github/issues-raw/base/node.svg)](https://github.com/base/node/issues)

### Hardware requirements

Expand All @@ -40,7 +40,7 @@ We recommend you have this hardware configuration to run a node:

### 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):
If you encounter problems with your node, please open a [GitHub issue](https://github.com/base/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 `#🛟|developer-support` or `🛠|node-operators`
Expand All @@ -55,7 +55,13 @@ If you encounter problems with your node, please open a [GitHub issue](https://g
### Usage

1. Ensure you have an Ethereum L1 full node RPC available (not Base), and set `OP_NODE_L1_ETH_RPC` (in the `.env.*` file if using docker-compose). If running your own L1 node, it needs to be synced before Base will be able to fully sync.
2. Uncomment the line relevant to your network (`.env.sepolia`, or `.env.mainnet`) under the 2 `env_file` keys in `docker-compose.yml`.
2. Set the `NETWORK_ENV` environment variable to specify your network:
```bash
# For mainnet:
export NETWORK_ENV=.env.mainnet
# For testnet:
export NETWORK_ENV=.env.sepolia
```
3. Run:

```
Expand Down Expand Up @@ -96,7 +102,7 @@ Note that you'll need to override some of the default configuration that assumes
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
docker run --env-file .env.sepolia -e OP_NODE_L2_ENGINE_RPC=ws://localhost:8551 -e OP_NODE_RPC_PORT=7545 ghcr.io/base/node:latest
```

### Snapshots
Expand All @@ -117,8 +123,8 @@ $( curl -s -d '{"id":0,"jsonrpc":"2.0","method":"optimism_syncStatus"}' -H "Cont

## Disclaimer

Were excited for you to build on Base 🔵 — but we want to make sure that you understand the nature of the node software and smart contracts offered here.
We're excited for you to build on Base 🔵 — but we want to make sure that you understand the nature of the node software and smart contracts offered here.

THE NODE SOFTWARE AND SMART CONTRACTS CONTAINED HEREIN ARE FURNISHED AS IS, WHERE IS, WITH ALL FAULTS AND WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, NON- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE. IN PARTICULAR, THERE IS NO REPRESENTATION OR WARRANTY THAT THE NODE SOFTWARE AND SMART CONTRACTS WILL PROTECT YOUR ASSETS — OR THE ASSETS OF THE USERS OF YOUR APPLICATION — FROM THEFT, HACKING, CYBER ATTACK, OR OTHER FORM OF LOSS OR DEVALUATION.
THE NODE SOFTWARE AND SMART CONTRACTS CONTAINED HEREIN ARE FURNISHED AS IS, WHERE IS, WITH ALL FAULTS AND WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE. IN PARTICULAR, THERE IS NO REPRESENTATION OR WARRANTY THAT THE NODE SOFTWARE AND SMART CONTRACTS WILL PROTECT YOUR ASSETS — OR THE ASSETS OF THE USERS OF YOUR APPLICATION — FROM THEFT, HACKING, CYBER ATTACK, OR OTHER FORM OF LOSS OR DEVALUATION.

You also understand that using the node software and smart contracts are subject to applicable law, including without limitation, any applicable anti-money laundering laws, anti-terrorism laws, export control laws, end user restrictions, privacy laws, or economic sanctions laws/regulations.
8 changes: 2 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ services:
volumes:
- ${HOST_DATA_DIR}:/data
env_file:
# select your network here:
# - .env.sepolia
# - .env.mainnet
- ${NETWORK_ENV:?.env.mainnet} # Requires NETWORK_ENV to be set, defaults to mainnet
node:
build:
context: .
Expand All @@ -30,6 +28,4 @@ services:
- "6060:6060" # pprof
command: [ "bash", "./op-node-entrypoint" ]
env_file:
# select your network here:
# - .env.sepolia
# - .env.mainnet
- ${NETWORK_ENV:?.env.mainnet} # Requires NETWORK_ENV to be set, defaults to mainnet
8 changes: 6 additions & 2 deletions geth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ FROM golang:1.22 AS geth

WORKDIR /app

RUN apt-get update && \
apt-get install -y \
build-essential

ENV REPO=https://github.com/ethereum-optimism/op-geth.git
ENV VERSION=v1.101411.4
ENV COMMIT=efa05b1bf5c22a60745e638ad9d4adadfe3daba9
ENV VERSION=v1.101411.6
ENV COMMIT=50b3422b9ac682a8fa503c4f409339a9bff69717
RUN git clone $REPO --branch $VERSION --single-branch . && \
git switch -c branch-$VERSION && \
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'
Expand Down
18 changes: 10 additions & 8 deletions nethermind/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
FROM golang:1.21 AS op
FROM golang:1.22 AS op

WORKDIR /app

ENV REPO=https://github.com/ethereum-optimism/optimism.git
ENV VERSION=v1.9.1
ENV COMMIT=4797ddb70e05d4952685bad53e608cb5606284e6
ENV VERSION=v1.10.2
ENV COMMIT=8bf7ff60f34a7c5082cec5c56bed1f76cc1893ad
RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \
git switch -c branch-$VERSION && \
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'

# Install 'just'
RUN curl -sSfL 'https://just.systems/install.sh' | bash -s -- --to /usr/local/bin

RUN cd op-node && \
make VERSION=$VERSION op-node

FROM mcr.microsoft.com/dotnet/sdk:8.0.403-noble AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0-noble AS build

ARG BUILD_CONFIG=release
ARG TARGETARCH

WORKDIR /app

ENV REPO=https://github.com/NethermindEth/nethermind.git
ENV VERSION=1.29.1
ENV COMMIT=dfea52404006c6ce1b133b98f324dbfcb62773e1
ENV VERSION=1.30.3
ENV COMMIT=87c863793b2302209187432b6afe5d7d84918bab
RUN git clone $REPO --branch $VERSION --single-branch . && \
git switch -c $VERSION
RUN bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'
Expand All @@ -30,8 +33,7 @@ RUN TARGETARCH=${TARGETARCH#linux/} && \
echo "Using architecture: $arch" && \
dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false


FROM mcr.microsoft.com/dotnet/aspnet:8.0
FROM mcr.microsoft.com/dotnet/aspnet:9.0-noble

RUN apt-get update && \
apt-get install -y jq curl supervisor && \
Expand Down
2 changes: 1 addition & 1 deletion nethermind/nethermind-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fi
mkdir -p "$NETHERMIND_DATA_DIR"

# Write the JWT secret
if [[ -z "${OP_NODE_L2_ENGINE_AUTH_RAW:-}" ]]; then
if [[ -z "$OP_NODE_L2_ENGINE_AUTH_RAW" ]]; then
echo "Expected OP_NODE_L2_ENGINE_AUTH_RAW to be set" 1>&2
exit 1
fi
Expand Down
4 changes: 2 additions & 2 deletions reth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ WORKDIR /app
RUN apt-get update && apt-get -y upgrade && apt-get install -y git libclang-dev pkg-config curl build-essential

ENV REPO=https://github.com/paradigmxyz/reth.git
ENV VERSION=v1.1.4
ENV COMMIT=15fac0873e91ea29ab2e605bfba17bedcd7a6084
ENV VERSION=v1.1.5
ENV COMMIT=3212af2d85a54eb207661361ac9fe1d7de4b5b8e
RUN git clone $REPO --branch $VERSION --single-branch . && \
git switch -c branch-$VERSION && \
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'
Expand Down

0 comments on commit b03e9e3

Please sign in to comment.