Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
cd8736f
Start grouping l2 deps under an l2 feature flag
ilitteri Oct 7, 2025
1086d93
Added missing constant
fedacking Oct 7, 2025
df1697b
L1 compiles without sdk
fedacking Oct 7, 2025
1dea512
Fixed build dependency
fedacking Oct 8, 2025
a157af1
fixed linter
fedacking Oct 8, 2025
8e5d50c
separated build rs files
fedacking Oct 8, 2025
d60dfdc
Compiles l2
fedacking Oct 8, 2025
17e1029
Fixed defaults
fedacking Oct 8, 2025
0fd5a7a
Update server.rs
fedacking Oct 8, 2025
8f5de90
Lint temporary change
fedacking Oct 8, 2025
ca3bf67
made make test and lint work
fedacking Oct 8, 2025
343b368
Added sql to lint
fedacking Oct 8, 2025
ef27d43
minor fix
fedacking Oct 8, 2025
40864eb
Clippy for expect
fedacking Oct 8, 2025
48498dc
Update sp1.rs
fedacking Oct 8, 2025
d91e7e8
Merge remote-tracking branch 'origin/main' into separate_binaries
fedacking Oct 8, 2025
0f47a2f
Update Cargo.toml
fedacking Oct 8, 2025
a7dc856
simplified build.rs
fedacking Oct 8, 2025
e1ccbaa
Update Makefile
fedacking Oct 8, 2025
7e33114
Merge branch 'main' into separate_binaries
ManuelBilbao Oct 9, 2025
c19180f
Merge branch 'main' into separate_binaries
ManuelBilbao Oct 9, 2025
8dee125
Add dev as default feature
ManuelBilbao Oct 9, 2025
589a1a5
Update release workflow
ManuelBilbao Oct 9, 2025
f2ebcf4
fix(l1,l2): include proper l2 flags
fedacking Oct 9, 2025
a2ef5e1
Set feature flags in L2 docker compose and Makefile
ManuelBilbao Oct 10, 2025
8b727d4
Format + lint ci fix
fedacking Oct 13, 2025
bd5fb56
reorg test fixed
fedacking Oct 13, 2025
ada9ce1
Merge remote-tracking branch 'origin/main' into separate_binaries
fedacking Oct 13, 2025
2e3813c
workflow
fedacking Oct 13, 2025
e689d50
fixed feature flags in docker compose
fedacking Oct 13, 2025
baadb00
Merge branch 'main' into separate_binaries
fedacking Oct 13, 2025
efbff58
fixed cli (hopefully)
fedacking Oct 13, 2025
794a496
Update docker-compose.yaml
fedacking Oct 13, 2025
387083c
Main l2
fedacking Oct 13, 2025
64dcb57
Update docker-compose.yaml
fedacking Oct 13, 2025
bedc357
Update pr-main_l2.yaml
fedacking Oct 14, 2025
71dc4ca
Update pr-main_l2.yaml
fedacking Oct 14, 2025
86735fa
added var of artifact_path
fedacking Oct 14, 2025
fcf059a
test
fedacking Oct 14, 2025
7bbf0e8
Update action.yml
fedacking Oct 14, 2025
27d4bf5
stringified?
fedacking Oct 14, 2025
4a54899
String token
fedacking Oct 14, 2025
48d71bb
Fixed build args
fedacking Oct 14, 2025
6bd632c
Cleanup
fedacking Oct 14, 2025
308126a
Added docker push action
fedacking Oct 14, 2025
0ec5d37
Update tag_release.yaml
fedacking Oct 14, 2025
3a5d101
fix(l1,l2): fixed build flags for docker compose
fedacking Oct 14, 2025
19f44da
Merge remote-tracking branch 'origin/main' into separate_binaries
fedacking Oct 14, 2025
2c46cc2
Compiles + Lint
fedacking Oct 14, 2025
0d65640
Merge branch 'main' of github.com:lambdaclass/ethrex into separate_bi…
ilitteri Oct 14, 2025
1b411d8
Add build args
ManuelBilbao Oct 14, 2025
7a1fc08
Rename binaries
ManuelBilbao Oct 14, 2025
f58e350
Merge branch 'main' into separate_binaries
ManuelBilbao Oct 16, 2025
26bc4db
Merge branch 'main' of github.com:lambdaclass/ethrex into separate_bi…
ilitteri Oct 16, 2025
7274c98
Use draft and prerelease on release candidate
ManuelBilbao Oct 16, 2025
b4fbbff
Merge branch 'main' into separate_binaries
ManuelBilbao Oct 16, 2025
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
11 changes: 10 additions & 1 deletion .github/actions/build-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ inputs:
description: "Whether to push the built image to the registry"
required: false
default: "false"
artifact_path:
description: "The name of the artifact that is going to be pushed"
required: false
default: "ethrex_image.tar"
build_args:
description: "The arguments that are sent to the dockerfile to built. Format ARG=value"
required: false
default: ""

