Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
31cc442
Fix services except the nonce
shenkeyao Jun 20, 2025
86c1f21
Simpify manual work
shenkeyao Jun 20, 2025
5b68476
Save fixes WIP
shenkeyao Jun 23, 2025
3b09bd8
Revert dockerfile change
shenkeyao Jun 23, 2025
62364ab
Save parameter fixes
shenkeyao Jun 25, 2025
3ffab24
Add fixes
shenkeyao Jun 25, 2025
8e27ee6
All services running again.
philippecamacho Jun 25, 2025
4606b0b
Fix timestamp and increase dev period
shenkeyao Jun 26, 2025
88843cf
Install pnpm with nix.
philippecamacho Jun 26, 2025
6b000d3
More cleanups
shenkeyao Jun 28, 2025
b11a5ee
Merge branch 'celo-integration-rebase-13.1' into keyao/fix-op-node-se…
shenkeyao Jun 28, 2025
1fa8a89
Revert go.mod, fix install syntax, add const env, add more comments
shenkeyao Jun 30, 2025
033d6c6
Add env file
shenkeyao Jun 30, 2025
32ae00e
Merge branch 'keyao/fix-op-node-service' into keyao/docker-service
shenkeyao Jul 1, 2025
2313f41
Fix after merge
shenkeyao Jul 1, 2025
988d5ec
Add changes for l1 terraform
shenkeyao Jul 2, 2025
2b111a2
Merge branch 'celo-integration-rebase-13.1' into keyao/docker-service
shenkeyao Jul 2, 2025
3cf31f8
Merge branch 'keyao/docker-service' into keyao/terraform
shenkeyao Jul 2, 2025
1df9703
Update for op-geth
shenkeyao Jul 7, 2025
4fa648a
Fix op node related docker
shenkeyao Jul 9, 2025
8132c1b
Merge branch 'celo-integration-rebase-13.1' into keyao/docker-service
shenkeyao Jul 10, 2025
5559716
Add SHA check
shenkeyao Jul 10, 2025
ce1dc2c
Add a TODO
shenkeyao Jul 10, 2025
9711ffe
Add jwt back
shenkeyao Jul 10, 2025
f213ffa
Create GH actions workflow
shenkeyao Jul 11, 2025
1b38e99
Fix tag
shenkeyao Jul 11, 2025
f409b11
Fix path and tag
shenkeyao Jul 11, 2025
5d5f4d2
Add init scripts
shenkeyao Jul 11, 2025
e753857
Fix paths and settings after adding init scripts
shenkeyao Jul 12, 2025
2bff8f1
Fix path for CI workflow
shenkeyao Jul 14, 2025
fe7a26b
Move files
shenkeyao Jul 14, 2025
e76808c
Reorder commands
shenkeyao Jul 14, 2025
6d0c27b
Fix path
shenkeyao Jul 14, 2025
13d42dd
More path update
shenkeyao Jul 14, 2025
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
139 changes: 139 additions & 0 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: Build and Push Docker Images

on:
push:
branches: [main, celo*]
paths:
- 'espresso/docker/**'
- 'espresso/docker-compose.yml'
- 'config/**'
pull_request:
paths:
- 'espresso/docker/**'
- 'espresso/docker-compose.yml'
- 'config/**'
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_PREFIX: ghcr.io/${{ github.repository }}

jobs:
build-l1-geth:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_PREFIX }}/l1-geth
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix={{branch}}-,enable={{is_default_branch}}
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=pr-${{ github.event.number }},enable=${{ github.event_name == 'pull_request' }}

- name: Build and push L1 Geth
uses: docker/build-push-action@v5
with:
context: espresso/docker/l1-geth
file: espresso/docker/l1-geth/Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

build-op-geth:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_PREFIX }}/op-geth
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix={{branch}}-,enable={{is_default_branch}}
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=pr-${{ github.event.number }},enable=${{ github.event_name == 'pull_request' }}

- name: Build and push OP Geth
uses: docker/build-push-action@v5
with:
context: espresso/docker/op-geth
file: espresso/docker/op-geth/Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

build-op-node:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_PREFIX }}/op-node
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix={{branch}}-,enable={{is_default_branch}}
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=pr-${{ github.event.number }},enable=${{ github.event_name == 'pull_request' }}

