Skip to content

Commit 8aa5100

Browse files
authored
Merge branch 'main' into fix/bal-system-phase-validation
2 parents 2f4260c + 2cb18b0 commit 8aa5100

425 files changed

Lines changed: 60961 additions & 7477 deletions

File tree

Some content is hidden

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

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ hive/
2929
ethereum-package/
3030
tooling/ef_tests/blockchain/vectors
3131
tooling/ef_tests/blockchain/vectors_zkevm
32+
tooling/ef_tests/blockchain/vectors_zkevm_benchmark
3233
tooling/ef_tests/state/vectors
3334
tooling/sync/multisync_logs/
3435
dev_ethrex_l1/

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
fixtures/blockchain/2000-blocks.rlp filter=lfs diff=lfs merge=lfs -text
22
fixtures/blockchain/l2-1k-erc20.rlp filter=lfs diff=lfs merge=lfs -text
3+
tooling/zkevm_bench/fixtures/**/*.json.gz filter=lfs diff=lfs merge=lfs -text

.github/CODEOWNERS

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,2 @@
11
# Lambdaclass core team
22
* @lambdaclass/lambda-execution-reviewers
3-
4-
## ethrex L2 code owners
5-
crates/l2 @lambdaclass/ethrex-l2-reviewers
6-
crates/l2/contracts/src @jrchatruc @manuelbilbao
7-
cmd/ethrex/l2 @lambdaclass/ethrex-l2-reviewers
8-
cmd/ethrex/build* @lambdaclass/ethrex-l2-reviewers
9-
crates/blockchain/dev @lambdaclass/ethrex-l2-reviewers
10-
crates/common/crypto @lambdaclass/ethrex-l2-reviewers
11-
crates/common/types/blobs_bundle.rs @lambdaclass/ethrex-l2-reviewers
12-
crates/common/types/l2 @lambdaclass/ethrex-l2-reviewers
13-
crates/common/types/l2.rs @lambdaclass/ethrex-l2-reviewers
14-
crates/common/types/transaction.rs @lambdaclass/ethrex-l2-reviewers
15-
crates/common/rkyv_utils.rs @lambdaclass/ethrex-l2-reviewers
16-
crates/networking/p2p/rlpx/l2 @lambdaclass/ethrex-l2-reviewers
17-
crates/networking/rpc/types/transaction.rs @lambdaclass/ethrex-l2-reviewers
18-
crates/networking/rpc/clients @lambdaclass/ethrex-l2-reviewers
19-
crates/vm/levm/src/hooks/l2_hook.rs @lambdaclass/ethrex-l2-reviewers
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Detect changes
2+
description: >
3+
Classify the files a push or pull request touches so callers can skip build
4+
and test jobs when nothing they compile or execute changed.
5+
6+
outputs:
7+
inert_only:
8+
description: >
9+
'true' when every changed file is documentation or repository metadata.
10+
value: ${{ steps.classify.outputs.inert_only }}
11+
code_changed:
12+
description: >
13+
'true' when a Rust source file, a Cargo manifest or a lockfile changed.
14+
value: ${{ steps.filter.outputs.code_changed }}
15+
16+
runs:
17+
using: composite
18+
steps:
19+
- uses: dorny/paths-filter@v4
20+
id: filter
21+
with:
22+
# `inert` is a positive list, compared against `all_files` in the next
23+
# step, rather than a list of `!` negations. paths-filter ORs a filter's
24+
# patterns together, so `['!docs/**', '!**/*.md']` still matches
25+
# `README.md`: that file is not under `docs/`, the first negation
26+
# accepts it, and the gate never closes.
27+
filters: |
28+
all_files:
29+
- '**'
30+
inert:
31+
- 'docs/**'
32+
- '**/*.md'
33+
- '.gitignore'
34+
- '**/.gitignore'
35+
- 'audits/**'
36+
- 'LICENSE-*'
37+
- '.github/ISSUE_TEMPLATE/**'
38+
code_changed:
39+
- '**/*.rs'
40+
- '**/*.toml'
41+
- '**/*.lock'
42+
43+
- name: Classify changed files
44+
id: classify
45+
shell: bash
46+
env:
47+
ALL_FILES: ${{ steps.filter.outputs.all_files_count }}
48+
INERT: ${{ steps.filter.outputs.inert_count }}
49+
run: |
50+
set -euo pipefail
51+
# Equality, not `inert_count > 0`: a commit that touches a README *and*
52+
# a source file still has to build.
53+
if [[ "$INERT" == "$ALL_FILES" ]]; then
54+
inert_only=true
55+
else
56+
inert_only=false
57+
fi
58+
echo "inert_only=${inert_only}" >> "$GITHUB_OUTPUT"
59+
echo "inert_only=${inert_only} (changed=${ALL_FILES}, inert=${INERT})"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "Install rex"
2+
description: "Install the rex CLI from a GitHub release"
3+
4+
inputs:
5+
version:
6+
description: "rex release tag"
7+
required: false
8+
default: "v8.0.0"
9+
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Install rex
14+
shell: bash
15+
env:
16+
REX_VERSION: ${{ inputs.version }}
17+
run: |
18+
set -euo pipefail
19+
# Download via the shared helper (retries, and fails instead of writing
20+
# an HTTP error page to disk: a 503 page installed as the rex binary only
21+
# surfaces later as an unrelated-looking "cannot execute" error).
22+
"$GITHUB_WORKSPACE/.github/scripts/download.sh" \
23+
"https://github.com/lambdaclass/rex/releases/download/${REX_VERSION}/rex-linux-x86_64" \
24+
"$RUNNER_TEMP/rex"
25+
sudo install -m 755 "$RUNNER_TEMP/rex" /usr/local/bin/rex