outputs:
artifact_path:
Expand All @@ -31,7 +39,7 @@ runs:
- id: vars
shell: bash
run: |
echo "artifact_path=/tmp/ethrex_image.tar" >> $GITHUB_OUTPUT
echo "artifact_path=/tmp/${{ inputs.artifact_path }}" >> $GITHUB_OUTPUT

- name: Login to Docker registry
if: inputs.username != '' && inputs.password != ''
Expand All @@ -54,6 +62,7 @@ runs:
outputs: ${{ inputs.push == 'false' && format('type=docker,dest={0}', steps.vars.outputs.artifact_path) || '' }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: ${{ inputs.build_args }}

# Since we're exporting the image as a tar, we need to load it manually as well
- name: Load image locally
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/main_docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,25 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# Pushes to ghcr.io/lambdaclass/ethrex
- name: Build and push Docker image
id: push
# Pushes l1 to ghcr.io/lambdaclass/ethrex
- name: Build and push L1 Docker image
id: push_l1
uses: ./.github/actions/build-docker
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main

# Pushe l2 to ghcr.io/lambdaclass/ethrex
- name: Build and push L2 Docker image
id: push_l2
uses: ./.github/actions/build-docker
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
push: true
build_args: BUILD_FLAGS=--features l2,l2-sql
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-l2
2 changes: 1 addition & 1 deletion .github/workflows/main_prover.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Build test
# if: ${{ always() && github.event_name == 'merge_group' }}
run: |
cargo test l2 --no-run --release
cargo test l2 --features l2 --no-run --release

- name: Start L1 & Deploy contracts
# if: ${{ always() && github.event_name == 'merge_group' }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/pr-main_l1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ jobs:
with:
components: rustfmt, clippy

# We don't run with workspace, as members of the workspace require l2. We run it with workspace
# om the l2 lint
- name: Run cargo check
run: cargo check --workspace
run: cargo check

- name: Run cargo clippy
run: |
cargo clippy --workspace -- -D warnings
cargo clippy -- -D warnings

- name: Run cargo fmt
Expand Down
69 changes: 63 additions & 6 deletions .github/workflows/pr-main_l2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
touch crates/l2/prover/src/guest_program/src/sp1/out/riscv32im-succinct-zkvm-elf

- name: Run cargo check
run: cargo check --workspace
run: cargo check --workspace --features l2,l2-sql

- name: Run cargo clippy
run: |
cargo clippy --workspace -- -D warnings
cargo clippy --workspace --features l2,l2-sql -- -D warnings
make lint

- name: Run cargo fmt
Expand Down Expand Up @@ -86,10 +86,37 @@
name: ethrex_image
path: /tmp/ethrex_image.tar

# We build the docker image for the l2 usage. It needs to add
# The build args for l2.
build-docker-l2:
name: Build docker image L2
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build L2 docker image
uses: ./.github/actions/build-docker
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
tags: ethrex:main-l2
artifact_path: ethrex_image_l2.tar
build_args: BUILD_FLAGS=--features l2

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ethrex_image_l2
path: /tmp/ethrex_image_l2.tar

integration-test:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: Integration Test - ${{ matrix.name }}
runs-on: ubuntu-latest
needs: build-docker
needs: [build-docker, build-docker-l2]
strategy:
matrix:
include:
Expand Down Expand Up @@ -145,7 +172,7 @@

- name: Build test
run: |
cargo test l2 --no-run --release
cargo test l2 --features l2 --no-run --release

- name: Start Web3Signer
if: matrix.web3signer
Expand All @@ -163,6 +190,16 @@
run: |
docker load --input /tmp/ethrex_image.tar

- name: Download ethrex L2 image artifact
uses: actions/download-artifact@v4
with:
name: ethrex_image_l2
path: /tmp

- name: Load ethrex L2 image
run: |
docker load --input /tmp/ethrex_image_l2.tar

- name: Start L1
run: |
cd crates/l2
Expand Down Expand Up @@ -258,7 +295,7 @@
integration-test-tdx:
name: Integration Test - TDX
runs-on: ubuntu-latest
needs: build-docker
needs: [build-docker, build-docker-l2]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
Expand Down Expand Up @@ -288,6 +325,16 @@
run: |
docker load --input /tmp/ethrex_image.tar

- name: Download ethrex L2 image artifact
uses: actions/download-artifact@v4
with:
name: ethrex_image_l2
path: /tmp

- name: Load ethrex L2 image
run: |
docker load --input /tmp/ethrex_image_l2.tar

- name: Set up Nix
uses: cachix/install-nix-action@v31

Expand Down Expand Up @@ -355,7 +402,7 @@
state-diff-test:
name: State Reconstruction Tests
runs-on: ubuntu-latest
needs: build-docker
needs: [build-docker, build-docker-l2]
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -372,6 +419,16 @@
run: |
docker load --input /tmp/ethrex_image.tar

- name: Download ethrex L2 image artifact
uses: actions/download-artifact@v4
with:
name: ethrex_image_l2
path: /tmp

- name: Load ethrex L2 image
run: |
docker load --input /tmp/ethrex_image_l2.tar

- name: Install solc
uses: lambdaclass/get-solc@master
with:
Expand Down
82 changes: 56 additions & 26 deletions .github/workflows/tag_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,45 @@ jobs:
- ubuntu-22.04
- ubuntu-24.04-arm
- macos-latest
gpu:
- true
- false
stack:
- l1
- l2
- l2_gpu
exclude:
- platform: macos-latest
stack: l2_gpu
include:
- platform: ubuntu-22.04
os: linux
arch: x86_64
prover_features: sp1,risc0
cpu_flags: RUSTFLAGS='-C target-cpu=x86-64-v2'
- platform: ubuntu-24.04-arm
os: linux
arch: aarch64
prover_features: sp1
- platform: macos-latest
os: macos
arch: aarch64
- gpu: true
- platform: macos-latest
stack: l2
features: l2,l2-sql
- platform: ubuntu-22.04
stack: l2
features: l2,l2-sql,sp1,risc0
- platform: ubuntu-22.04
stack: l2_gpu
features: l2,l2-sql,sp1,risc0,gpu
- platform: ubuntu-24.04-arm
stack: l2
features: l2,l2-sql,sp1
- platform: ubuntu-24.04-arm
stack: l2_gpu
features: l2,l2-sql,sp1,gpu
- stack: l2_gpu
gpu_flags: NVCC_PREPEND_FLAGS='-arch=sm_70'
gpu_feature: ",gpu"
l2_suffix: "-l2"
gpu_suffix: "-gpu"
exclude:
- platform: macos-latest
gpu: true
- stack: l2
l2_suffix: "-l2"
runs-on: ${{ matrix.platform }}
steps:
- name: Free Disk Space (Ubuntu)
Expand All @@ -57,10 +73,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ vars.RUST_VERSION }}
- name: Setup Rust Environment
uses: ./.github/actions/setup-rust

