Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
983d957
feat(op-acceptance-tests): add more sysgo tests.
scharissis Jul 25, 2025
6af1c9b
fix(op-devstack): ecotone; fees.
scharissis Aug 18, 2025
2ac9152
fix(op-acceptance-tests): skipping flaky/broken tests.
scharissis Aug 18, 2025
230b5bc
fix(op-acceptance-tests): interop; TestInteropSystemSupervisor
scharissis Aug 18, 2025
3cfc834
fix(op-acceptance-tests): justfile; exit early for gateless.
scharissis Aug 18, 2025
bc1c60f
fix(op-acceptance-tests): tidied justfile
scharissis Aug 18, 2025
8edff0f
fix(op-acceptance-tests): fix ecotone fees.
scharissis Aug 18, 2025
cd744e3
fix(op-acceptance-tests): increase default timeout for gateless mode.
scharissis Aug 19, 2025
348bac1
chore: Conditional logic
janjakubnanista Aug 19, 2025
1da327b
fix(op-acceptance-tests): TestSuperRootWithdrawal nonce issue and tim…
scharissis Aug 20, 2025
e04f1d4
fix(op-acceptance-tests): re-enable safeheaddb tests after #17083 fix
scharissis Aug 21, 2025
394f264
fix(op-acceptance-tests): security; env var injection
scharissis Aug 22, 2025
df842b7
feat(op-acceptance-tests): justfile; allow gateless for sysext.
scharissis Aug 22, 2025
824ef73
clean(op-acceptance-tests): circleci; removed memory-base job
scharissis Aug 22, 2025
ed449c3
fix(op-devstack): enhance Ecotone fee validation and enforce operator…
scharissis Aug 22, 2025
aacb172
fix(op-devstack): ecotone; cross-validation of fees
scharissis Aug 26, 2025
5e67f22
fix(op-devstack): supervisor sync status L1 mismatch retry
scharissis Aug 26, 2025
c64101c
fix(op-acceptance-tests): TestPostInteropUpgradeComprehensive
scharissis Aug 29, 2025
b9d1773
feat(op-acceptance-tests): ci; tweak timeout and verbosity.
scharissis Sep 1, 2025
2a3d655
fix(op-acceptance-tests): exclude interop tests from ci tag
scharissis Sep 1, 2025
fec2179
fix(op-acceptance-tests): TestWithdrawal nonce synchronization
scharissis Sep 1, 2025
77a325b
chore(op-acceptance-tests): TestPreNoInbox marked as flaky
scharissis Sep 3, 2025
8e675fb
chore(op-acceptance-tests): test limiting concurrency
scharissis Sep 3, 2025
c999d9c
chore(op-acceptance-tests): self-hosted runner
scharissis Sep 3, 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
86 changes: 48 additions & 38 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1182,37 +1182,41 @@ jobs:
description: Timeout for when CircleCI kills the job if there's no output
type: string
default: 30m
use_circleci_runner:
description: Whether to use CircleCI runners (with Docker) instead of self-hosted runners
type: boolean
default: false
machine:
image: ubuntu-2404:current
docker_layer_caching: true # Since we are building docker images for components, we'll cache the layers for faster builds
resource_class: xlarge
image: <<# parameters.use_circleci_runner >>ubuntu-2404:current<</ parameters.use_circleci_runner >><<^ parameters.use_circleci_runner >>true<</ parameters.use_circleci_runner >>
docker_layer_caching: <<parameters.use_circleci_runner>>
resource_class: <<# parameters.use_circleci_runner >>xlarge<</ parameters.use_circleci_runner >><<^ parameters.use_circleci_runner >>ethereum-optimism/latitude-1<</ parameters.use_circleci_runner >>
steps:
- checkout-from-workspace
- run:
name: Setup Kurtosis (if needed)
command: |
if [[ "<<parameters.devnet>>" != "" ]]; then
echo "Setting up Kurtosis for external devnet testing..."
- unless:
condition:
equal: ["",<<parameters.devnet>>]
steps:
- run:
name: Setup Kurtosis
command: |
echo "Setting up Kurtosis for external devnet testing..."

# Print Kurtosis version
echo "Using Kurtosis from: $(which kurtosis || echo 'not found')"
kurtosis version
# Print Kurtosis version
echo "Using Kurtosis from: $(which kurtosis || echo 'not found')"
kurtosis version

# Start Kurtosis engine
echo "Starting Kurtosis engine..."
kurtosis engine start || true
# Start Kurtosis engine
echo "Starting Kurtosis engine..."
kurtosis engine start || true

