Skip to content

Commit b3ff5e3

Browse files
authored
Merge branch 'main' into l2/estimate_blob_size
2 parents 0445c2e + 885ddaf commit b3ff5e3

File tree

159 files changed

+3223
-4626
lines changed

Some content is hidden

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

159 files changed

+3223
-4626
lines changed

.github/workflows/main_prover.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ concurrency:
99
cancel-in-progress: true
1010

1111
env:
12-
CI_ETHREX_WORKDIR: /usr/local/bin
12+
DOCKER_ETHREX_WORKDIR: /usr/local/bin
1313
PROVER: sp1
1414

1515
jobs:
@@ -60,7 +60,7 @@ jobs:
6060
run: |
6161
touch cmd/.env
6262
cd crates/l2
63-
CI_ETHREX_WORKDIR=/usr/local/bin \
63+
DOCKER_ETHREX_WORKDIR=/usr/local/bin \
6464
ETHREX_DEPLOYER_DEPLOY_RICH=true \
6565
ETHREX_DEPLOYER_SP1_DEPLOY_VERIFIER=true \
6666
docker compose up --build contract_deployer
@@ -72,7 +72,7 @@ jobs:
7272
# if: ${{ always() && github.event_name == 'merge_group' }}
7373
run: |
7474
cd crates/l2
75-
CI_ETHREX_WORKDIR=/usr/local/bin \
75+
DOCKER_ETHREX_WORKDIR=/usr/local/bin \
7676
ETHREX_PROPOSER_BLOCK_TIME=12000 \
7777
ETHREX_COMMITTER_COMMIT_TIME=180000 \
7878
docker compose up --build --detach --no-deps ethrex_l2

.github/workflows/main_prover_l1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ concurrency:
88
cancel-in-progress: true
99

1010
env:
11-
CI_ETHREX_WORKDIR: /usr/local/bin
11+
DOCKER_ETHREX_WORKDIR: /usr/local/bin
1212

1313
permissions:
1414
# deployments permission to deploy GitHub pages website
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish Docker
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
REGISTRY: ghcr.io
8+
IMAGE_NAME: ${{ github.repository }}
9+
10+
jobs:
11+
build-and-push-image:
12+
name: Build and push Docker image
13+
runs-on: ubuntu-latest
14+
15+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
16+
permissions:
17+
contents: read
18+
packages: write
19+
attestations: write
20+
id-token: write
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Log in to the Container registry
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ${{ env.REGISTRY }}
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
# Pushes to ghcr.io/lambdaclass/ethrex
34+
- name: Build and push Docker image
35+
id: push
36+
uses: docker/build-push-action@v6
37+
with:
38+
context: .
39+
push: true
40+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:performance

.github/workflows/pr-main_l1.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ jobs:
2525
with:
2626
components: rustfmt, clippy
2727

28-
- name: Install nvcc
29-
uses: Jimver/cuda-toolkit@v0.2.24
30-
id: cuda-toolkit
31-
with:
32-
cuda: "12.9.0"
33-
method: "network"
34-
sub-packages: '["nvcc"]'
35-
3628
- name: Install RISC0
3729
env:
3830
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -53,7 +45,7 @@ jobs:
5345
run: |
5446
cargo clippy --workspace -- -D warnings
5547
cargo clippy -- -D warnings
56-
NVCC_PREPEND_FLAGS='-arch=sm_70' cargo clippy --all-targets --all-features --workspace --exclude ethrex-replay --exclude ethrex-prover --exclude zkvm_interface --exclude ef_tests-blockchain --release -- -D warnings
48+
make lint
5749
5850
- name: Run cargo fmt
5951
run: |

.github/workflows/pr-main_l2.yaml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ concurrency:
1616
cancel-in-progress: true
1717

1818
env:
19-
CI_ETHREX_WORKDIR: /usr/local/bin
19+
DOCKER_ETHREX_WORKDIR: /usr/local/bin
2020

2121
jobs:
2222
lint:
@@ -31,14 +31,6 @@ jobs:
3131
with:
3232
components: rustfmt, clippy
3333