- name: Install SP1 (only Linux)
if: ${{ matrix.os == 'linux' }}
Expand Down Expand Up @@ -89,7 +103,7 @@ jobs:

- name: Install CUDA (only Linux x86 GPU)
uses: Jimver/[email protected]
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.gpu }}
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.stack == 'l2_gpu' }}
id: cuda-toolkit
with:
cuda: "12.9.0"
Expand All @@ -116,11 +130,12 @@ jobs:

- name: Build ethrex
run: |
COMPILE_CONTRACTS=true ${{ matrix.cpu_flags }} ${{ matrix.gpu_flags }} cargo build --release --features "${{ matrix.prover_features }}${{ matrix.gpu_feature }}" --bin ethrex
mv target/release/ethrex ethrex-${{ matrix.os }}_${{ matrix.arch }}${{ matrix.gpu_suffix }}
COMPILE_CONTRACTS=true ${{ matrix.cpu_flags }} ${{ matrix.gpu_flags }} cargo build --release --features "${{ matrix.features }}" --bin ethrex
chmod +x target/release/ethrex
mv target/release/ethrex ethrex${{ matrix.l2_suffix }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.gpu_suffix }}

- name: Copy verification keys
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.gpu }} # Run only once
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.stack == 'l2_gpu' }} # Run only once
run: |
mkdir -p ./verification_keys
mv crates/l2/prover/src/guest_program/src/risc0/out/riscv32im-risc0-vk verification_keys/ethrex-riscv32im-risc0-vk
Expand All @@ -129,11 +144,11 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ethrex-${{ matrix.os }}_${{ matrix.arch }}${{ matrix.gpu_suffix }}
path: ethrex-${{ matrix.os }}_${{ matrix.arch }}${{ matrix.gpu_suffix }}
name: ethrex${{ matrix.l2_suffix }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.gpu_suffix }}
path: ethrex${{ matrix.l2_suffix }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.gpu_suffix }}