.github/actions/install-risc0/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ runs:
99
run: |
1010
source "$GITHUB_WORKSPACE/.github/scripts/retry.sh"
1111
12-
retry curl -L https://risczero.com/install -o /tmp/risc0_install.sh
12+
# -f matters as much as the retry here: without it curl exits 0 on an
13+
# HTTP error, `retry` sees success, and bash then runs the error page.
14+
retry curl -fsSL https://risczero.com/install -o /tmp/risc0_install.sh
1315
bash /tmp/risc0_install.sh
1416
retry ~/.risc0/bin/rzup install cargo-risczero 3.0.3
1517
retry ~/.risc0/bin/rzup install risc0-groth16

.github/actions/install-solc/action.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,26 @@ inputs:
1010
runs:
1111
using: "composite"
1212
steps:
13-
- id: vars
13+
- name: Install solc
1414
shell: bash
15+
env:
16+
SOLC_VERSION: ${{ inputs.version }}
1517
run: |
18+
set -euo pipefail
19+
base="https://github.com/argotorg/solidity/releases/download/v${SOLC_VERSION}"
1620
if [[ "${{ runner.os }}" == "Linux" && "${{ runner.arch }}" == "X64" ]]; then
17-
sudo curl -L -o /usr/local/bin/solc https://github.com/argotorg/solidity/releases/download/v${{ inputs.version }}/solc-static-linux
21+
asset=solc-static-linux
1822
elif [[ "${{ runner.os }}" == "Linux" && "${{ runner.arch }}" == "ARM64" ]]; then
19-
sudo curl -L -o /usr/local/bin/solc https://github.com/argotorg/solidity/releases/download/v${{ inputs.version }}/solc-static-linux-arm
23+
asset=solc-static-linux-arm
2024
elif [[ "${{ runner.os }}" == "macOS" ]]; then
21-
sudo curl -L -o /usr/local/bin/solc https://github.com/argotorg/solidity/releases/download/v${{ inputs.version }}/solc-macos
25+
asset=solc-macos
26+
else
27+
echo "::error::No solc build for ${{ runner.os }}/${{ runner.arch }}"
28+
exit 1
2229
fi
23-
sudo chmod +x /usr/local/bin/solc
30+
# Download via the shared helper (retries, and fails instead of writing
31+
# an HTTP error page to disk: a 503 page installed as /usr/local/bin/solc
32+
# only surfaces later as an unrelated-looking "cannot execute" error).
33+
"$GITHUB_WORKSPACE/.github/scripts/download.sh" "$base/$asset" "$RUNNER_TEMP/solc"
34+
sudo install -m 755 "$RUNNER_TEMP/solc" /usr/local/bin/solc
2435
solc --version

.github/actions/install-sp1/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ runs:
99
run: |
1010
source "$GITHUB_WORKSPACE/.github/scripts/retry.sh"
1111
12-
retry curl -L https://sp1.succinct.xyz -o /tmp/sp1_install.sh
12+
# -f matters as much as the retry here: without it curl exits 0 on an
13+
# HTTP error, `retry` sees success, and bash then runs the error page.
14+
retry curl -fsSL https://sp1.succinct.xyz -o /tmp/sp1_install.sh
1315
bash /tmp/sp1_install.sh
1416
retry ~/.sp1/bin/sp1up --version 5.0.8

.github/actions/install-zisk/action.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,20 @@ runs:
1616
# and crates/guest-program/bin/zisk/Cargo.toml.
1717
#
1818
# ZISK_RUST_TOOLCHAIN pins the Rust toolchain release (0xPolygonHermez/rust tag)
19-
# used to build guests. ziskup installs the *latest* toolchain release, which
20-
# drifts independently of ZISK_VERSION: the zisk-1.0.0 and zisk-2.0.0 releases
21-
# dropped the guest linker script from rustc's riscv64ima-zisk-zkvm-elf target
22-
# spec, so guest links fail with undefined _global_pointer / _init_stack_top /
23-
# _kernel_heap_* symbols. zisk-0.5.1 is the newest release whose rustc embeds the
24-
# script (byte-identical to the one on the fork's default branch). Re-pin when
25-
# upstream ships a script-bearing toolchain compatible with ZISK_VERSION.
19+
# used to build guests, because ziskup installs whatever release is *latest* and
20+
# that drifts independently of ZISK_VERSION. The two must agree on who supplies
21+
# the guest linker script: since v1.1.0-alpha the SDK passes its own
22+
# (`zisk-build` injects `-C link-arg=-T<zisk_linker_script.ld>`), so the pin has
23+
# to name a toolchain whose riscv64ima-zisk-zkvm-elf target spec carries *no*
24+
# embedded script — otherwise the link gets two with conflicting memory maps and
25+
# rust-lld fails with "region 'rom' already defined".
26+
# zisk-1.0.0 onwards dropped the embedded script; zisk-3.0.0 is the newest and is
27+
# what ziskup itself installs today. (Before v1.1.0-alpha the dependency ran the
28+
# other way: the SDK passed nothing, so the pin had to be zisk-0.5.1, the last
29+
# release whose rustc still embedded a script.)
2630
env:
27-
ZISK_VERSION: "1.0.0-alpha"
28-
ZISK_RUST_TOOLCHAIN: "zisk-0.5.1"
31+
ZISK_VERSION: "1.1.0-alpha"
32+
ZISK_RUST_TOOLCHAIN: "zisk-3.0.0"
2933
run: |
3034
source "$GITHUB_WORKSPACE/.github/scripts/retry.sh"
3135