# Clean old instances
echo "Cleaning old instances..."
kurtosis clean -a || true
# Clean old instances
echo "Cleaning old instances..."
kurtosis clean -a || true

# Check engine status
kurtosis engine status || true
# Check engine status
kurtosis engine status || true

echo "Kurtosis setup complete"
else
echo "Using in-process testing (sysgo orchestrator) - no Kurtosis setup needed"
fi
echo "Kurtosis setup complete"
# Notify us of a setup failure
- when:
condition: on_fail
Expand Down Expand Up @@ -1241,16 +1245,20 @@ jobs:
command: go test -v -c -o /dev/null $(go list -f '{{if .TestGoFiles}}{{.ImportPath}}{{end}}' ./tests/...)
# Run the acceptance tests (if the devnet is running)
- run:
name: Run acceptance tests (gate=<<parameters.gate>>)
name: Run acceptance tests
working_directory: op-acceptance-tests
no_output_timeout: 1h
environment:
GOFLAGS: "-mod=mod"
GO111MODULE: "on"
GOGC: "0"
command: |
# Run the tests
LOG_LEVEL=debug just acceptance-test "<<parameters.devnet>>" "<<parameters.gate>>"
if [[ "<<parameters.gate>>" == "" ]]; then
echo "Running in gateless mode - auto-discovering all tests in ./op-acceptance-tests/..."
else
echo "Running in gate mode (gate=<<parameters.gate>>)"
fi
LOG_LEVEL=info just acceptance-test "<<parameters.devnet>>" "<<parameters.gate>>"
- run:
name: Print results (summary)
working_directory: op-acceptance-tests
Expand Down Expand Up @@ -2475,13 +2483,11 @@ workflows:
- circleci-repo-readonly-authenticated-github-token
requires:
- initialize
# IN-PROCESS (base)
# IN-MEMORY (all)
- op-acceptance-tests:
# Acceptance Testing params
name: memory-base
gate: base
# CircleCI params
no_output_timeout: 10m
name: memory-all
gate: "" # Empty gate = gateless mode
no_output_timeout: 90m
context:
- circleci-repo-readonly-authenticated-github-token
- discord
Expand All @@ -2494,6 +2500,7 @@ workflows:
name: kurtosis-simple
devnet: simple
gate: base
use_circleci_runner: true
# CircleCI params
no_output_timeout: 30m
context:
Expand All @@ -2507,6 +2514,7 @@ workflows:
name: kurtosis-isthmus
devnet: isthmus
gate: isthmus
use_circleci_runner: true
# CircleCI params
no_output_timeout: 30m
context:
Expand All @@ -2520,6 +2528,7 @@ workflows:
name: kurtosis-interop
devnet: interop
gate: interop
use_circleci_runner: true
# CircleCI params
no_output_timeout: 30m
context:
Expand Down Expand Up @@ -2553,13 +2562,11 @@ workflows:
- circleci-repo-readonly-authenticated-github-token
requires:
- initialize
# IN-PROCESS (base)
# IN-MEMORY (all)
- op-acceptance-tests:
# Acceptance Testing params
name: memory-base
gate: base
# CircleCI params
no_output_timeout: 10m
name: memory-all
gate: "" # Empty gate = gateless mode
no_output_timeout: 60m
context:
- circleci-repo-readonly-authenticated-github-token
- discord
Expand All @@ -2572,6 +2579,7 @@ workflows:
name: kurtosis-simple
devnet: simple
gate: base
use_circleci_runner: true
# CircleCI params
no_output_timeout: 30m
context:
Expand All @@ -2585,6 +2593,7 @@ workflows:
name: kurtosis-isthmus
devnet: isthmus
gate: isthmus
use_circleci_runner: true
# CircleCI params
no_output_timeout: 30m
context:
Expand All @@ -2598,6 +2607,7 @@ workflows:
name: kurtosis-interop
devnet: interop
gate: interop
use_circleci_runner: true
# CircleCI params
no_output_timeout: 30m
context:
Expand Down
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ anvil = "1.1.0"
codecov-uploader = "0.8.0"
goreleaser-pro = "2.11.2"
kurtosis = "1.8.1"
op-acceptor = "op-acceptor/v3.0.0"
op-acceptor = "op-acceptor/v3.0.1"

# Fake dependencies
# Put things here if you need to track versions of tools or projects that can't
Expand Down
22 changes: 20 additions & 2 deletions op-acceptance-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ For rapid test development, use in-process testing:

```bash
cd op-acceptance-tests
just acceptance-test "" base # Uses sysgo orchestrator - faster!
# Not providing a network uses the sysgo orchestrator (in-memory network) which is faster and easier to iterate with.
just acceptance-test "" base
```

