Skip to content

Commit 6e3e189

Browse files
committed
Merge branch 'main' into release/v8.0.0
2 parents 212f2a0 + fa6dbc5 commit 6e3e189

File tree

177 files changed

+7959
-5247
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+7959
-5247
lines changed

.github/actions/snapsync-run/action.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ inputs:
1515
description: Ethrex Docker image tag.
1616
required: false
1717
default: main
18+
cl_type:
19+
description: Consensus layer type (lighthouse, prysm, etc).
20+
required: false
21+
default: lighthouse
22+
cl_image:
23+
description: Consensus layer Docker image and tag.
24+
required: false
25+
default: sigp/lighthouse:v8.0.1
1826

1927
runs:
2028
using: composite
@@ -33,15 +41,18 @@ runs:
3341
TIMEOUT: ${{ inputs.timeout }}
3442
ETHREX_IMAGE: ${{ inputs.ethrex_image }}
3543
ETHREX_TAG: ${{ inputs.ethrex_tag }}
44+
CL_TYPE: ${{ inputs.cl_type }}
45+
CL_IMAGE: ${{ inputs.cl_image }}
3646
run: |
3747
cat > .github/config/assertoor/network_params.generated.yaml <<YAML
3848
participants:
3949
- el_type: ethrex
4050
el_image: ${ETHREX_IMAGE}:${ETHREX_TAG}
4151
el_extra_params:
4252
- "--syncmode=snap"
43-
cl_type: lighthouse
44-
cl_image: sigp/lighthouse:v8.0.0-rc.1
53+
- "--log.level=info"
54+
cl_type: ${CL_TYPE}
55+
cl_image: ${CL_IMAGE}
4556
count: 1
4657
4758
network_params:
@@ -71,7 +82,7 @@ runs:
7182
- name: Run assertoor
7283
uses: ethpandaops/kurtosis-assertoor-github-action@v1
7384
with:
74-
enclave_name: ethrex-assertoor-${{ inputs.network }}
85+
enclave_name: ethrex-assertoor-${{ inputs.network }}-${{ inputs.cl_type }}
7586
kurtosis_version: 1.10.2
7687
ethereum_package_url: github.com/ethpandaops/ethereum-package
7788
ethereum_package_branch: 82e5a7178138d892c0c31c3839c89d53ffd42d9a

.github/pull_request_template.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@
88

99
<!-- Link to issues: Resolves #111, Resolves #222 -->
1010

11+
**Checklist**
12+
13+
- [ ] Updated `STORE_SCHEMA_VERSION` (crates/storage/lib.rs) if the PR includes breaking changes to the `Store` requiring a re-sync.
14+
1115
Closes #issue_number
1216

.github/workflows/daily_hive_report.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ jobs:
120120
fi
121121
echo "flags=$FLAGS" >> "$GITHUB_OUTPUT"
122122
123+
- name: Log in to the Container registry
124+
uses: docker/login-action@v3
125+
with:
126+
username: ${{ vars.DOCKERHUB_USERNAME }}
127+
password: ${{ secrets.DOCKERHUB_TOKEN }}
128+
123129
- name: Run Hive Simulation
124130
id: run-hive-action
125131
uses: ethpandaops/hive-github-action@v0.5.0