34-
- name: Install nvcc
35-
uses: Jimver/cuda-toolkit@v0.2.24
36-
id: cuda-toolkit
37-
with:
38-
cuda: "12.9.0"
39-
method: "network"
40-
sub-packages: '["nvcc"]'
41-
4234
- name: Install RISC0
4335
env:
4436
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -58,7 +50,7 @@ jobs:
5850
- name: Run cargo clippy
5951
run: |
6052
cargo clippy --workspace -- -D warnings
61-
NVCC_PREPEND_FLAGS='-arch=sm_70' make lint
53+
make lint
6254
6355
- name: Run cargo fmt
6456
run: |
@@ -151,7 +143,7 @@ jobs:
151143
run: |
152144
touch cmd/.env
153145
cd crates/l2
154-
CI_ETHREX_WORKDIR=/usr/local/bin \
146+
DOCKER_ETHREX_WORKDIR=/usr/local/bin \
155147
ETHREX_DEPLOYER_DEPLOY_RICH=true \
156148
ETHREX_DEPLOYER_PICO_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
157149
ETHREX_DEPLOYER_SP1_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
@@ -162,7 +154,7 @@ jobs:
162154
- name: Start Sequencer
163155
run: |
164156
cd crates/l2
165-
CI_ETHREX_WORKDIR=/usr/local/bin \
157+
DOCKER_ETHREX_WORKDIR=/usr/local/bin \
166158
ETHREX_L2_VALIDIUM=${{ matrix.validium }} \
167159
ETHREX_WATCHER_BLOCK_DELAY=0 \
168160
docker compose -f ${{ join(matrix.compose_targets, ' -f ') }} up --detach --no-deps ethrex_l2
@@ -213,7 +205,7 @@ jobs:
213205
run: |
214206
touch cmd/.env
215207
cd crates/l2
216-
CI_ETHREX_WORKDIR=/usr/local/bin \
208+
DOCKER_ETHREX_WORKDIR=/usr/local/bin \
217209
ETHREX_DEPLOYER_DEPLOY_RICH=true \
218210
ETHREX_DEPLOYER_PICO_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
219211
ETHREX_DEPLOYER_SP1_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
@@ -253,7 +245,7 @@ jobs:
253245
export SEQUENCER_REGISTRY
254246
cd ../crates/l2
255247
256-
CI_ETHREX_WORKDIR=/usr/local/bin \
248+
DOCKER_ETHREX_WORKDIR=/usr/local/bin \
257249
ETHREX_COMMITTER_VALIDIUM=false \
258250
ETHREX_WATCHER_BLOCK_DELAY=0 \
259251
ETHREX_BASED=true \
@@ -299,7 +291,7 @@ jobs:
299291
run: |
300292
touch cmd/.env
301293
cd crates/l2
302-
CI_ETHREX_WORKDIR=/usr/local/bin \
294+
DOCKER_ETHREX_WORKDIR=/usr/local/bin \
303295
ETHREX_DEPLOYER_DEPLOY_RICH=true \
304296
ETHREX_DEPLOYER_PICO_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
305297
ETHREX_DEPLOYER_SP1_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \

.github/workflows/tag_release.yaml

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,29 @@ jobs:
2222
- ubuntu-22.04
2323
- ubuntu-24.04-arm
2424
- macos-latest
25+
gpu:
26+
- true
27+
- false
2528
include:
2629
- platform: ubuntu-22.04
2730
os: linux
2831
arch: x86_64
29-
prover_features: sp1,risc0,gpu
32+
prover_features: sp1,risc0
33+
cpu_flags: RUSTFLAGS='-C target-cpu=x86-64-v2'
3034
- platform: ubuntu-24.04-arm
3135
os: linux
3236
arch: aarch64
33-
prover_features: sp1,gpu
37+
prover_features: sp1
3438
- platform: macos-latest
3539
os: macos
3640
arch: aarch64
41+
- gpu: true
42+
gpu_flags: NVCC_PREPEND_FLAGS='-arch=sm_70'
43+
gpu_feature: ",gpu"
44+
gpu_suffix: "-gpu"
45+
exclude:
46+
- platform: macos-latest
47+
gpu: true
3748
runs-on: ${{ matrix.platform }}
3849
steps:
3950
- name: Free Disk Space (Ubuntu)
@@ -51,7 +62,7 @@ jobs:
5162
with:
5263
toolchain: ${{ vars.RUST_VERSION }}
5364

54-
- name: Install SP1
65+
- name: Install SP1 (only Linux)
5566
if: ${{ matrix.os == 'linux' }}
5667
env:
5768
SHELL: /bin/bash
@@ -60,13 +71,13 @@ jobs:
6071
curl -L https://sp1up.succinct.xyz | bash
6172
~/.sp1/bin/sp1up --version 5.0.8
6273
63-
- name: Set up QEMU
74+
- name: Set up QEMU (only Linux ARM)
6475
if: ${{ matrix.platform == 'ubuntu-24.04-arm' }}
6576
uses: docker/setup-qemu-action@v3
6677
with:
6778
platforms: amd64
6879

