Skip to content

Commit e8253e2

Browse files
authored
Merge branch 'main' into edgar_clones
2 parents f51a689 + 717e3ff commit e8253e2

File tree

149 files changed

+32422
-3978
lines changed

Some content is hidden

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

149 files changed

+32422
-3978
lines changed

.github/actionlint.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
self-hosted-runner:
2+
# Labels of self-hosted runner in array of strings.
3+
labels:
4+
- gpu

.github/workflows/main_perf_benchmark.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Block Import Benchmark
22

33
on:
4+
workflow_call:
45
push:
56
branches: [main]
67

.github/workflows/main_prover.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: L2 (SP1 Backend)
2+
on:
3+
push:
4+
branches: ["main"]
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
8+
cancel-in-progress: true
9+
10+
env:
11+
CI_ETHREX_WORKDIR: /usr/local/bin
12+
PROVER: sp1
13+
14+
jobs:
15+
test:
16+
name: Integration Test
17+
runs-on: gpu
18+
steps:
19+
- name: Checkout sources
20+
uses: actions/checkout@v4
21+
22+
- name: Rustup toolchain install
23+
uses: dtolnay/rust-toolchain@stable
24+
25+
- name: Set up Rust cache
26+
uses: Swatinem/rust-cache@v2
27+
with:
28+
cache-on-failure: "true"
29+
30+
- name: RISC-V SP1 toolchain install
31+
run: |
32+
. "$HOME/.cargo/env"
33+
curl -L https://sp1.succinct.xyz | bash
34+
~/.sp1/bin/sp1up --version 4.1.0
35+
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v3
38+
39+
- name: Bake docker images
40+
uses: docker/bake-action@v6
41+
with:
42+
workdir: "crates/l2"
43+
files: "crates/l2/docker-compose-l2.yaml"
44+
load: true
45+
set: |
46+
*.cache-to=type=gha,mode=max
47+
*.cache-from=type=gha
48+
49+
- name: Build prover
50+
run: |
51+
cd crates/l2
52+
make build-prover
53+
54+
- name: Build test
55+
run: |
56+
cargo test l2 --no-run --release
57+
58+
- name: Run test
59+
run: |
60+
cd crates/l2
61+
cp configs/prover_client_config_example.toml configs/prover_client_config.toml
62+
cp configs/sequencer_config_example.toml configs/sequencer_config.toml
63+
64+
sed -i 's/sp1_deploy_verifier = false/sp1_deploy_verifier = true/' configs/sequencer_config.toml
65+
sed -i 's/block_time_ms = 5000/block_time_ms = 12000/' configs/sequencer_config.toml
66+
sed -i 's/listen_ip = "127.0.0.1"/listen_ip = "0.0.0.0"/' configs/sequencer_config.toml
67+
sed -i 's/dev_mode = true/dev_mode = false/' configs/sequencer_config.toml
68+
69+
make integration-test-gpu
70+
71+
- name: Ensure admin permissions in _work
72+
if: always()
73+
run: sudo chown admin:admin -R /home/admin/actions-runner/_work/

.github/workflows/pr-main_l1.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
test:
4949
# "Test" is a required check, don't change the name
5050
name: Test
51-
if: ${{ github.event_name != 'merge_group' }}
5251
runs-on: ubuntu-latest
5352
steps:
5453
- name: Checkout sources

.github/workflows/pr-main_l2.yaml

Lines changed: 117 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,146 @@
1-
name: L2
1+
name: L2 (without proving)
22
on:
33
push:
44
branches: ["main"]
55
pull_request:
66
branches: ["**"]
77
paths:
88
- "crates/l2/**"
9+
- "crates/vm/levm/**"
910
- ".github/workflows/pr-main_l2.yaml"
1011

1112
concurrency:
1213
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1314
cancel-in-progress: true
1415

16+
env:
17+
CI_ETHREX_WORKDIR: /usr/local/bin
18+
1519
jobs:
16-
test:
20+
docker-bake:
21+
name: "Docker bake"
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout sources
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Bake docker images
31+
uses: docker/bake-action@v6
32+
with:
33+
workdir: "crates/l2"
34+
files: "crates/l2/docker-compose-l2.yaml"
35+
set: |
36+
ethrex.cache-to=type=local,dest=/tmp/buildx-cache/ethrex,mode=max
37+
ethrex_l2.cache-to=type=local,dest=/tmp/buildx-cache/ethrex_l2,mode=max
38+
contract_deployer.cache-to=type=local,dest=/tmp/buildx-cache/contract_deployer,mode=max
39+
40+
- name: Upload docker artifacts
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: buildx-cache
44+
path: /tmp/buildx-cache
45+
46+
integration-test:
1747
# "Integration Test" is a required check, don't change the name
1848
name: Integration Test
1949
runs-on: ubuntu-latest
50+
needs: [docker-bake]
51+
steps:
52+
- name: Checkout sources
53+
uses: actions/checkout@v4
54+
55+
- name: Rustup toolchain install
56+
uses: dtolnay/rust-toolchain@stable
57+
58+
- name: Set up Rust cache
59+
uses: Swatinem/rust-cache@v2
60+
61+
- name: Set up Docker Buildx
62+
uses: docker/setup-buildx-action@v3
63+
64+
- name: Download buildx cache
65+
uses: actions/download-artifact@v4
66+
with:
67+
name: buildx-cache
68+
path: /tmp/buildx-cache
69+
70+
- name: Bake docker images
71+
uses: docker/bake-action@v6
72+
with:
73+
workdir: "crates/l2"
74+
files: "crates/l2/docker-compose-l2.yaml"
75+
load: true
76+
set: |
77+
ethrex.cache-from=type=local,src=/tmp/buildx-cache/ethrex
78+
ethrex_l2.cache-from=type=local,src=/tmp/buildx-cache/ethrex_l2
79+
contract_deployer.cache-from=type=local,src=/tmp/buildx-cache/contract_deployer
80+
81+
- name: Build prover
82+
run: |
83+
cd crates/l2
84+
make build-prover
85+
86+
- name: Build test
87+
run: |
88+
cargo test l2 --no-run --release
89+
90+
- name: Run test
91+
run: |
92+
cd crates/l2
93+
cp configs/prover_client_config_example.toml configs/prover_client_config.toml
94+
cp configs/sequencer_config_example.toml configs/sequencer_config.toml
95+
sed -i 's/listen_ip = "127.0.0.1"/listen_ip = "0.0.0.0"/' configs/sequencer_config.toml
96+
97+
make integration-test
98+
99+
state-diff-test:
100+
# "State Reconstruction Tests" is a required check, don't change the name
101+
name: State Reconstruction Tests
102+
runs-on: ubuntu-latest
103+
needs: [docker-bake]
20104
steps:
21105
- name: Checkout sources
22106
uses: actions/checkout@v4
23107