### Testing Against External Devnets
Expand Down Expand Up @@ -163,8 +164,25 @@ To add new acceptance tests:
package: github.com/ethereum-optimism/optimism/your/package/path
```

### Quick Development

For rapid development and testing:

```bash
cd op-acceptance-tests

# Run all tests (sysgo gateless mode) - most comprehensive coverage
just acceptance-test "" ""

# Run specific gate-based tests (traditional mode)
just acceptance-test "" base # In-process (sysgo) with gate
just acceptance-test simple base # External devnet (sysext) with gate
```

Using an empty gate (`""`) triggers gateless mode with the sysgo orchestrator, auto-discovering all tests.

## Further Information

For more details about `op-acceptor` and the acceptance testing process, refer to the main documentation or ask the team for guidance.

The source code for `op-acceptor` is available at [github.com/ethereum-optimism/infra/op-acceptor](https://github.com/ethereum-optimism/infra/tree/main/op-acceptor). If you discover any bugs or have feature requests, please open an issue in that repository.
The source code for `op-acceptor` is available at [github.com/ethereum-optimism/infra/op-acceptor](https://github.com/ethereum-optimism/infra/tree/main/op-acceptor). If you discover any bugs or have feature requests, please open an issue in that repository.
5 changes: 5 additions & 0 deletions op-acceptance-tests/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ func runOpAcceptor(ctx context.Context, tracer trace.Tracer, orchestrator string
args = append(args, "--devnet-env-url", devnetEnvURL)
}

// For sysgo, we allow skips
if orchestrator == "sysgo" {
args = append(args, "--allow-skips")
}

acceptorCmd := exec.CommandContext(ctx, acceptor, args...)
acceptorCmd.Env = env
acceptorCmd.Stdout = os.Stdout
Expand Down
113 changes: 68 additions & 45 deletions op-acceptance-tests/justfile
Original file line number Diff line number Diff line change
@@ -1,47 +1,48 @@
REPO_ROOT := `realpath ..`
REPO_ROOT := `realpath ..` # path to the root of the optimism monorepo
KURTOSIS_DIR := REPO_ROOT + "/kurtosis-devnet"
ACCEPTOR_VERSION := env_var_or_default("ACCEPTOR_VERSION", "v3.0.0")
ACCEPTOR_VERSION := env_var_or_default("ACCEPTOR_VERSION", "v3.0.1")
DOCKER_REGISTRY := env_var_or_default("DOCKER_REGISTRY", "us-docker.pkg.dev/oplabs-tools-artifacts/images")
ACCEPTOR_IMAGE := env_var_or_default("ACCEPTOR_IMAGE", DOCKER_REGISTRY + "/op-acceptor:" + ACCEPTOR_VERSION)

# Default recipe - runs acceptance tests
default:
@just acceptance-test simple base
@just acceptance-test "" base

holocene:
@just acceptance-test simple holocene
@just acceptance-test "" holocene

isthmus:
@just acceptance-test isthmus isthmus
@just acceptance-test "" isthmus

interop:
@just acceptance-test interop interop
@just acceptance-test "" interop


# Run acceptance tests with mise-managed binary
# Usage: just acceptance-test [devnet] [gate]
# Examples:
# just acceptance-test "" base # In-process (sysgo) with specific gate
# just acceptance-test "" "" # In-process gateless mode (all tests)
# just acceptance-test "simple" base # External devnet with specific gate
# just acceptance-test "simple" "" # External devnet gateless mode (all tests)
acceptance-test devnet="" gate="holocene":
#!/usr/bin/env bash
set -euo pipefail

# Check if mise is installed
if command -v mise >/dev/null; then
echo "mise is installed"
else
echo "Mise not installed, falling back to Docker..."
just acceptance-test-docker {{devnet}} {{gate}}
fi
# Determine mode and orchestrator
GATELESS_MODE=$([[ "{{gate}}" == "" ]] && echo "true" || echo "false")
ORCHESTRATOR=$([[ "{{devnet}}" == "" ]] && echo "sysgo" || echo "sysext")

if [[ "{{devnet}}" == "" ]]; then
echo -e "DEVNET: in-memory, GATE: {{gate}}\n"
# Display mode information
if [[ "$GATELESS_MODE" == "true" ]]; then
echo -e "DEVNET: $([[ "$ORCHESTRATOR" == "sysgo" ]] && echo "in-memory" || echo "{{devnet}}") ($ORCHESTRATOR), MODE: gateless (all tests)\n"
else
echo -e "DEVNET: {{devnet}}, GATE: {{gate}}\n"
echo -e "DEVNET: $([[ "$ORCHESTRATOR" == "sysgo" ]] && echo "in-memory" || echo "{{devnet}}") ($ORCHESTRATOR), GATE: {{gate}}\n"
fi

# For sysgo orchestrator (in-process testing) ensure:
# - contracts are built
# - cannon dependencies are built
# Note: build contracts only if not in CI (CI jobs already take care of this)
if [[ "{{devnet}}" == "" && -z "${CIRCLECI:-}" ]]; then
# Build dependencies for sysgo (in-process) mode if not in CI
# In CI jobs already take care of this, so we skip it.
if [[ "$ORCHESTRATOR" == "sysgo" && -z "${CIRCLECI:-}" ]]; then
echo "Building contracts (local build)..."
cd {{REPO_ROOT}}
echo " - Updating submodules..."
Expand All @@ -63,46 +64,68 @@ acceptance-test devnet="" gate="holocene":
fi
fi

# Try to install op-acceptor using mise
cd {{REPO_ROOT}}/op-acceptance-tests

# Check mise installation and fallback to Docker if needed
if ! command -v mise >/dev/null; then
echo "Mise not installed, falling back to Docker..."
just acceptance-test-docker {{devnet}} {{gate}}
exit 0
fi

# Install op-acceptor using mise
if ! mise install op-acceptor; then
echo "WARNING: Failed to install op-acceptor with mise, falling back to Docker..."
just acceptance-test-docker {{devnet}} {{gate}}
exit 0
fi

# Print which binary is being used
# Set binary path and log level
BINARY_PATH=$(mise which op-acceptor)
echo "Using mise-managed binary: $BINARY_PATH"
LOG_LEVEL="$(echo "${LOG_LEVEL:-info}" | grep -E '^(debug|info|warn|error)$' || echo 'info')"
echo "LOG_LEVEL: $LOG_LEVEL"

# Build the command with conditional parameters
CMD_ARGS=(
"go" "run" "cmd/main.go"
"--gate" "{{gate}}"
"--testdir" "{{REPO_ROOT}}"
"--validators" "./acceptance-tests.yaml"
"--log.level" "${LOG_LEVEL:-info}"
"--acceptor" "$BINARY_PATH"
)

# Set orchestrator and devnet based on input
if [[ "{{devnet}}" == "" ]]; then
# In-process testing
CMD_ARGS+=("--orchestrator" "sysgo")
# Deploy devnet for sysext if it's a simple name
if [[ "$ORCHESTRATOR" == "sysext" && ! "{{devnet}}" =~ ^(kt://|ktnative://|/) ]]; then
echo "Deploying devnet {{devnet}}..."
just {{KURTOSIS_DIR}}/{{devnet}}-devnet || true
fi

# Build command arguments based on mode
if [[ "$GATELESS_MODE" == "true" ]]; then
# Gateless mode
CMD_ARGS=(
"$BINARY_PATH"
"--testdir" "{{REPO_ROOT}}/op-acceptance-tests/..."
"--allow-skips"
"--timeout" "90m"
"--default-timeout" "10m"
)
else
# External devnet testing
CMD_ARGS+=("--orchestrator" "sysext")
CMD_ARGS+=("--devnet" "{{devnet}}")
# Include kurtosis-dir for devnet deployment
CMD_ARGS+=("--kurtosis-dir" "{{KURTOSIS_DIR}}")
# For now, run sysext in serial mode
CMD_ARGS+=("--serial")
# Gate mode
CMD_ARGS=(
"go" "run" "cmd/main.go"
"--gate" "{{gate}}"
"--testdir" "{{REPO_ROOT}}"
"--validators" "./acceptance-tests.yaml"
"--acceptor" "$BINARY_PATH"
)
fi

# Add common arguments
CMD_ARGS+=("--log.level" "${LOG_LEVEL}" "--orchestrator" "$ORCHESTRATOR")

# Add sysext-specific arguments
if [[ "$ORCHESTRATOR" == "sysext" ]]; then
CMD_ARGS+=("--devnet" "{{devnet}}" "--kurtosis-dir" "{{KURTOSIS_DIR}}" "--serial")
fi

# Execute the command
cd {{REPO_ROOT}}/op-acceptance-tests
"${CMD_ARGS[@]}"



# Run acceptance tests against a devnet using Docker (fallback if needed)
acceptance-test-docker devnet="simple" gate="holocene":
#!/usr/bin/env bash
Expand Down
Loading