69-
- name: Install RISC0
80+
- name: Install RISC0 (only Linux x86)
7081
if: ${{ matrix.platform == 'ubuntu-22.04' }}
7182
env:
7283
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -75,8 +86,9 @@ jobs:
7586
~/.risc0/bin/rzup install cargo-risczero 2.3.1
7687
~/.risc0/bin/rzup install rust
7788
78-
- uses: Jimver/cuda-toolkit@v0.2.24
79-
if: ${{ matrix.platform == 'ubuntu-22.04' }}
89+
- name: Install CUDA (only Linux x86 GPU)
90+
uses: Jimver/cuda-toolkit@v0.2.24
91+
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.gpu }}
8092
id: cuda-toolkit
8193
with:
8294
cuda: "12.9.0"
@@ -96,18 +108,13 @@ jobs:
96108
sudo curl -L -o /usr/local/bin/solc https://github.com/nikitastupin/solc/raw/refs/heads/main/linux/aarch64/solc-v0.8.29
97109
sudo chmod +x /usr/local/bin/solc
98110
99-
- name: Set compiler envs
100-
if: ${{ matrix.os == 'linux' }}
101-
run: |
102-
echo COMPILE_FLAGS="RUSTFLAGS='-C target-cpu=native' NVCC_PREPEND_FLAGS='-arch=sm_70'" >> $GITHUB_ENV
103-
104111
- name: Build ethrex
105112
run: |
106-
COMPILE_CONTRACTS=true ${{ env.COMPILE_FLAGS }} cargo build --release --features "${{ matrix.prover_features }}" --bin ethrex
107-
mv target/release/ethrex ethrex-${{ matrix.os }}_${{ matrix.arch }}
113+
COMPILE_CONTRACTS=true ${{ matrix.cpu_flags }} ${{ matrix.gpu_flags }} cargo build --release --features "${{ matrix.prover_features }}${{ matrix.gpu_feature }}" --bin ethrex
114+
mv target/release/ethrex ethrex-${{ matrix.os }}_${{ matrix.arch }}${{ matrix.gpu_suffix }}
108115
109116
- name: Copy verification keys
110-
if: ${{ matrix.platform == 'ubuntu-22.04' }} # Run only once
117+
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.gpu }} # Run only once
111118
run: |
112119
mkdir -p ./verification_keys
113120
mv crates/l2/prover/zkvm/interface/risc0/out/riscv32im-risc0-vk verification_keys/ethrex-riscv32im-risc0-vk
@@ -116,11 +123,11 @@ jobs:
116123
- name: Upload artifact
117124
uses: actions/upload-artifact@v4
118125
with:
119-
name: ethrex-${{ matrix.os }}_${{ matrix.arch }}
120-
path: ethrex-${{ matrix.os }}_${{ matrix.arch }}
126+
name: ethrex-${{ matrix.os }}_${{ matrix.arch }}${{ matrix.gpu_suffix }}
127+
path: ethrex-${{ matrix.os }}_${{ matrix.arch }}${{ matrix.gpu_suffix }}
121128

122129
- name: Upload verification keys
123-
if: ${{ matrix.platform == 'ubuntu-22.04' }} # Run only once
130+
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.gpu }} # Run only once
124131
uses: actions/upload-artifact@v4
125132
with:
126133
name: verification_keys
@@ -229,4 +236,7 @@ jobs:
229236
prerelease: false
230237
tag_name: ${{ github.ref_name }}
231238
name: "ethrex: ${{ github.ref_name }}"
232-
body: ${{ steps.changelog.outputs.changes }}
239+
body: >
240+
Installation and running instructions can be found in [our docs](https://docs.ethrex.xyz/)
241+
242+
${{ steps.changelog.outputs.changes }}

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Generated by Cargo
22
# will have compiled files and executables
3-
debug/
43
**/target/
54

65
# These are backup files generated by rustfmt
@@ -49,7 +48,6 @@ loc_report.md
4948
loc_report_slack.txt
5049
loc_report_github.txt
5150
loc_report.json
52-
ethrex.redb
5351

5452
# used by Flamegraph and Samply
5553
cmd/ef_tests/state/levm_perfgraphs

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
## Perf
44

5+
### 2025-08-19
6+
7+
- Improve signextend opcode performance [#4071](https://github.com/lambdaclass/ethrex/pull/4071)
8+
9+
- Improve performance of calldataload, calldatacopy, extcodecopy, codecopy, returndatacopy [#4070](https://github.com/lambdaclass/ethrex/pull/4070)
10+
11+
12+
### 2025-08-14
13+
14+
- Use malachite crate to handle big integers in modexp, improving perfomance [#4045](https://github.com/lambdaclass/ethrex/pull/4045)
15+
516
### 2025-07-31
617

718
- Cache chain config and latest canonical block header [#3878](https://github.com/lambdaclass/ethrex/pull/3878)

0 commit comments

Comments
 (0)