- name: Build and push OP Node
uses: docker/build-push-action@v5
with:
context: .
file: espresso/docker/op-stack/Dockerfile
target: op-node-target
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
TARGET_BASE_IMAGE=ubuntu:22.04
TARGETOS=linux
TARGETARCH=amd64
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,5 @@ gha-creds-*.json
# Ignore generated credentials from google-github-actions/auth
gha-creds-*.json

# Ignore the JWT secret for devnet.
config/jwt.txt


# Ignore keys
*.pem
2 changes: 1 addition & 1 deletion espresso/.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Environment variables for internal devnet.

ESPRESSO_L1_PORT=8545
ESPRESSO_L1_PROVIDER=http://l1:8545
ESPRESSO_L1_PROVIDER=http://l1-geth:8545

ESPRESSO_ROLLUP_PORT=9545
ESPRESSO_ROLLUP_PROVIDER=http://op-node-sequencer:9545
Expand Down
101 changes: 29 additions & 72 deletions espresso/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,88 +1,44 @@
# Espresso OP Integration Docker Setup

services:
l1:
l1-geth:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${ESPRESSO_L1_PORT}"]
interval: 3s
timeout: 2s
retries: 40
build:
context: ../ops/docker/deployment-utils
context: ./docker/l1-geth
image: l1-geth:espresso
volumes:
- ../config/l1-genesis-devnet.json:/l1-genesis-devnet.json:ro
- l1-data:/data
command:
- sh
- -c
# Initialize with the L1 genesis file.
# Enable `dev` to automatically create blocks in the dev mode.
# Set `dev.period=1` to create a block every 1 second.
- |
set -e
rm -rf /data/geth || true
geth --datadir /data init /l1-genesis-devnet.json
exec geth --datadir /data \
--http \
--http.addr=0.0.0.0 \
--http.api=eth,net,web3,admin \
--http.port=${ESPRESSO_L1_PORT} \
--http.vhosts=* \
--http.corsdomain=* \
--nodiscover \
--dev \
--dev.period=12 \
--miner.etherbase=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC \
--mine \
--allow-insecure-unlock \
--rpc.allow-unprotected-txs
- l1-geth-data:/data
environment:
ESPRESSO_L1_PORT: ${ESPRESSO_L1_PORT}
ports:
- "${ESPRESSO_L1_PORT}:${ESPRESSO_L1_PORT}" # L1 RPC

op-geth:
# If the version below is updated, update the version for `images/op-geth` in the Docker
# Compose section in README_ESPRESSO.md as well.
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101503.2-rc.3
build:
context: ./docker/op-geth
image: op-geth:espresso
depends_on:
l1:
l1-geth:
condition: service_healthy
volumes:
- ../config:/config
- ./docker/op-geth:/config
- op-geth-data:/data
environment:
L1_RPC: ${ESPRESSO_L1_PROVIDER}
entrypoint: ["/bin/sh", "-c"]
command:
# Initialize with the L2 genesis file.
- |
if [ ! -d "/data/geth" ]; then
geth init --datadir=/data /config/l2-genesis-devnet.json
fi
exec geth \
--datadir=/data \
--networkid=1 \
--http \
--http.addr=0.0.0.0 \
--http.port=${ESPRESSO_L1_PORT} \
--http.api=eth,net,web3,debug,admin,txpool \
--http.vhosts=* \
--http.corsdomain=* \
--authrpc.addr=0.0.0.0 \
--authrpc.port=${ESPRESSO_GETH_PORT} \
--authrpc.vhosts=* \
--authrpc.jwtsecret=/config/jwt.txt \
--rollup.disabletxpoolgossip=true \
--rollup.halt=major \
--nodiscover
ESPRESSO_L1_PORT: ${ESPRESSO_L1_PORT}
ESPRESSO_GETH_PORT: ${ESPRESSO_GETH_PORT}
ports:
- "8546:${ESPRESSO_L1_PORT}" # L2 RPC
- "${ESPRESSO_GETH_PORT}:${ESPRESSO_GETH_PORT}" # Engine API