.github/actions/setup-rust/action.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,59 @@ inputs:
2222
runs:
2323
using: "composite"
2424
steps:
25-
- name: Extract Rust version from rust-toolchain.toml
25+
- name: Extract Rust version and compose the cache key
2626
id: rustver
2727
shell: bash
28+
env:
29+
CACHE_POOL: ${{ inputs.cache-pool }}
2830
run: |
2931
rust_version=$(grep -E '^[[:space:]]*channel[[:space:]]*=' rust-toolchain.toml \
3032
| sed -E 's/.*"([^"]+)".*/\1/')
3133
echo "rust_version=${rust_version}" >>"$GITHUB_OUTPUT"
3234
echo "Rust version: ${rust_version}"
35+
# Folded into this step rather than its own: `pr_loc.yaml` checks out two
36+
# revisions in one job and runs this action from each, and a differing
37+
# step list between them trips the runner's post-step bookkeeping with
38+
# "Index was out of range".
39+
image_family="${ImageOS:-unknown}"
40+
echo "image_family=${image_family}" >>"$GITHUB_OUTPUT"
41+
echo "Runner image family: ${image_family}"
42+
# rust-cache appends its `key` input only on the branch that builds a
43+
# per-job key; when `shared-key` is set it takes that branch instead and
44+
# `key` is dropped entirely. So a pooled job has to carry the image
45+
# family inside the shared key itself. Empty when no pool is configured,
46+
# which leaves rust-cache on the per-job key where `key` does apply.
47+
if [ -n "${CACHE_POOL}" ]; then
48+
echo "shared_key=${CACHE_POOL}-${image_family}" >>"$GITHUB_OUTPUT"
49+
else
50+
echo "shared_key=" >>"$GITHUB_OUTPUT"
51+
fi
3352
3453
- name: Install Rust
3554
uses: dtolnay/rust-toolchain@master
3655
with:
3756
toolchain: ${{ steps.rustver.outputs.rust_version }}
3857
components: ${{ inputs.components }}
3958

59+
# rust-cache keys on `runner.os` and `runner.arch` only, which are `Linux`
60+
# and `x64` for both ubuntu-22.04 and ubuntu-24.04 — so a pool shared by
61+
# jobs on different images resolves to one entry spanning both. Cached
62+
# proc-macro `.so`s are dynamically linked against the glibc of whichever
63+
# image built them, so restoring a 24.04 entry into a 22.04 job produces
64+
# `GLIBC_2.39 not found` when rustc dlopens the macro, and the crate fails
65+
# with a wall of unresolved-import errors that name the dependency rather
66+
# than the cache.
67+
#
68+
# `ImageOS` (ubuntu22 / ubuntu24 / macos15) is the image family, so it
69+
# separates the glibc floors without keying on `ImageVersion`, which
70+
# changes with every runner image release and would evict the pool weekly.
71+
# It goes into `shared-key`, not `key`: rust-cache ignores `key` whenever
72+
# `shared-key` is set, so keying the image family there alone left every
73+
# pooled job on the shared, image-blind key it was meant to split.
74+
# Read via `$GITHUB_OUTPUT` rather than `env.ImageOS` directly: the `env`
75+
# context is not reliably available to `with:` on a `uses:` step inside a
76+
# composite action. Self-hosted runners may not set it; they then share one
77+
# `unknown` bucket, which is still consistent within itself.
4078
# The Actions cache budget defaults to 10GB per repository and is evicted
4179
# LRU, while one target dir here runs 1.2-2.75GB, so the budget holds only a
4280
# handful of entries. Two rules keep them from evicting each other:
@@ -58,7 +96,8 @@ runs:
5896
- name: Add Rust Cache
5997
uses: Swatinem/rust-cache@v2
6098
with:
61-
shared-key: ${{ inputs.cache-pool }}
99+
shared-key: ${{ steps.rustver.outputs.shared_key }}
100+
key: ${{ steps.rustver.outputs.image_family }}
62101
save-if: ${{ inputs.save-cache == 'true' && github.ref == 'refs/heads/main' }}
63102
workspaces: |
64103
.

0 commit comments

Comments
 (0)