Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
32 changes: 13 additions & 19 deletions .github/workflows/e2e-op-historical-proof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.23'
go-version: '1.24.0'

- name: Cache Go modules
uses: actions/cache@v4
Expand All @@ -51,25 +53,20 @@ jobs:

- uses: jdx/mise-action@v3

- name: Run kurtosis
- name: build op-reth
run: |
kurtosis engine start
make build-op

# disable coverage for now
# - name: Build op-reth with coverage
# working-directory: crates/optimism/tests
# run: |
# make build-with-cov

- name: Run DEVNET
working-directory: crates/optimism/tests
run: |
make all DEVNET=opgeth-seq-opreth-val

- name: Run ${{ matrix.go_pkg_name }} e2e tests
working-directory: crates/optimism/tests
run: |
make test-e2e-kurtosis GO_PKG_NAME=${{ matrix.go_pkg_name }} DEVNET=opgeth-seq-opreth-val
make test-e2e-sysgo GO_PKG_NAME=${{ matrix.go_pkg_name }} OP_DEVSTACK_PROOF_SEQUENCER_EL=op-geth OP_DEVSTACK_PROOF_VALIDATOR_EL=op-reth

# disable coverage for now
# - name: Flush coverage data
Expand Down Expand Up @@ -128,11 +125,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.23'
go-version: '1.24.0'

- name: Cache Go modules
uses: actions/cache@v4
Expand All @@ -157,19 +156,14 @@ jobs:

- uses: jdx/mise-action@v3

- name: Run kurtosis
run: |
kurtosis engine start

- name: Run DEVNET
working-directory: crates/optimism/tests
- name: build op-reth
run: |
make all DEVNET=opreth-seq-opgeth-val
make build-op

- name: Run ${{ matrix.go_pkg_name }} e2e tests
working-directory: crates/optimism/tests
run: |
make test-e2e-kurtosis GO_PKG_NAME=${{ matrix.go_pkg_name }} DEVNET=opreth-seq-opgeth-val
make test-e2e-sysgo GO_PKG_NAME=${{ matrix.go_pkg_name }} OP_DEVSTACK_PROOF_SEQUENCER_EL=op-reth OP_DEVSTACK_PROOF_VALIDATOR_EL=op-geth

e2e-op-historical-proof-success:
name: e2e-op-historical-proof-success
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "crates/optimism/tests/optimism"]
path = crates/optimism/tests/optimism
url = https://github.com/dhyaniarun1993/optimism.git
42 changes: 37 additions & 5 deletions crates/optimism/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,26 @@ KURTOSIS_PACKAGE := github.com/ethpandaops/optimism-package@998796c0f3bb478d63d7
DEVNET ?= opgeth-seq-opreth-val
GO_PKG_NAME ?= proofs/core
SOURCE_DIR := $(shell pwd)
OP_DEVSTACK_PROOF_SEQUENCER_EL ?= op-geth
OP_DEVSTACK_PROOF_VALIDATOR_EL ?= op-reth

.PHONY: all build build-contracts run clean help
.PHONY: all build-docker build-contracts unzip-contract-artifacts update-packages run clean help

# Default target
all: build run
all: build-docker run

# Build the op-reth Docker image
# Build op-reth
build:
@echo "Building op-reth binary..."
cd ../../../ && make build-op

# Build the op-reth Docker image
build-docker:
@echo "Building $(DOCKER_IMAGE_NAME):$(DOCKER_TAG) Docker image..."
cd ../../../ && docker build -f $(notdir $(DOCKERFILE_PATH)) -t $(DOCKER_IMAGE_NAME):$(DOCKER_TAG) .

# Build coverage-enabled op-reth Docker image
build-with-cov:
build-docker-with-cov:
@echo "Building coverage-enabled $(DOCKER_IMAGE_NAME):cov Docker image..."
cd ../../../ && docker build \
--build-arg RUSTFLAGS="-Cinstrument-coverage" \
Expand All @@ -41,19 +48,44 @@ build-contracts:
@echo "Building contracts with forge..."
@cd "$(SOURCE_DIR)/proofs/contracts" && forge build || { echo "forge build failed"; exit 1; }

# Unzip contract artifacts
unzip-contract-artifacts:
@echo "Unzipping contract artifacts..."
mkdir -p "$(SOURCE_DIR)/artifacts/src"; \
tar --zstd -xf "$(SOURCE_DIR)/artifacts/compressed/artifacts.tzst" -C "$(SOURCE_DIR)/artifacts/src"

# Update contract artifacts from the optimism submodule
update-packages:
@echo "Updating contract artifacts from optimism submodule..."
cd "$(SOURCE_DIR)/optimism/op-deployer" && just build-contracts copy-contract-artifacts
mkdir -p "$(SOURCE_DIR)/artifacts/compressed"
cp "$(SOURCE_DIR)/optimism/op-deployer/pkg/deployer/artifacts/forge-artifacts/artifacts.tzst" "$(SOURCE_DIR)/artifacts/compressed/artifacts.tzst"

# Run E2E tests using Kurtosis
test-e2e-kurtosis: build-contracts
@echo "Running E2E tests with Kurtosis for $(DEVNET)"
@DEVNET_PATH="$(SOURCE_DIR)/devnets/$(DEVNET).yaml"; \
if [ ! -z "$(DEVNET_CUSTOM_PATH)" ]; then \
DEVNET_PATH="$(DEVNET_CUSTOM_PATH)"; \
fi; \
export OP_DEPLOYER_ARTIFACTS="$(SOURCE_DIR)/artifacts"; \
export OP_DEPLOYER_ARTIFACTS="$(SOURCE_DIR)/artifacts/src/forge-artifacts"; \
export DEVNET_ENV_URL="ktnative://$(DEVNET)$$DEVNET_PATH"; \
export DISABLE_OP_E2E_LEGACY=true; \
export DEVSTACK_ORCHESTRATOR=sysext; \
go test -count=1 -timeout 40m -v ./$(GO_PKG_NAME)

# Run E2E tests using Sysgo
test-e2e-sysgo: unzip-contract-artifacts build-contracts
@echo "Running E2E tests with Sysgo"
export OP_DEPLOYER_ARTIFACTS="$(SOURCE_DIR)/artifacts/src/forge-artifacts"; \
export DISABLE_OP_E2E_LEGACY=true; \
export DEVSTACK_ORCHESTRATOR=sysgo; \
export OP_RETH_ENABLE_PROOF_HISTORY=true; \
export OP_RETH_EXEC_PATH="${SOURCE_DIR}/../../../target/release/op-reth"; \
export OP_DEVSTACK_PROOF_SEQUENCER_EL=$(OP_DEVSTACK_PROOF_SEQUENCER_EL); \
export OP_DEVSTACK_PROOF_VALIDATOR_EL=$(OP_DEVSTACK_PROOF_VALIDATOR_EL); \
go test -count=1 -timeout 40m -v ./$(GO_PKG_NAME)

# Stop and clean Kurtosis services
clean:
@echo "Cleaning up Kurtosis services..."
Expand Down
2 changes: 2 additions & 0 deletions crates/optimism/tests/artifacts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
forge-artifacts
src
2 changes: 2 additions & 0 deletions crates/optimism/tests/artifacts/compressed/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Artifacts in this directory will be embedded inside the `op-deployer` binary. The directory can be populated by running
`make unzip-contract-artifacts`.
Binary file not shown.
31 changes: 18 additions & 13 deletions crates/optimism/tests/go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
module github.com/op-rs/op-geth

go 1.23.11
go 1.24.0

// We're using the "develop" branch of the Optimism repo to include the latest changes to the `devstack` package.
require github.com/ethereum-optimism/optimism v1.14.2-0.20251022171045-db70e5fc3b09

require (
github.com/BurntSushi/toml v1.5.0
github.com/bmatcuk/doublestar/v4 v4.8.1
github.com/ethereum/go-ethereum v1.16.3
github.com/stretchr/testify v1.10.0
golang.org/x/sync v0.14.0
)

require (
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
github.com/BurntSushi/toml v1.5.0 // indirect
github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e // indirect
github.com/Masterminds/semver/v3 v3.3.1 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
Expand Down Expand Up @@ -37,7 +44,7 @@ require (
github.com/containerd/cgroups v1.1.0 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect
github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
Expand All @@ -57,8 +64,7 @@ require (
github.com/emicklei/dot v1.6.2 // indirect
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.4-0.20251001155152-4eb15ccedf7e // indirect
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20251009180028-9b4658b9b7af // indirect
github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect
github.com/ethereum/go-ethereum v1.16.3 // indirect
github.com/ethereum/c-kzg-4844/v2 v2.1.5 // indirect
github.com/ethereum/go-verkle v0.2.2 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
Expand Down Expand Up @@ -98,7 +104,7 @@ require (
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/raft v1.7.3 // indirect
github.com/hashicorp/raft-boltdb/v2 v2.3.1 // indirect
github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect
github.com/holiman/billy v0.0.0-20250707135307-f2f9b9aae7db // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.3.2 // indirect
github.com/honeycombio/otel-config-go v1.17.0 // indirect
Expand Down Expand Up @@ -140,7 +146,7 @@ require (
github.com/lmittmann/w3 v0.19.5 // indirect
github.com/lufia/plan9stats v0.0.0-20240513124658-fba389f38bae // indirect
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mholt/archiver v3.1.1+incompatible // indirect
Expand Down Expand Up @@ -219,12 +225,10 @@ require (
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/afero v1.12.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/stretchr/testify v1.10.0 // indirect
github.com/supranational/blst v0.3.14 // indirect
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect
github.com/tklauser/go-sysconf v0.3.14 // indirect
github.com/tklauser/numcpus v0.8.0 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
github.com/urfave/cli/v2 v2.27.6 // indirect
github.com/wlynxg/anet v0.0.4 // indirect
Expand Down Expand Up @@ -258,8 +262,7 @@ require (
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/sys v0.36.0 // indirect
golang.org/x/term v0.30.0 // indirect
golang.org/x/text v0.25.0 // indirect
golang.org/x/time v0.11.0 // indirect
Expand All @@ -274,4 +277,6 @@ require (
lukechampine.com/blake3 v1.3.0 // indirect
)

replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101603.0-rc.1
replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101603.3-rc.3

replace github.com/ethereum-optimism/optimism => ./optimism
Loading
Loading