.github/workflows/daily_snapsync.yaml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
paths:
77
- ".github/workflows/daily_snapsync.yaml"
88
schedule:
9-
# Every day at UTC 03:00
10-
- cron: "0 3 * * 1,2,3,4,5"
9+
# Every 6 hours
10+
- cron: "0 */6 * * *"
1111
workflow_dispatch:
1212
inputs:
1313
network:
@@ -32,18 +32,18 @@ jobs:
3232
run: |
3333
event_name="${GITHUB_EVENT_NAME}"
3434
if [[ "$event_name" == "schedule" ]]; then
35-
json='[{"network":"hoodi","timeout":"30m"},{"network":"sepolia","timeout":"10h"}]'
35+
json='[{"network":"hoodi","timeout":"40m"},{"network":"sepolia","timeout":"2h30m"}]'
3636
elif [[ "$event_name" == "pull_request" ]]; then
37-
json='[{"network":"hoodi","timeout":"30m"}]'
37+
json='[{"network":"hoodi","timeout":"40m"}]'
3838
else
3939
network=$(jq -r '.inputs.network // empty' "$GITHUB_EVENT_PATH")
4040
4141
case "$network" in
4242
hoodi)
43-
json='[{"network":"hoodi","timeout":"30m"}]'
43+
json='[{"network":"hoodi","timeout":"40m"}]'
4444
;;
4545
sepolia)
46-
json='[{"network":"sepolia","timeout":"10h"}]'
46+
json='[{"network":"sepolia","timeout":"2h30m"}]'
4747
;;
4848
*)
4949
echo "::error::Unsupported network value '$network'. Allowed values: hoodi, sepolia."
@@ -53,9 +53,9 @@ jobs:
5353
fi
5454
echo "matrix=$json" >> "$GITHUB_OUTPUT"
5555
56-
sync:
56+
sync-lighthouse:
5757
needs: prepare
58-
name: Sync ${{ matrix.network }}
58+
name: Sync ${{ matrix.network }} - Lighthouse
5959
runs-on: ethrex-sync
6060
strategy:
6161
fail-fast: false
@@ -70,3 +70,25 @@ jobs:
7070
with:
7171
network: ${{ matrix.network }}
7272
timeout: ${{ matrix.timeout }}
73+
cl_type: lighthouse
74+
cl_image: "sigp/lighthouse:v8.0.1"
75+
76+
sync-prysm:
77+
needs: prepare
78+
name: Sync ${{ matrix.network }} - Prysm
79+
runs-on: ethrex-sync
80+
strategy:
81+
fail-fast: false
82+
matrix:
83+
include: ${{ fromJson(needs.prepare.outputs.matrix) }}
84+
steps:
85+
- name: Checkout sources
86+
uses: actions/checkout@v4
87+
88+
- name: Run Snapsync Test
89+
uses: ./.github/actions/snapsync-run
90+
with:
91+
network: ${{ matrix.network }}
92+
timeout: ${{ matrix.timeout }}
93+
cl_type: prysm
94+
cl_image: "gcr.io/offchainlabs/prysm/beacon-chain:v7.1.0"

.github/workflows/pr-main_l1.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ jobs:
176176
runs-on: ubuntu-latest
177177
needs: [detect-changes, docker_build]
178178
if: ${{ needs.detect-changes.outputs.run_tests == 'true' && github.event_name != 'merge_group' }}
179+
env:
180+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
179181
strategy:
180182
fail-fast: false
181183
matrix:
@@ -251,6 +253,13 @@ jobs:
251253
fi
252254
echo "flags=$FLAGS" >> "$GITHUB_OUTPUT"
253255
256+
- name: Log in to the Container registry
257+
if: ${{ env.DOCKERHUB_TOKEN != '' }}
258+
uses: docker/login-action@v3
259+
with:
260+
username: ${{ vars.DOCKERHUB_USERNAME }}
261+
password: ${{ env.DOCKERHUB_TOKEN }}
262+
254263
- name: Run Hive Simulation
255264
id: run-hive-action
256265
uses: ethpandaops/hive-github-action@v0.5.0

.github/workflows/pr-main_l2.yaml