- name: Upload verification keys
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.gpu }} # Run only once
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.stack == 'l2_gpu' }} # Run only once
uses: actions/upload-artifact@v4
with:
name: verification_keys
Expand Down Expand Up @@ -183,8 +198,8 @@ jobs:
run: echo "TAG_VERSION=$(echo ${{ github.ref_name }} | tr -d v)" >> $GITHUB_ENV

# Pushes to ghcr.io/lambdaclass/ethrex
- name: Build and push Docker image
id: push
- name: Build and push L1 Docker image
id: push_l1
uses: ./.github/actions/build-docker
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -193,7 +208,19 @@ jobs:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_VERSION }}

# Creates a draft release on GitHub with the binaries
# Pushes to ghcr.io/lambdaclass/ethrex
- name: Build and push L2 Docker image
id: push_l2
uses: ./.github/actions/build-docker
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-l2,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_VERSION }}-l2
build_args: BUILD_FLAGS=--features l2,l2-sql

# Creates a release on GitHub with the binaries
finalize-release:
needs:
- build-ethrex
Expand All @@ -218,6 +245,9 @@ jobs:
echo "PREVIOUS_TAG: $name"
echo "PREVIOUS_TAG=$name" >> $GITHUB_ENV

- name: Check release type
run: echo "TAG_SUFFIX=$(echo ${{ github.ref_name }}- | cut -d- -f2)" >> $GITHUB_ENV

- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
Expand All @@ -233,8 +263,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ./bin/**/*
draft: false
prerelease: false
draft: ${{ startsWith(env.TAG_SUFFIX, 'rc') }}
prerelease: ${{ startsWith(env.TAG_SUFFIX, 'rc') }}
tag_name: ${{ github.ref_name }}
name: "ethrex: ${{ github.ref_name }}"
body: >
Expand Down
Loading
Loading