24108
- name: Rustup toolchain install
25109
uses: dtolnay/rust-toolchain@stable
26110

27-
- name: Caching
111+
- name: Set up Docker Buildx
112+
uses: docker/setup-buildx-action@v3
113+
114+
- name: Download buildx cache
115+
uses: actions/download-artifact@v4
116+
with:
117+
name: buildx-cache
118+
path: /tmp/buildx-cache
119+
120+
- name: Bake docker images
121+
uses: docker/bake-action@v6
122+
with:
123+
workdir: "crates/l2"
124+
files: "crates/l2/docker-compose-l2.yaml"
125+
load: true
126+
set: |
127+
ethrex.cache-from=type=local,src=/tmp/buildx-cache/ethrex
128+
ethrex_l2.cache-from=type=local,src=/tmp/buildx-cache/ethrex_l2
129+
contract_deployer.cache-from=type=local,src=/tmp/buildx-cache/contract_deployer
130+
131+
- name: Set up Rust cache
28132
uses: Swatinem/rust-cache@v2
29133

30-
- name: Run L2 integration test
134+
- name: Install solc
135+
run: |
136+
sudo add-apt-repository ppa:ethereum/ethereum
137+
sudo apt-get update && sudo apt-get -y install solc
138+
139+
- name: Run tests
31140
run: |
32141
cd crates/l2
142+
cp configs/prover_client_config_example.toml configs/prover_client_config.toml
33143
cp configs/sequencer_config_example.toml configs/sequencer_config.toml
34-
make ci_test
144+
sed -i 's/listen_ip = "127.0.0.1"/listen_ip = "0.0.0.0"/' configs/sequencer_config.toml
145+
146+
make state-diff-test

.github/workflows/pr-main_l2_contracts.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
uses: dtolnay/rust-toolchain@stable
2525
- name: Install solc
2626
uses: pontem-network/get-solc@master
27+
with:
28+
version: v0.8.29
2729
- name: Caching
2830
uses: Swatinem/rust-cache@v2
2931
- name: Run test of deployer.rs

.github/workflows/pr-main_l2_prover_nightly.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches: ["**"]
88
paths:
99
- "crates/l2/prover/**"
10+
- "crates/vm/levm/**"
1011
- ".github/workflows/pr-main_l2_prover_nightly.yaml"
1112

1213
concurrency:

.github/workflows/pr-main_levm.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ jobs:
322322

323323
- name: Install solc
324324
uses: pontem-network/get-solc@master
325+
with:
326+
version: v0.8.29
325327

326328
- name: Run benchmarks
327329
run: |

.github/workflows/pr_perf_blocks_exec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
BINS="base,head"
8484
hyperfine --setup "./bin/ethrex-base removedb" -w 5 -N -r 10 --show-output --export-markdown "bench_pr_comparison.md" \
8585
-L bin "$BINS" -n "{bin}" \
86-
"./bin/ethrex-{bin} --network test_data/genesis-l2-ci.json import ./test_data/l2-1k-erc20.rlp --removedb --force"
86+
"./bin/ethrex-{bin} --network test_data/genesis-l2-ci.json --force import ./test_data/l2-1k-erc20.rlp --removedb"
8787
echo -e "## Benchmark Block Execution Results Comparison Against Main\n\n$(cat bench_pr_comparison.md)" > bench_pr_comparison.md
8888
- name: Upload PR results
8989
uses: actions/upload-artifact@v4

.github/workflows/pr_perf_levm.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535

3636
- name: Install solc
3737
uses: pontem-network/get-solc@master
38+
with:
39+
version: v0.8.29
3840

3941
- name: Run PR benchmarks
4042
run: |
@@ -89,6 +91,8 @@ jobs:
8991

9092
- name: Install solc
9193
uses: pontem-network/get-solc@master
94+
with:
95+
version: v0.8.29
9296

9397
- name: Run main benchmarks
9498
run: |

0 commit comments

Comments
 (0)