Lines changed: 174 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ jobs:
3131
filters: |
3232
run_tests:
3333
- "crates/l2/**"
34-
- "fixtures/**"
34+
- "fixtures/keys/**"
35+
- "fixtures/genesis/l1-dev.json"
36+
- "fixtures/genesis/l2.json"
37+
- "fixtures/cache/**"
38+
- "fixtures/blobs/**"
39+
- "fixtures/blockchain/**"
40+
- "fixtures/contracts/**"
3541
- "crates/blockchain/dev/**"
3642
- "crates/vm/levm/**"
3743
- ".github/workflows/pr-main_l2.yaml"
@@ -593,6 +599,166 @@ jobs:
593599
cd crates/l2
594600
make state-diff-test
595601
602+
integration-test-shared-bridge:
603+
name: Integration Test Shared Bridge
604+
runs-on: ubuntu-latest
605+
needs: [detect-changes, build-docker, build-docker-l2]
606+
if: ${{ needs.detect-changes.outputs.run_tests == 'true' }}
607+
steps:
608+
- name: Checkout sources
609+
uses: actions/checkout@v4
610+
- name: Setup Rust Environment
611+
uses: ./.github/actions/setup-rust
612+
613+
- name: Install solc
614+
uses: lambdaclass/get-solc@master
615+
with:
616+
version: v0.8.29
617+
token: ${{ secrets.GITHUB_TOKEN || '' }}
618+
619+
- name: Build prover
620+
run: |
621+
cd crates/l2
622+
make build-prover-exec
623+
mkdir -p prover/src/guest_program/src/sp1/out && touch prover/src/guest_program/src/sp1/out/riscv32im-succinct-zkvm-vk-bn254 && touch prover/src/guest_program/src/sp1/out/riscv32im-succinct-zkvm-vk-u32
624+
625+
- name: Build test
626+
run: |
627+
cargo test l2 --features l2 --no-run --release
628+
629+
- name: Download ethrex image artifact
630+
uses: actions/download-artifact@v4
631+
with:
632+
name: ethrex_image
633+
path: /tmp
634+
635+
- name: Load ethrex image
636+
run: |
637+
docker load --input /tmp/ethrex_image.tar
638+
639+
- name: Download ethrex L2 image artifact
640+
uses: actions/download-artifact@v4
641+
with:
642+
name: ethrex_image_l2
643+
path: /tmp
644+
645+
- name: Load ethrex L2 image
646+
run: |
647+
docker load --input /tmp/ethrex_image_l2.tar
648+
649+
- name: Start L1
650+
run: |
651+
cd crates/l2
652+
docker compose up --detach ethrex_l1
653+
654+
- name: Deploy contracts L2A
655+
run: |
656+
#
657+
# If this job fails due to connection refused to ethrex_l1 consider increasing the failure retries
658+
# in the contract_deployer service in crates/l2/docker-compose.yaml
659+
#
660+
touch cmd/.env
661+
cd crates/l2
662+
DOCKER_ETHREX_WORKDIR=/usr/local/bin \
663+
ETHREX_DEPLOYER_DEPLOY_RICH=true \
664+
ETHREX_SHARED_BRIDGE_DEPLOY_ROUTER=true \
665+
docker compose up contract_deployer
666+
667+
DEPLOYER_EXIT_CODE=$(docker inspect -f '{{.State.ExitCode}}' contract_deployer)
668+
if [ "$DEPLOYER_EXIT_CODE" != "0" ]; then
669+
echo "If this job fails due to connection refused to ethrex_l1 consider increasing the failure retries in the contract_deployer service in crates/l2/docker-compose.yaml"
670+
docker logs contract_deployer
671+
exit 1
672+
fi
673+
674+
- name: Copy env to host
675+
run: |
676+
docker cp contract_deployer:/env/.env cmd/.env_l2a
677+
cat cmd/.env_l2a
678+
679+
- name: Deploy contracts L2B
680+
run: |
681+
jq '.config.chainId = 1730' fixtures/genesis/l2.json > fixtures/genesis/l2b.json
682+
#
683+
# If this job fails due to connection refused to ethrex_l1 consider increasing the failure retries
684+
# in the contract_deployer service in crates/l2/docker-compose.yaml
685+
#
686+
touch cmd/.env
687+
cd crates/l2
688+
export $(grep -v '^#' ../../cmd/.env_l2a | xargs)
689+
DOCKER_ETHREX_WORKDIR=/usr/local/bin \
690+
ETHREX_DEPLOYER_DEPLOY_RICH=true \
691+
ETHREX_SHARED_BRIDGE_ROUTER_ADDRESS=$ETHREX_SHARED_BRIDGE_ROUTER_ADDRESS \
692+
docker compose -f docker-compose.yaml -f docker-compose-l2-shared-bridge.overrides.yaml up contract_deployer
693+
694+
DEPLOYER_EXIT_CODE=$(docker inspect -f '{{.State.ExitCode}}' contract_deployer)
695+
if [ "$DEPLOYER_EXIT_CODE" != "0" ]; then
696+
echo "If this job fails due to connection refused to ethrex_l1 consider increasing the failure retries in the contract_deployer service in crates/l2/docker-compose.yaml"
697+
docker logs contract_deployer
698+
exit 1
699+
fi
700+
701+
- name: Copy env to host
702+
run: |
703+
docker cp contract_deployer:/env/.env cmd/.env_l2b
704+
cat cmd/.env_l2b
705+
706+
- name: Start Sequencer L2A
707+
run: |
708+
cp cmd/.env_l2a cmd/.env
709+
export ETHREX_BLOCK_PRODUCER_BASE_FEE_VAULT_ADDRESS=0x000c0d6b7c4516a5b274c51ea331a9410fe69127
710+
export ETHREX_BLOCK_PRODUCER_OPERATOR_FEE_VAULT_ADDRESS=0xd5d2a85751b6F158e5b9B8cD509206A865672362
711+
export ETHREX_BLOCK_PRODUCER_OPERATOR_FEE_PER_GAS=1000000000
712+
export ETHREX_BLOCK_PRODUCER_L1_FEE_VAULT_ADDRESS=0x45681AE1768a8936FB87aB11453B4755e322ceec
713+
cd crates/l2
714+
export $(xargs < ../../cmd/.env_l2a)
715+
DOCKER_ETHREX_WORKDIR=/usr/local/bin \
716+
ETHREX_WATCHER_BLOCK_DELAY=0 \
717+
ETHREX_COMMITTER_COMMIT_TIME=15000 \
718+
ETHREX_WATCHER_WATCH_INTERVAL=1000 \
719+
ETHREX_WATCHER_L2_RPCS=http://ethrex_l2_b:1730 \
720+
ETHREX_WATCHER_L2_CHAIN_IDS=1730 \
721+
ETHREX_WATCHER_ROUTER_ADDRESS=$ETHREX_SHARED_BRIDGE_ROUTER_ADDRESS \
722+
docker compose -f docker-compose.yaml up --detach --no-deps ethrex_l2
723+
724+
- name: Start Sequencer L2B
725+
run: |
726+
cp cmd/.env_l2b cmd/.env
727+
export ETHREX_BLOCK_PRODUCER_BASE_FEE_VAULT_ADDRESS=0x000c0d6b7c4516a5b274c51ea331a9410fe69127
728+
export ETHREX_BLOCK_PRODUCER_OPERATOR_FEE_VAULT_ADDRESS=0xd5d2a85751b6F158e5b9B8cD509206A865672362
729+
export ETHREX_BLOCK_PRODUCER_OPERATOR_FEE_PER_GAS=1000000000
730+
export ETHREX_BLOCK_PRODUCER_L1_FEE_VAULT_ADDRESS=0x45681AE1768a8936FB87aB11453B4755e322ceec
731+
cd crates/l2
732+
export $(xargs < ../../cmd/.env_l2b)
733+
DOCKER_ETHREX_WORKDIR=/usr/local/bin \
734+
ETHREX_WATCHER_BLOCK_DELAY=0 \
735+
ETHREX_COMMITTER_COMMIT_TIME=15000 \
736+
ETHREX_WATCHER_WATCH_INTERVAL=1000 \
737+
ETHREX_WATCHER_L2_RPCS=http://ethrex_l2:1729 \
738+
ETHREX_WATCHER_L2_CHAIN_IDS=65536999 \
739+
ETHREX_WATCHER_ROUTER_ADDRESS=$ETHREX_SHARED_BRIDGE_ROUTER_ADDRESS \
740+
docker compose -f docker-compose.yaml -f docker-compose-l2-shared-bridge.overrides.yaml up --detach --no-deps ethrex_l2_b
741+
742+
- name: Run tests
743+
run: |
744+
sudo chmod -R a+rw crates/l2
745+
cd crates/l2
746+
cargo run --release --features "l2,l2-sql" --manifest-path ../../Cargo.toml -- \
747+
l2 prover \
748+
--proof-coordinators tcp://127.0.0.1:3900 tcp://127.0.0.1:3901 \
749+
--backend exec &
750+
docker logs --follow ethrex_l2 &
751+
docker logs --follow ethrex_l2_b &
752+
docker logs --follow ethrex_l1 &
753+
cargo test shared_bridge --release -- --nocapture --test-threads=1
754+
cp ../../cmd/.env_l2a ../../cmd/.env
755+
PROPOSER_COINBASE_ADDRESS=0x0007a881CD95B1484fca47615B64803dad620C8d INTEGRATION_TEST_SKIP_TEST_TOTAL_ETH=true cargo test l2 --release -- --nocapture --test-threads=1
756+
cp ../../cmd/.env_l2b ../../cmd/.env
757+
PROPOSER_COINBASE_ADDRESS=0x0007a881CD95B1484fca47615B64803dad620C8d INTEGRATION_TEST_SKIP_TEST_TOTAL_ETH=true INTEGRATION_TEST_L2_RPC=http://localhost:1730 cargo test l2 --release -- --nocapture --test-threads=1
758+
cargo test shared_bridge --release -- --nocapture --test-threads=1
759+
killall ethrex -s SIGINT
760+
761+
596762
# 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
597763
all-tests:
598764
# "Integration Test L2" is a required check, don't change the name
@@ -605,9 +771,10 @@ jobs:
605771
state-diff-test,
606772
integration-test-tdx,
607773
uniswap-swap,
774+
integration-test-shared-bridge,
608775
]
609776
# Make sure this job runs even if the previous jobs failed or were skipped
610-
if: ${{ needs.detect-changes.outputs.run_tests == 'true' && always() && needs.integration-test.result != 'skipped' && needs.state-diff-test.result != 'skipped' && needs.integration-test-tdx.result != 'skipped' && needs.uniswap-swap.result != 'skipped' }}
777+
if: ${{ needs.detect-changes.outputs.run_tests == 'true' && always() && needs.integration-test.result != 'skipped' && needs.state-diff-test.result != 'skipped' && needs.integration-test-tdx.result != 'skipped' && needs.uniswap-swap.result != 'skipped' && needs.integration-test-shared-bridge.result != 'skipped' }}
611778
steps:
612779
- name: Check if any job failed
613780
run: |
@@ -625,3 +792,8 @@ jobs:
625792
echo "Job Uniswap Swap Token Flow failed"
626793
exit 1
627794
fi
795+
796+
if [ "${{ needs.integration-test-shared-bridge.result }}" != "success" ]; then
797+
echo "Job Integration test shared bridge failed"
798+
exit 1
799+
fi

.github/workflows/pr-main_l2_prover.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
backend: ["sp1", "risc0", "zisk", "openvm"]
22+
# Note: openvm backend linting is disabled due to a problem in the installation https://github.com/lambdaclass/ethrex/issues/5509
23+
backend: ["sp1", "risc0", "zisk"]
2324
steps:
2425
- name: Checkout sources
2526
uses: actions/checkout@v4

0 commit comments

Comments
 (0)