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
16 changes: 13 additions & 3 deletions .github/actions/snapsync-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ inputs:
description: Ethrex Docker image tag.
required: false
default: main
cl_type:
description: Consensus layer type (lighthouse, prysm, etc).
required: false
default: lighthouse
cl_image:
description: Consensus layer Docker image and tag.
required: false
default: sigp/lighthouse:v8.0.1

runs:
using: composite
Expand All @@ -33,6 +41,8 @@ runs:
TIMEOUT: ${{ inputs.timeout }}
ETHREX_IMAGE: ${{ inputs.ethrex_image }}
ETHREX_TAG: ${{ inputs.ethrex_tag }}
CL_TYPE: ${{ inputs.cl_type }}
CL_IMAGE: ${{ inputs.cl_image }}
run: |
cat > .github/config/assertoor/network_params.generated.yaml <<YAML
participants:
Expand All @@ -41,8 +51,8 @@ runs:
el_extra_params:
- "--syncmode=snap"
- "--log.level=info"
cl_type: lighthouse
cl_image: sigp/lighthouse:v8.0.1
cl_type: ${CL_TYPE}
cl_image: ${CL_IMAGE}
count: 1

network_params:
Expand Down Expand Up @@ -72,7 +82,7 @@ runs:
- name: Run assertoor
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
enclave_name: ethrex-assertoor-${{ inputs.network }}
enclave_name: ethrex-assertoor-${{ inputs.network }}-${{ inputs.cl_type }}
kurtosis_version: 1.10.2
ethereum_package_url: github.com/ethpandaops/ethereum-package
ethereum_package_branch: 82e5a7178138d892c0c31c3839c89d53ffd42d9a
Expand Down
38 changes: 30 additions & 8 deletions .github/workflows/daily_snapsync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
paths:
- ".github/workflows/daily_snapsync.yaml"
schedule:
# Every day at UTC 03:00
- cron: "0 3 * * *"
# Every 6 hours
- cron: "0 */6 * * *"
workflow_dispatch:
inputs:
network:
Expand All @@ -32,18 +32,18 @@ jobs:
run: |
event_name="${GITHUB_EVENT_NAME}"
if [[ "$event_name" == "schedule" ]]; then
json='[{"network":"hoodi","timeout":"30m"},{"network":"sepolia","timeout":"2h"}]'
json='[{"network":"hoodi","timeout":"40m"},{"network":"sepolia","timeout":"2h30m"}]'
elif [[ "$event_name" == "pull_request" ]]; then
json='[{"network":"hoodi","timeout":"30m"}]'
json='[{"network":"hoodi","timeout":"40m"}]'
else
network=$(jq -r '.inputs.network // empty' "$GITHUB_EVENT_PATH")

case "$network" in
hoodi)
json='[{"network":"hoodi","timeout":"30m"}]'
json='[{"network":"hoodi","timeout":"40m"}]'
;;
sepolia)
json='[{"network":"sepolia","timeout":"2h"}]'
json='[{"network":"sepolia","timeout":"2h30m"}]'
;;
*)
echo "::error::Unsupported network value '$network'. Allowed values: hoodi, sepolia."
Expand All @@ -53,9 +53,9 @@ jobs:
fi
echo "matrix=$json" >> "$GITHUB_OUTPUT"

sync:
sync-lighthouse:
needs: prepare
name: Sync ${{ matrix.network }}
name: Sync ${{ matrix.network }} - Lighthouse
runs-on: ethrex-sync
strategy:
fail-fast: false
Expand All @@ -70,3 +70,25 @@ jobs:
with:
network: ${{ matrix.network }}
timeout: ${{ matrix.timeout }}
cl_type: lighthouse
cl_image: "sigp/lighthouse:v8.0.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's the exact same workflow except for this, consider setting these in the strategy matrix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered it, but it's being specified dynamically in another job. I feel this was easier and more clear, and we have plans to move this outside GHA anyways.


sync-prysm:
needs: prepare
name: Sync ${{ matrix.network }} - Prysm
runs-on: ethrex-sync
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.prepare.outputs.matrix) }}
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Run Snapsync Test
uses: ./.github/actions/snapsync-run
with:
network: ${{ matrix.network }}
timeout: ${{ matrix.timeout }}
cl_type: prysm
cl_image: "gcr.io/offchainlabs/prysm/beacon-chain:v7.1.0"