op-node-sequencer:
build:
context: ../
dockerfile: ./ops/docker/op-stack-go/Dockerfile
dockerfile: espresso/docker/op-stack/Dockerfile
target: op-node-target
image: op-node-sequencer:espresso
depends_on:
Expand All @@ -94,19 +50,19 @@ services:
OP_NODE_L2_ENGINE_RPC: ${ESPRESSO_GETH_PROVIDER}
OP_NODE_RPC_PORT: ${ESPRESSO_ROLLUP_PORT}
volumes:
- ../config:/config
- ./docker/op-geth:/config
- /etc/localtime:/etc/localtime:ro
command:
- op-node
- --l2.jwt-secret=/config/jwt.txt
- --rollup.config=/config/op-node/rollup-devnet.json
- --rollup.config=/config/rollup-devnet.json
- --sequencer.enabled=true
- --rpc.addr=0.0.0.0

op-node-verifier:
build:
context: ../
dockerfile: ./ops/docker/op-stack-go/Dockerfile
dockerfile: espresso/docker/op-stack/Dockerfile
target: op-node-target
image: op-node-verifier:espresso
depends_on:
Expand All @@ -117,16 +73,16 @@ services:
OP_NODE_L1_ETH_RPC: ${ESPRESSO_L1_PROVIDER}
OP_NODE_L2_ENGINE_RPC: ${ESPRESSO_GETH_PROVIDER}
volumes:
- ../config:/config
- ./docker/op-geth:/config
command:
- op-node
- --l2.jwt-secret=/config/jwt.txt
- --rollup.config=/config/op-node/rollup-devnet.json
- --rollup.config=/config/rollup-devnet.json

caff-node:
build:
context: ../
dockerfile: ./ops/docker/op-stack-go/Dockerfile
dockerfile: espresso/docker/op-stack/Dockerfile
target: op-node-target
image: caff-node:espresso
depends_on:
Expand All @@ -141,11 +97,11 @@ services:
CAFF_ESPRESSO_LIGHT_CLIENT_ADDR: "0x703848f4c85f18e3acd8196c8ec91eb0b7bd0797"
CAFF_HOTSHOT_URLS: ${ESPRESSO_URL}
volumes:
- ../config:/config
- ./docker/op-geth:/config
command:
- op-node
- --l2.jwt-secret=/config/jwt.txt
- --rollup.config=/config/op-node/rollup-devnet.json
- --rollup.config=/config/rollup-devnet.json
- --caff.node=true
- --sequencer.enabled=false
- --verifier.l1-confs=0
Expand All @@ -161,12 +117,12 @@ services:
op-batcher:
build:
context: ../
dockerfile: ./ops/docker/op-stack-go/Dockerfile
dockerfile: espresso/docker/op-stack/Dockerfile
target: op-batcher-target
image: op-batcher:espresso
# It is not necessary to specify all dependencies, but a good practice.
depends_on:
l1:
l1-geth:
condition: service_healthy
op-geth:
condition: service_started
Expand All @@ -192,11 +148,12 @@ services:
op-proposer:
build:
context: ../
dockerfile: ./ops/docker/op-stack-go/Dockerfile
dockerfile: espresso/docker/op-stack/Dockerfile
target: op-proposer-target
image: op-proposer:espresso
depends_on:
- op-node-sequencer
op-node-sequencer:
condition: service_started
environment:
OP_PROPOSER_L1_ETH_RPC: ${ESPRESSO_L1_PROVIDER}
OP_PROPOSER_ROLLUP_RPC: ${ESPRESSO_ROLLUP_PROVIDER}
Expand All @@ -221,15 +178,15 @@ services:
dockerfile: ./op-deployer/Dockerfile.default
image: op-deployer:espresso
depends_on:
- l1
- l1-geth
volumes:
- ../packages/contracts-bedrock/lib/superchain-registry/ops/testdata/monorepo:/config
restart: "no"

espresso-dev-node:
image: ghcr.io/espressosystems/espresso-sequencer/espresso-dev-node:release-colorful-snake
depends_on:
l1:
l1-geth:
condition: service_healthy
ports:
- "${ESPRESSO_SEQUENCER_API_PORT}:${ESPRESSO_SEQUENCER_API_PORT}"
Expand All @@ -251,6 +208,6 @@ services:
ESPRESSO_BUILDER_PORT: ${ESPRESSO_BUILDER_PORT}

volumes:
l1-data:
l1-geth-data:
op-geth-data:
espresso-data:
Loading