Skip to content

feat(l1): don't log an error if we have no node config file when reading known peers #9543

feat(l1): don't log an error if we have no node config file when reading known peers

feat(l1): don't log an error if we have no node config file when reading known peers #9543

Workflow file for this run

name: L1
on:
push:
branches: ["main"]
merge_group:
pull_request:
branches: ["**"]
paths-ignore:
- "crates/l2/**" # Behind a feature flag not used in this workflow
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint:
# "Lint" is a required check, don't change the name
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Rust Environment
uses: ./.github/actions/setup-rust
with:
components: rustfmt, clippy
- name: Install RISC0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -L https://risczero.com/install | bash
~/.risc0/bin/rzup install cargo-risczero 2.3.1
~/.risc0/bin/rzup install rust
- name: Create placeholder SP1 ELF
run: |
mkdir -p crates/l2/prover/zkvm/interface/sp1/out
touch crates/l2/prover/zkvm/interface/sp1/out/riscv32im-succinct-zkvm-elf
- name: Run cargo check
run: cargo check --workspace
- name: Run cargo clippy
run: |
cargo clippy --workspace -- -D warnings
cargo clippy -- -D warnings
make lint
- name: Run cargo fmt
run: |
cargo fmt --all -- --check
test:
# "Test" is a required check, don't change the name
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Rust Environment
uses: ./.github/actions/setup-rust
- name: Run unit tests
run: |
make test
- name: Run Blockchain EF tests
run: |
make -C cmd/ef_tests/blockchain test
docker_build:
name: Build Docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for Docker Hub credentials
shell: bash
env:
DOCKER_USERNAME: ${{ vars.DOCKERHUB_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
if [ -z "$DOCKER_USERNAME" ] || [ -z "$DOCKER_PASSWORD" ]; then
echo "DOCKER_CREDS_EXISTS=false" >> $GITHUB_ENV
echo "No credentials provided. Skipping DockerHub login..."
else
echo "DOCKER_CREDS_EXISTS=true" >> $GITHUB_ENV
echo "Credentials were provided!"
fi
- name: Login to Docker Hub
if: env.DOCKER_CREDS_EXISTS == 'true'
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
load: true
tags: ethrex
outputs: type=docker,dest=/tmp/ethrex_image.tar
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ethrex_image
path: /tmp/ethrex_image.tar
setup-hive-fork:
name: "Setup Hive"
runs-on: ubuntu-latest
env:
HIVE_COMMIT_HASH: 115f4d6ef1bdd2bfcabe29ec60424f6327e92f43 # commit from our fork
steps:
- uses: actions/checkout@v4
- name: Setup Hive
run: |
git clone --single-branch --branch update_dockerfile https://github.com/lambdaclass/hive
cd hive
git checkout --detach ${{ env.HIVE_COMMIT_HASH }}
go build .
- name: Upload hive artifacts
uses: actions/upload-artifact@v4
with:
name: hive-fork
path: hive
setup-hive-upstream:
name: "Setup Hive"
runs-on: ubuntu-latest
env:
HIVE_COMMIT_HASH: 115f4d6ef1bdd2bfcabe29ec60424f6327e92f43
steps:
- uses: actions/checkout@v4
- name: Setup Hive
# TODO: Change repo back to https://github.com/ethereum/hive when
# https://github.com/ethereum/hive/pull/1325 is merged
run: |
git clone --single-branch --branch update_dockerfile https://github.com/lambdaclass/hive
cd hive
git checkout --detach ${{ env.HIVE_COMMIT_HASH }}
go build .
- name: Upload hive artifacts
uses: actions/upload-artifact@v4
with:
name: hive-upstream
path: hive
run-assertoor:
name: Assertoor - ${{ matrix.name }}
runs-on: ubuntu-latest
needs: [docker_build]
if: ${{ github.event_name != 'merge_group' }}
strategy:
fail-fast: true
matrix:
include:
- name: Transaction Check
enclave_name: "ethrex-assertoor-tx"
ethereum_package_args: "./.github/config/assertoor/network_params_tx.yaml"
- name: Blob & Stability Check
enclave_name: "ethrex-assertoor-blob"
ethereum_package_args: "./.github/config/assertoor/network_params_blob.yaml"
- name: Ethrex Only With Different Consensus Clients Check
enclave_name: "ethrex-different-consensus-assertoor"
ethereum_package_args: "./.github/config/assertoor/network_params_ethrex_multiple_cl.yaml"
steps:
- uses: actions/checkout@v4
- name: Download etherex image artifact
uses: actions/download-artifact@v4
with:
name: ethrex_image
path: /tmp
- name: Load image
run: |
docker load --input /tmp/ethrex_image.tar
- name: Run assertoor
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
enclave_name: ${{ matrix.enclave_name }}
kurtosis_version: "1.10.2"
ethereum_package_url: "github.com/ethpandaops/ethereum-package"
ethereum_package_branch: "82e5a7178138d892c0c31c3839c89d53ffd42d9a"
ethereum_package_args: ${{ matrix.ethereum_package_args }}
run-hive:
name: Hive - ${{ matrix.name }}
runs-on: ubuntu-latest
needs: [docker_build, setup-hive-fork, setup-hive-upstream]
if: ${{ github.event_name != 'merge_group' }}
strategy:
fail-fast: true
matrix:
include:
- name: "Rpc Compat tests"
hive_version: "fork"
simulation: ethereum/rpc-compat
test_pattern: ""
- name: "Devp2p tests"
hive_version: "fork"
simulation: devp2p
test_pattern: discv4|eth|snap/Ping|Findnode/WithoutEndpointProof|Findnode/PastExpiration|Amplification|Status|StorageRanges|ByteCodes|GetBlockHeaders|SimultaneousRequests|SameRequestID|ZeroRequestID|GetBlockBodies|MaliciousHandshake|MaliciousStatus|Transaction|NewPooledTxs|GetBlockReceipts|LargeTxRequest|InvalidTxs
# AccountRange and GetTrieNodes don't pass anymore.
#|BlobViolations
# Findnode/UnsolicitedNeighbors and Findnode/BasicFindnode flaky in CI very occasionally. When fixed replace all "Findnode/<test>" with "Findnode"
- name: "Engine Auth and EC tests"
simulation: ethereum/engine
test_pattern: engine-(auth|exchange-capabilities)/
- name: "Cancun Engine tests"
simulation: ethereum/engine
test_pattern: "engine-cancun/Blob Transactions On Block 1|Blob Transaction Ordering|Parallel Blob Transactions|ForkchoiceUpdatedV3|ForkchoiceUpdatedV2|ForkchoiceUpdated Version|GetPayload|NewPayloadV3 After Cancun|NewPayloadV3 Before Cancun|NewPayloadV3 Versioned Hashes|Incorrect BlobGasUsed|ParentHash equals BlockHash|RPC:|in ForkchoiceState|Unknown SafeBlockHash|Unknown FinalizedBlockHash|Unique|Re-Execute Payload|Multiple New Payloads|NewPayload with|Build Payload with|Re-org to Previously|Safe Re-Org to Side Chain|Transaction Re-Org|Re-Org Back into Canonical Chain|Suggested Fee Recipient Test|PrevRandao Opcode|Fork ID: *|Request Blob Pooled Transactions Single|Invalid NewPayload, Incomplete Transactions|Re-Org Back to Canonical Chain*|Invalid PayloadAttributes*|Invalid NewPayload, VersionedHashes|Invalid NewPayload, Incomplete VersionedHashes|Invalid NewPayload, Extra VersionedHashes|Bad Hash on NewPayload|Unknown HeadBlockHash|In-Order Consecutive Payload Execution|Valid NewPayload->ForkchoiceUpdated|Invalid NewPayload, ParentHash|Syncing=False|Payload Build after New Invalid Payload|Invalid NewPayload|Invalid Missing Ancestor ReOrg" # Invalid Missing Ancestor Syncing ReOrG is flaky
- name: "Paris Engine tests"
simulation: ethereum/engine
test_pattern: "engine-api/RPC|Bad Hash on NewPayload|Build Payload|Fork ID|In-Order Consecutive Payload Execution|Inconsistent|Invalid Missing Ancestor ReOrg|Invalid NewPayload|Invalid PayloadAttributes|Multiple New Payloads|NewPayload with|ParentHash equals BlockHash on NewPayload|Payload Build|PrevRandao Opcode Transactions|Re-Execute Payload|Re-Org Back|Re-org to Previously Validated Sidechain Payload|RPC:|Safe Re-Org|Suggested Fee|Transaction Re-Org|Unique Payload ID|Unknown|Valid NewPayload->ForkchoiceUpdated" # |Invalid P9 -> flaky
ethrex_flags: ""
- name: "Engine withdrawal tests"
simulation: ethereum/engine
test_pattern: "engine-withdrawals/Corrupted Block Hash Payload|Empty Withdrawals|engine-withdrawals test loader|GetPayloadBodies|GetPayloadV2 Block Value|Max Initcode Size|Sync after 2 blocks - Withdrawals on Genesis|Withdraw many accounts|Withdraw to a single account|Withdraw to two accounts|Withdraw zero amount|Withdraw many accounts|Withdrawals Fork on Block 1 - 1 Block Re-Org|Withdrawals Fork on Block 1 - 8 Block Re-Org NewPayload|Withdrawals Fork on Block 2|Withdrawals Fork on Block 3|Withdrawals Fork on Block 8 - 10 Block Re-Org NewPayload|Withdrawals Fork on Canonical Block 8 / Side Block 7 - 10 Block Re-Org [^S]|Withdrawals Fork on Canonical Block 8 / Side Block 9 - 10 Block Re-Org [^S]"
- name: "Sync full"
simulation: ethereum/sync
test_pattern: ""
# Flaky, reenable when fixed
# - name: "Sync snap"
# simulation: ethereum/sync
# test_pattern: ""
# ethrex_flags: "--syncmode snap"
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Download ethrex image artifact
uses: actions/download-artifact@v4
with:
name: ethrex_image
path: /tmp
- name: Download hive artifacts
uses: actions/download-artifact@v4
with:
name: hive-${{ matrix.hive_version || 'upstream' }}
- name: Load image
run: |
docker load --input /tmp/ethrex_image.tar
- name: Run Hive Simulation
run: chmod +x hive && ./hive --client-file fixtures/network/hive_clients/ethrex.yml --client ethrex --sim ${{ matrix.simulation }} --sim.limit "${{ matrix.test_pattern }}" --sim.parallelism 16 --sim.loglevel 1
# The purpose of this job is to add it as a required check in GitHub so that we don't have to add every individual job as a required check
all-tests:
# "Integration Test" is a required check, don't change the name
name: Integration Test
runs-on: ubuntu-latest
needs: [run-assertoor, run-hive]
# Make sure this job runs even if the previous jobs failed or were skipped
if: ${{ always() && needs.run-assertoor.result != 'skipped' && needs.run-hive.result != 'skipped' }}
steps:
- name: Check if any job failed
run: |
if [ "${{ needs.run-assertoor.result }}" != "success" ]; then
echo "Job Assertoor Tx Check failed"
exit 1
fi
if [ "${{ needs.run-hive.result }}" != "success" ]; then
echo "Job Hive failed"
exit 1
fi