From 093d5116a9e8aaa02072a72bc1ac376429b3330e Mon Sep 17 00:00:00 2001 From: samoht9277 Date: Thu, 23 Oct 2025 13:04:42 -0300 Subject: [PATCH 01/10] fix(ci,l2): Adds step in release workflow to compile and cache solc with lower GLIBC version. --- .github/workflows/tag_release.yaml | 40 ++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tag_release.yaml b/.github/workflows/tag_release.yaml index 6d3a3132c10..04ab5b7f7ee 100644 --- a/.github/workflows/tag_release.yaml +++ b/.github/workflows/tag_release.yaml @@ -19,7 +19,7 @@ jobs: matrix: platform: - ubuntu-22.04 - - ubuntu-24.04-arm + - ubuntu-22.04-arm - macos-latest stack: - l1 @@ -33,7 +33,7 @@ jobs: os: linux arch: x86_64 cpu_flags: RUSTFLAGS='-C target-cpu=x86-64-v2' - - platform: ubuntu-24.04-arm + - platform: ubuntu-22.04-arm os: linux arch: aarch64 - platform: macos-latest @@ -48,10 +48,10 @@ jobs: - platform: ubuntu-22.04 stack: l2_gpu features: l2,l2-sql,sp1,risc0,gpu - - platform: ubuntu-24.04-arm + - platform: ubuntu-22.04-arm stack: l2 features: l2,l2-sql,sp1 - - platform: ubuntu-24.04-arm + - platform: ubuntu-22.04-arm stack: l2_gpu features: l2,l2-sql,sp1,gpu - stack: l2_gpu @@ -85,7 +85,7 @@ jobs: ~/.sp1/bin/sp1up --version 5.0.8 - name: Set up QEMU (only Linux ARM) - if: ${{ matrix.platform == 'ubuntu-24.04-arm' }} + if: ${{ matrix.platform == 'ubuntu-22.04-arm' }} uses: docker/setup-qemu-action@v3 with: platforms: amd64 @@ -110,7 +110,7 @@ jobs: sub-packages: '["nvcc"]' - name: Install solc - if: ${{ matrix.platform != 'ubuntu-24.04-arm' }} + if: ${{ matrix.platform != 'ubuntu-22.04-arm' }} uses: lambdaclass/get-solc@master with: version: v0.8.29 @@ -121,11 +121,31 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install solc (Linux ARM) - if: ${{ matrix.platform == 'ubuntu-24.04-arm' }} + - name: Restore solc cache (Linux ARM) + if: ${{ matrix.platform == 'ubuntu-22.04-arm' }} + id: cache-solc + uses: actions/cache@v4.3.0 + with: + path: ~/.cache/solc/v0.8.29 + key: solc-${{ runner.os }}-${{ matrix.arch }}-v0-8-29 + + - name: Compile solc from source (Linux ARM) + if: ${{ matrix.platform == 'ubuntu-22.04-arm' && steps.cache-solc.outputs.cache-hit != 'true' }} + run: | + sudo apt-get update + sudo apt-get install -y git build-essential cmake clang ninja-build ccache python3 z3 libz3-dev libboost-all-dev + git clone --depth 1 --branch v0.8.29 https://github.com/ethereum/solidity.git solidity + cd solidity + sed -i 's/j2/j$(nproc)/g' /tmp/solidity/scripts/build.sh # Make compile faster + ./scripts/build.sh + mkdir -p /home/admin/.cache/solc/v0.8.29/ + cp /usr/local/bin/solc ~/.cache/solc/v0.8.29/solc + + - name: Install solc from cache (Linux ARM) + if: ${{ matrix.platform == 'ubuntu-22.04-arm' }} run: | - sudo curl -L -o /usr/local/bin/solc https://github.com/nikitastupin/solc/raw/refs/heads/main/linux/aarch64/solc-v0.8.29 - sudo chmod +x /usr/local/bin/solc + sudo install -m 0755 ~/.cache/solc/v0.8.29/solc /usr/local/bin/solc + solc --version - name: Build ethrex run: | From 1adf125b628f38fca1d755848480f4a1b2ad7584 Mon Sep 17 00:00:00 2001 From: samoht9277 Date: Thu, 23 Oct 2025 13:16:44 -0300 Subject: [PATCH 02/10] fixed typo inside if statement. --- .github/workflows/tag_release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag_release.yaml b/.github/workflows/tag_release.yaml index 04ab5b7f7ee..21063e9d30c 100644 --- a/.github/workflows/tag_release.yaml +++ b/.github/workflows/tag_release.yaml @@ -130,7 +130,7 @@ jobs: key: solc-${{ runner.os }}-${{ matrix.arch }}-v0-8-29 - name: Compile solc from source (Linux ARM) - if: ${{ matrix.platform == 'ubuntu-22.04-arm' && steps.cache-solc.outputs.cache-hit != 'true' }} + if: ${{ matrix.platform == 'ubuntu-22.04-arm' }} && ${{ steps.cache-solc.outputs.cache-hit != 'true' }} run: | sudo apt-get update sudo apt-get install -y git build-essential cmake clang ninja-build ccache python3 z3 libz3-dev libboost-all-dev From 53f44fb891181e8ac87eb5e4541d10ffa0ac8491 Mon Sep 17 00:00:00 2001 From: samoht9277 Date: Thu, 23 Oct 2025 13:23:43 -0300 Subject: [PATCH 03/10] fixed typo in sed. --- .github/workflows/tag_release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tag_release.yaml b/.github/workflows/tag_release.yaml index 21063e9d30c..59ae262cb06 100644 --- a/.github/workflows/tag_release.yaml +++ b/.github/workflows/tag_release.yaml @@ -130,13 +130,13 @@ jobs: key: solc-${{ runner.os }}-${{ matrix.arch }}-v0-8-29 - name: Compile solc from source (Linux ARM) - if: ${{ matrix.platform == 'ubuntu-22.04-arm' }} && ${{ steps.cache-solc.outputs.cache-hit != 'true' }} + if: ${{ matrix.platform == 'ubuntu-22.04-arm' && steps.cache-solc.outputs.cache-hit != 'true' }} run: | sudo apt-get update sudo apt-get install -y git build-essential cmake clang ninja-build ccache python3 z3 libz3-dev libboost-all-dev git clone --depth 1 --branch v0.8.29 https://github.com/ethereum/solidity.git solidity cd solidity - sed -i 's/j2/j$(nproc)/g' /tmp/solidity/scripts/build.sh # Make compile faster + sed -i "s/j2/j$(nproc)/g" /tmp/solidity/scripts/build.sh ./scripts/build.sh mkdir -p /home/admin/.cache/solc/v0.8.29/ cp /usr/local/bin/solc ~/.cache/solc/v0.8.29/solc From ad6628790ee6464953be8d2a22a9f408276ce6fb Mon Sep 17 00:00:00 2001 From: samoht9277 Date: Thu, 23 Oct 2025 13:33:01 -0300 Subject: [PATCH 04/10] fixed typos. --- .github/workflows/tag_release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tag_release.yaml b/.github/workflows/tag_release.yaml index 59ae262cb06..8c48da39ac1 100644 --- a/.github/workflows/tag_release.yaml +++ b/.github/workflows/tag_release.yaml @@ -136,9 +136,9 @@ jobs: sudo apt-get install -y git build-essential cmake clang ninja-build ccache python3 z3 libz3-dev libboost-all-dev git clone --depth 1 --branch v0.8.29 https://github.com/ethereum/solidity.git solidity cd solidity - sed -i "s/j2/j$(nproc)/g" /tmp/solidity/scripts/build.sh + sed -i "s/j2/j$(nproc)/g" scripts/build.sh ./scripts/build.sh - mkdir -p /home/admin/.cache/solc/v0.8.29/ + mkdir -p ~/.cache/solc/v0.8.29/ cp /usr/local/bin/solc ~/.cache/solc/v0.8.29/solc - name: Install solc from cache (Linux ARM) From be50f30380af3018f48cb766116340931d55c4c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Casagrande?= <53660242+samoht9277@users.noreply.github.com> Date: Fri, 24 Oct 2025 18:43:45 -0300 Subject: [PATCH 05/10] Added recursive clone --- .github/workflows/tag_release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag_release.yaml b/.github/workflows/tag_release.yaml index 8c48da39ac1..40e4f7b0fd9 100644 --- a/.github/workflows/tag_release.yaml +++ b/.github/workflows/tag_release.yaml @@ -134,7 +134,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y git build-essential cmake clang ninja-build ccache python3 z3 libz3-dev libboost-all-dev - git clone --depth 1 --branch v0.8.29 https://github.com/ethereum/solidity.git solidity + git clone --recursive --branch v0.8.29 https://github.com/ethereum/solidity.git solidity cd solidity sed -i "s/j2/j$(nproc)/g" scripts/build.sh ./scripts/build.sh From eeb60eef4e78cd0fcfc6d637e28e2b1d5905d3c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Casagrande?= <53660242+samoht9277@users.noreply.github.com> Date: Mon, 27 Oct 2025 12:41:46 -0300 Subject: [PATCH 06/10] Changed compilation method --- .github/workflows/tag_release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tag_release.yaml b/.github/workflows/tag_release.yaml index 40e4f7b0fd9..7e926f460c4 100644 --- a/.github/workflows/tag_release.yaml +++ b/.github/workflows/tag_release.yaml @@ -136,10 +136,10 @@ jobs: sudo apt-get install -y git build-essential cmake clang ninja-build ccache python3 z3 libz3-dev libboost-all-dev git clone --recursive --branch v0.8.29 https://github.com/ethereum/solidity.git solidity cd solidity - sed -i "s/j2/j$(nproc)/g" scripts/build.sh - ./scripts/build.sh + mkdir build && cd build + cmake .. && make -j$(nproc) mkdir -p ~/.cache/solc/v0.8.29/ - cp /usr/local/bin/solc ~/.cache/solc/v0.8.29/solc + cp ./solc/solc ~/.cache/solc/v0.8.29/solc - name: Install solc from cache (Linux ARM) if: ${{ matrix.platform == 'ubuntu-22.04-arm' }} From 220301c4864bf65e818886895cf0038ce9d536c3 Mon Sep 17 00:00:00 2001 From: samoht9277 Date: Wed, 29 Oct 2025 23:22:15 -0300 Subject: [PATCH 07/10] Modified solc step to install official binary linux uses amd64 always, since arm64 build uses qemu for sp1, we can run the amd64 version without issue. --- .github/workflows/tag_release.yaml | 47 ++++++------------------------ 1 file changed, 9 insertions(+), 38 deletions(-) diff --git a/.github/workflows/tag_release.yaml b/.github/workflows/tag_release.yaml index 7e926f460c4..0abd84df799 100644 --- a/.github/workflows/tag_release.yaml +++ b/.github/workflows/tag_release.yaml @@ -40,6 +40,7 @@ jobs: os: macos arch: aarch64 - platform: macos-latest + os: macos stack: l2 features: l2,l2-sql - platform: ubuntu-22.04 @@ -83,7 +84,6 @@ jobs: run: | curl -L https://sp1up.succinct.xyz | bash ~/.sp1/bin/sp1up --version 5.0.8 - - name: Set up QEMU (only Linux ARM) if: ${{ matrix.platform == 'ubuntu-22.04-arm' }} uses: docker/setup-qemu-action@v3 @@ -99,7 +99,6 @@ jobs: ~/.risc0/bin/rzup install cargo-risczero 3.0.3 ~/.risc0/bin/rzup install risc0-groth16 ~/.risc0/bin/rzup install rust - - name: Install CUDA (only Linux x86 GPU) uses: Jimver/cuda-toolkit@v0.2.24 if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.stack == 'l2_gpu' }} @@ -109,42 +108,20 @@ jobs: method: "network" sub-packages: '["nvcc"]' - - name: Install solc - if: ${{ matrix.platform != 'ubuntu-22.04-arm' }} - uses: lambdaclass/get-solc@master - with: - version: v0.8.29 - token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Protoc uses: arduino/setup-protoc@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Restore solc cache (Linux ARM) - if: ${{ matrix.platform == 'ubuntu-22.04-arm' }} - id: cache-solc - uses: actions/cache@v4.3.0 - with: - path: ~/.cache/solc/v0.8.29 - key: solc-${{ runner.os }}-${{ matrix.arch }}-v0-8-29 - - - name: Compile solc from source (Linux ARM) - if: ${{ matrix.platform == 'ubuntu-22.04-arm' && steps.cache-solc.outputs.cache-hit != 'true' }} - run: | - sudo apt-get update - sudo apt-get install -y git build-essential cmake clang ninja-build ccache python3 z3 libz3-dev libboost-all-dev - git clone --recursive --branch v0.8.29 https://github.com/ethereum/solidity.git solidity - cd solidity - mkdir build && cd build - cmake .. && make -j$(nproc) - mkdir -p ~/.cache/solc/v0.8.29/ - cp ./solc/solc ~/.cache/solc/v0.8.29/solc - - - name: Install solc from cache (Linux ARM) - if: ${{ matrix.platform == 'ubuntu-22.04-arm' }} + - name: Install solc run: | - sudo install -m 0755 ~/.cache/solc/v0.8.29/solc /usr/local/bin/solc + if [[ "${{ matrix.os }}" == "linux" ]]; then + sudo curl -L -o /usr/local/bin/solc https://github.com/argotorg/solidity/releases/download/v0.8.29/solc-static-linux + sudo chmod +x /usr/local/bin/solc + elif [[ "${{ matrix.os }}" == "macos" ]]; then + sudo curl -L -o /usr/local/bin/solc https://github.com/argotorg/solidity/releases/download/v0.8.29/solc-macos + sudo chmod +x /usr/local/bin/solc + fi solc --version - name: Build ethrex @@ -152,14 +129,12 @@ jobs: 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.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 mv crates/l2/prover/src/guest_program/src/sp1/out/riscv32im-succinct-zkvm-vk verification_keys/ethrex-riscv32im-succinct-zkvm-vk - - name: Upload artifact uses: actions/upload-artifact@v4 with: @@ -191,7 +166,6 @@ jobs: run: | cd crates/l2/contracts/src/ tar -czvf ../../../../ethrex-contracts.tar.gz . - - name: Upload contracts artifact uses: actions/upload-artifact@v4 with: @@ -216,7 +190,6 @@ jobs: - name: Format name run: | echo "TAG_VERSION=$(echo ${{ github.ref_name }} | tr -d v)" >> $GITHUB_ENV - # Pushes to ghcr.io/lambdaclass/ethrex - name: Build and push L1 Docker image id: push_l1 @@ -266,7 +239,6 @@ jobs: common_parent=$(git merge-base ${{ github.ref_name }} $last_tag) echo "PREVIOUS_TAG: $common_parent" echo "PREVIOUS_TAG=$common_parent" >> $GITHUB_ENV - - name: Update CHANGELOG id: changelog uses: requarks/changelog-action@v1 @@ -288,5 +260,4 @@ jobs: name: "ethrex: ${{ github.ref_name }}" body: > Installation and running instructions can be found in [our docs](https://docs.ethrex.xyz/) - ${{ steps.changelog.outputs.changes }} From bccd55c1a7b89a93858732dcd730bfd79f403b32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Casagrande?= <53660242+samoht9277@users.noreply.github.com> Date: Thu, 30 Oct 2025 17:41:40 -0300 Subject: [PATCH 08/10] Re-added enters --- .github/workflows/tag_release.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tag_release.yaml b/.github/workflows/tag_release.yaml index 0abd84df799..226401a74d2 100644 --- a/.github/workflows/tag_release.yaml +++ b/.github/workflows/tag_release.yaml @@ -166,6 +166,7 @@ jobs: run: | cd crates/l2/contracts/src/ tar -czvf ../../../../ethrex-contracts.tar.gz . + - name: Upload contracts artifact uses: actions/upload-artifact@v4 with: @@ -190,6 +191,7 @@ jobs: - name: Format name run: | echo "TAG_VERSION=$(echo ${{ github.ref_name }} | tr -d v)" >> $GITHUB_ENV + # Pushes to ghcr.io/lambdaclass/ethrex - name: Build and push L1 Docker image id: push_l1 @@ -239,6 +241,7 @@ jobs: common_parent=$(git merge-base ${{ github.ref_name }} $last_tag) echo "PREVIOUS_TAG: $common_parent" echo "PREVIOUS_TAG=$common_parent" >> $GITHUB_ENV + - name: Update CHANGELOG id: changelog uses: requarks/changelog-action@v1 @@ -260,4 +263,5 @@ jobs: name: "ethrex: ${{ github.ref_name }}" body: > Installation and running instructions can be found in [our docs](https://docs.ethrex.xyz/) + ${{ steps.changelog.outputs.changes }} From 71f67c4839426af2f181689835a61dd67626a76c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Casagrande?= <53660242+samoht9277@users.noreply.github.com> Date: Thu, 30 Oct 2025 17:43:43 -0300 Subject: [PATCH 09/10] Typo --- .github/workflows/tag_release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tag_release.yaml b/.github/workflows/tag_release.yaml index 226401a74d2..61cabcf0d9d 100644 --- a/.github/workflows/tag_release.yaml +++ b/.github/workflows/tag_release.yaml @@ -166,7 +166,7 @@ jobs: run: | cd crates/l2/contracts/src/ tar -czvf ../../../../ethrex-contracts.tar.gz . - + - name: Upload contracts artifact uses: actions/upload-artifact@v4 with: @@ -191,7 +191,7 @@ jobs: - name: Format name run: | echo "TAG_VERSION=$(echo ${{ github.ref_name }} | tr -d v)" >> $GITHUB_ENV - + # Pushes to ghcr.io/lambdaclass/ethrex - name: Build and push L1 Docker image id: push_l1 @@ -241,7 +241,7 @@ jobs: common_parent=$(git merge-base ${{ github.ref_name }} $last_tag) echo "PREVIOUS_TAG: $common_parent" echo "PREVIOUS_TAG=$common_parent" >> $GITHUB_ENV - + - name: Update CHANGELOG id: changelog uses: requarks/changelog-action@v1 @@ -263,5 +263,5 @@ jobs: name: "ethrex: ${{ github.ref_name }}" body: > Installation and running instructions can be found in [our docs](https://docs.ethrex.xyz/) - + ${{ steps.changelog.outputs.changes }} From ac4355b24ba5eed00fec95431276ce83480a7c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Casagrande?= <53660242+samoht9277@users.noreply.github.com> Date: Thu, 30 Oct 2025 17:46:46 -0300 Subject: [PATCH 10/10] Fixed whitespaces --- .github/workflows/tag_release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tag_release.yaml b/.github/workflows/tag_release.yaml index 61cabcf0d9d..24821ccf1a6 100644 --- a/.github/workflows/tag_release.yaml +++ b/.github/workflows/tag_release.yaml @@ -129,12 +129,14 @@ jobs: 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.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 mv crates/l2/prover/src/guest_program/src/sp1/out/riscv32im-succinct-zkvm-vk verification_keys/ethrex-riscv32im-succinct-zkvm-vk + - name: Upload artifact uses: actions/upload-artifact@v4 with: