Skip to content
Open
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
52 changes: 52 additions & 0 deletions .github/workflows/e2e-sysgo-cluster-prover.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Sysgo E2E Tests with Cluster Prover

on:
workflow_dispatch:
inputs:
test_target:
description: "Test target (e.g. ./e2e/validity/altda/...)"
required: false
default: "./e2e/validity/altda/..."
timeout:
description: "Go test timeout"
required: false
default: "240m"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
e2e-sysgo-cluster-prover:
name: Cluster (${{ github.event.inputs.test_target }})
runs-on:
- runs-on
- runner=64cpu-linux-x64
- run-id=${{ github.run_id }}
- spot=false
- disk=large
timeout-minutes: 300

steps:
- name: Checkout sources
uses: actions/checkout@v5
with:
submodules: true

- name: Setup E2E environment
uses: ./.github/actions/setup-e2e-sysgo

- name: Run E2E Tests with Cluster Proving
working-directory: tests
env:
SP1_PROVER: cluster
CLI_CLUSTER_RPC: ${{ secrets.CLI_CLUSTER_RPC }}
CLI_S3_BUCKET: ${{ secrets.CLI_S3_BUCKET }}
CLI_S3_REGION: ${{ secrets.CLI_S3_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.CLUSTER_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLUSTER_AWS_SECRET_ACCESS_KEY }}
OP_SUCCINCT_MOCK: "false"
PROVING_TIMEOUT: "21600"
run: |
echo "Running e2e tests with cluster proving..."
just test-e2e-sysgo-altda "${{ github.event.inputs.test_target }}" "${{ github.event.inputs.timeout }}"
44 changes: 44 additions & 0 deletions book/advanced/self-hosted-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,47 @@ kubectl patch deploy cpu-node -n sp1-cluster --type='json' \
```

Always keep `WORKER_MAX_WEIGHT_OVERRIDE` at 48 regardless of memory size — this prevents co-scheduling of two PlonkWraps. See [Cluster Resource Requirements](#cluster-resource-requirements).

## E2E Testing with Cluster Proving

The repository includes an E2E test that validates the full AltDA pipeline with real cluster proving:
`batcher → DA server → L1 commitment → witness gen → SP1 cluster proof → L2OO submission`

### Running Locally

```bash
cd tests

SP1_PROVER=cluster \
CLI_CLUSTER_RPC="http://<cluster-grpc-endpoint>:50051" \
CLI_S3_BUCKET="<artifact-bucket>" \
CLI_S3_REGION="<region>" \
OP_SUCCINCT_MOCK=false \
PROVING_TIMEOUT=21600 \
just test-e2e-sysgo-altda "" "240m"
```

Key env vars:
- `SP1_PROVER=cluster` — routes proofs to the self-hosted cluster instead of mock or network
- `OP_SUCCINCT_MOCK=false` — required to avoid mock/cluster conflict panic
- `PROVING_TIMEOUT=21600` — 6h timeout per proof request (cluster proving is slower than network)
- Timeout arg `240m` — Go test timeout (cluster range + aggregation proofs take ~15–20 min with cached programs)

### Running via CI

The `e2e-sysgo-cluster-prover` workflow is **workflow_dispatch only** (not triggered by PRs or pushes) since it requires cluster infrastructure and takes significantly longer than mock-proving tests.

Trigger it from the Actions tab or via CLI:
```bash
gh workflow run e2e-sysgo-cluster-prover.yml --ref <branch>
```

### Expected Timing (cached programs)

| Phase | Duration |
|-------|----------|
| Range proof (10 blocks) | ~2–4 min |
| Aggregation proof (Plonk) | ~8–10 min |
| Total test | ~15–20 min |

First run on a new ELF takes longer (2–4 hours) due to program compilation on the cluster.
5 changes: 5 additions & 0 deletions tests/utils/artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ func UseNetworkProver() bool {
return os.Getenv("NETWORK_PRIVATE_KEY") != ""
}

// UseClusterProver returns true if cluster proving is enabled (SP1_PROVER=cluster).
func UseClusterProver() bool {
return os.Getenv("SP1_PROVER") == "cluster"
}

// RepoRoot returns the op-succinct repo root.
// Assumes this file is at tests/utils/artifacts.go
func RepoRoot() string {
Expand Down
1 change: 1 addition & 0 deletions tests/utils/runners.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
// Test timeouts.
func ShortTimeout() time.Duration { return 20 * time.Minute }
func LongTimeout() time.Duration { return 40 * time.Minute }
func ClusterTimeout() time.Duration { return 180 * time.Minute }

// MaxProposerLag returns the maximum allowed lag between L2 finalized and proposer submissions.
func MaxProposerLag() uint64 {
Expand Down
Loading