This repository contains automated testing infrastructure for Ethereum clients' synchronization capabilities using Kurtosis. The primary focus is on testing PeerDAS-enabled devnets and various client combinations.
The sync test framework:
- Tests Ethereum execution layer (EL) and consensus layer (CL) client pairs
- Verifies clients can successfully sync with an existing network
- Supports custom Docker images for testing development branches
- Provides detailed test reports and logs
- Includes reusable GitHub Actions for CI/CD integration
Before using the test scripts, ensure you have the following dependencies installed:
- Kurtosis
curl
jq
yq
docker
The peerdas-sync-test.sh
script tests Consensus Layer (CL) clients' synchronization capabilities on PeerDAS-enabled devnets.
# Test all CL clients
./peerdas-sync-test.sh
# Test specific CL client
./peerdas-sync-test.sh -c lighthouse
# Using make
make peerdas-test
make peerdas-test ARGS="-c teku"
-c <client>
: Test specific CL client (lighthouse, teku, prysm, nimbus, lodestar, grandine)-i <image>
: Use custom Docker image for the CL client-e <client>
: Use specific EL client (geth, nethermind, reth, besu, erigon) (default: geth)-E <image>
: Use custom Docker image for the EL client-d <devnet>
: Specify devnet to use (default: fusaka-devnet-2)-D <devnet_repo>
: Specify devnet repo to use (default: ethpandaops)-t <timeout>
: Set timeout in seconds (default: 1800)--genesis-sync
: Use genesis sync instead of checkpoint sync (default: checkpoint sync)--always-collect-logs
: Always collect enclave logs (even on success)--supernode
: Enable supernode functionality for participants-h
: Show help message
# Test with custom Docker image
./peerdas-sync-test.sh -c teku -i consensys/teku:custom-branch
# Test with specific EL client
./peerdas-sync-test.sh -c lighthouse -e nethermind
# Test with longer timeout
./peerdas-sync-test.sh -t 2400
# Test with genesis sync
./peerdas-sync-test.sh -c lighthouse --genesis-sync
# Test with supernode enabled
./peerdas-sync-test.sh -c lighthouse --supernode
# Test with custom devnet and repo
./peerdas-sync-test.sh -c lighthouse -d your_devnet -D your_devnet_repo
# Test with always collecting logs
./peerdas-sync-test.sh -c teku --always-collect-logs
# Test with custom EL image
./peerdas-sync-test.sh -c teku -e besu -E hyperledger/besu:develop
Consensus Layer (CL) clients:
- Lighthouse
- Teku
- Prysm
- Nimbus
- Lodestar
- Grandine
Execution Layer (EL) clients:
- Geth (default)
- Nethermind
- Reth
- Besu
- Erigon
The test script performs the following steps:
- Network Setup: Spins up a Kurtosis enclave with the specified client configuration
- Client Initialization: Starts all clients and waits for network initialization
- Client Shutdown: Stops non-validating clients after initialization
- Network Progress: Allows the network to progress and produce blocks (default: 30 minutes)
- Sync Test: Restarts stopped clients to test synchronization
- Verification: Uses Assertoor to verify successful synchronization
- Reporting: Generates test reports and saves logs for failed tests
The test framework uses a generic template approach with environment variable substitution:
- Template:
devnet-templates/devnet-template.yaml
- Variables: Automatically populated based on selected devnet and client options
- Customization: The template adapts to different networks and client combinations
The script generates comprehensive test reports including:
- Test status for each client (Success/Failed/Timeout)
- Sync time for successful tests
- Failure reasons and error details
- Log file locations for debugging
Failed test logs are saved to the logs/
directory with the enclave name for debugging.
This repository provides a reusable GitHub Action for automated testing in CI/CD pipelines.
- name: Run sync test
uses: ethpandaops/kurtosis-sync-test@main
with:
el_client: geth
cl_client: lighthouse
- name: Run custom sync test
uses: ethpandaops/kurtosis-sync-test@main
with:
enclave_name: my-custom-test
el_client: nethermind
cl_client: teku
wait_time: 3600
kurtosis_version: 0.89.0
jobs:
sync-test:
runs-on: ubuntu-latest
strategy:
matrix:
el_client: [geth, nethermind, reth]
cl_client: [lighthouse, teku, prysm]
steps:
- uses: actions/checkout@v4
- name: Run sync test
uses: ethpandaops/kurtosis-sync-test@main
with:
el_client: ${{ matrix.el_client }}
cl_client: ${{ matrix.cl_client }}
Input | Description | Required | Default |
---|---|---|---|
enclave_name |
Name for the Kurtosis enclave | No | Auto-generated |
el_client |
Execution layer client | No | geth |
cl_client |
Consensus layer client | No | lighthouse |
wait_time |
Wait time in seconds before restarting clients | No | 1800 |
kurtosis_version |
Version of Kurtosis CLI to use | No | latest |
Output | Description |
---|---|
test_result |
Result of the sync test (success/failure) |
test_summary |
Summary of test execution |
enclave_name |
Name of the Kurtosis enclave used |
.
├── peerdas-sync-test.sh # Main test script
├── devnet-templates/ # Generic configuration templates
├── action.yml # GitHub Action definition
├── .github/
│ ├── workflows/ # CI/CD workflows
│ └── scripts/ # Helper scripts
└── logs/ # Test logs (generated)
- Clone the repository
- Install dependencies
- Run tests:
make peerdas-test
This project is licensed under the MIT License. See the LICENSE file for details.