Skip to content

chore(l1,l2): migrate tooling/ to ethrex-tooling repo#6743

Open
azteca1998 wants to merge 1 commit into
mainfrom
migrate-tooling-to-ethrex-tooling-v2
Open

chore(l1,l2): migrate tooling/ to ethrex-tooling repo#6743
azteca1998 wants to merge 1 commit into
mainfrom
migrate-tooling-to-ethrex-tooling-v2

Conversation

@azteca1998
Copy link
Copy Markdown
Contributor

Summary

Supersedes #6487 — fresh branch from main implementing the same migration.

  • Delete the in-repo tooling/ directory (~130 files) and move all development tooling to lambdaclass/ethrex-tooling
  • ethrex-monitor and ethrex-repl become git deps with rev = "215859a3" pinning
  • Add [patch."https://github.com/lambdaclass/ethrex"] section so tooling's transitive deps resolve to local workspace crates
  • All CI workflows checkout ethrex-tooling into tooling/ before steps that need it
  • Dockerfile drops COPY tooling and handles cargo chef cook failures gracefully
  • Makefile removes tooling manifest entries from update-cargo-lock / check-cargo-lock
  • tooling/ added to .gitignore to prevent accidental commits of cloned checkout
  • Docs and README updated to reference the ethrex-tooling repo
  • .cargo/config.toml.example added for local cross-repo development

Reviewer feedback addressed (from #6487)

Reviewer Feedback Resolution
iovoid README should mention ethrex-tooling Added Tooling section to README
iovoid tooling/ should be gitignored Added to .gitignore
iovoid Makefile and docs references Updated Makefile, docs, and LEVM README
ElFantasma || true too broad in Dockerfile Logs warning but still allows failure
ElFantasma Use rev instead of branch Using rev = "215859a3"
ElFantasma [patch] section needs maintenance docs Comment explains new crates must be added
ElFantasma/avilagaston9 Stale path triggers in LEVM workflow Removed tooling/ef_tests/state paths

Test plan

  • cargo check --workspace passes
  • cargo build --workspace passes
  • Docker build succeeds: docker build -t ethrex:local .
  • CI workflows pass (ethrex-tooling checkout steps are correct)
  • Verify no tooling/ directory in the repo (except as gitignored checkout target)

Closes #6487

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

⚠️ Known Issues — intentionally skipped tests

Source: docs/known_issues.md

Known Issues

Tests intentionally excluded from CI. Source of truth for the Known
Issues
section the L1 workflow appends to each ef-tests job summary
and posts as a sticky PR comment.

EF Tests — Stateless coverage narrowed to EIP-8025 optional-proofs

make -C tooling/ef_tests/blockchain test calls test-stateless-zkevm
instead of test-stateless. The zkevm@v0.3.3 fixtures are filled against
bal@v5.6.1, out of sync with current bal spec; the broad target trips ~549
fixtures. Re-broaden once the zkevm bundle is regenerated.

Why and resolution path

PR #6527 broadened
test-stateless to extract the entire for_amsterdam/ tree from the
zkevm bundle and run all of it under --features stateless; combined with
this branch's bal-devnet-7 semantics that scope produces ~549
GasUsedMismatch / ReceiptsRootMismatch /
BlockAccessListHashMismatch failures.

test-stateless-zkevm filters cargo to the eip8025_optional_proofs
suite, which still validates the stateless harness without the bal-version
mismatch.

Re-broaden by switching test: back to test-stateless in
tooling/ef_tests/blockchain/Makefile once the zkevm bundle is regenerated
against the current bal spec.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

Benchmark Results Comparison

No significant difference was registered for any benchmark run.

Detailed Results

Benchmark Results: BubbleSort

Command Mean [s] Min [s] Max [s] Relative
main_revm_BubbleSort 2.994 ± 0.068 2.950 3.179 1.08 ± 0.03
main_levm_BubbleSort 2.783 ± 0.044 2.742 2.900 1.00
pr_revm_BubbleSort 2.960 ± 0.013 2.943 2.979 1.06 ± 0.02
pr_levm_BubbleSort 2.789 ± 0.032 2.763 2.865 1.00 ± 0.02

Benchmark Results: ERC20Approval

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Approval 989.3 ± 6.8 973.6 996.4 1.01 ± 0.01
main_levm_ERC20Approval 1055.4 ± 5.6 1047.2 1063.1 1.08 ± 0.01
pr_revm_ERC20Approval 980.2 ± 8.7 972.2 1000.2 1.00
pr_levm_ERC20Approval 1049.7 ± 5.5 1040.2 1057.6 1.07 ± 0.01

Benchmark Results: ERC20Mint

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Mint 132.9 ± 0.9 131.7 134.8 1.01 ± 0.01
main_levm_ERC20Mint 158.4 ± 0.7 157.1 159.4 1.20 ± 0.01
pr_revm_ERC20Mint 132.2 ± 1.1 131.1 134.9 1.00
pr_levm_ERC20Mint 158.5 ± 1.3 157.2 161.0 1.20 ± 0.01

Benchmark Results: ERC20Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Transfer 235.2 ± 2.4 231.8 240.0 1.01 ± 0.01
main_levm_ERC20Transfer 261.0 ± 2.3 259.3 266.9 1.12 ± 0.01
pr_revm_ERC20Transfer 233.4 ± 1.4 231.1 235.3 1.00
pr_levm_ERC20Transfer 261.8 ± 1.8 259.0 264.4 1.12 ± 0.01

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Factorial 226.2 ± 5.1 222.4 238.9 1.00 ± 0.02
main_levm_Factorial 268.2 ± 1.9 265.5 270.8 1.19 ± 0.01
pr_revm_Factorial 225.2 ± 1.9 222.9 228.6 1.00
pr_levm_Factorial 269.0 ± 3.4 265.7 277.8 1.19 ± 0.02

Benchmark Results: FactorialRecursive

Command Mean [s] Min [s] Max [s] Relative
main_revm_FactorialRecursive 1.681 ± 0.028 1.652 1.733 1.02 ± 0.02
main_levm_FactorialRecursive 1.656 ± 0.020 1.603 1.671 1.00
pr_revm_FactorialRecursive 1.667 ± 0.042 1.590 1.723 1.01 ± 0.03
pr_levm_FactorialRecursive 1.662 ± 0.013 1.649 1.689 1.00 ± 0.01

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Fibonacci 205.6 ± 0.9 204.2 207.0 1.00 ± 0.01
main_levm_Fibonacci 252.7 ± 3.3 250.4 259.9 1.23 ± 0.02
pr_revm_Fibonacci 205.2 ± 2.1 203.1 210.7 1.00
pr_levm_Fibonacci 259.0 ± 1.5 256.2 260.3 1.26 ± 0.02

Benchmark Results: FibonacciRecursive

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_FibonacciRecursive 868.5 ± 8.4 855.6 879.1 1.19 ± 0.01
main_levm_FibonacciRecursive 732.9 ± 6.0 726.9 745.2 1.00 ± 0.01
pr_revm_FibonacciRecursive 870.1 ± 14.8 849.8 906.1 1.19 ± 0.02
pr_levm_FibonacciRecursive 731.2 ± 5.2 725.7 742.9 1.00

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ManyHashes 8.4 ± 0.1 8.3 8.8 1.01 ± 0.02
main_levm_ManyHashes 9.8 ± 0.1 9.7 10.0 1.18 ± 0.01
pr_revm_ManyHashes 8.3 ± 0.0 8.3 8.4 1.00
pr_levm_ManyHashes 9.9 ± 0.1 9.8 10.0 1.19 ± 0.01

Benchmark Results: MstoreBench

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_MstoreBench 259.2 ± 8.0 251.3 273.3 1.08 ± 0.03
main_levm_MstoreBench 239.5 ± 1.7 237.5 243.0 1.00 ± 0.01
pr_revm_MstoreBench 257.4 ± 7.7 251.9 273.4 1.08 ± 0.03
pr_levm_MstoreBench 239.2 ± 1.0 237.5 240.8 1.00

Benchmark Results: Push

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Push 290.5 ± 0.6 289.8 291.9 1.00
main_levm_Push 299.8 ± 6.5 295.9 317.3 1.03 ± 0.02
pr_revm_Push 291.7 ± 4.1 289.2 302.7 1.00 ± 0.01
pr_levm_Push 298.7 ± 2.1 296.7 302.4 1.03 ± 0.01

Benchmark Results: SstoreBench_no_opt

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_SstoreBench_no_opt 169.7 ± 4.4 162.7 177.2 1.68 ± 0.04
main_levm_SstoreBench_no_opt 102.1 ± 1.5 101.1 105.9 1.01 ± 0.01
pr_revm_SstoreBench_no_opt 167.3 ± 5.5 162.0 176.5 1.65 ± 0.05
pr_levm_SstoreBench_no_opt 101.3 ± 0.3 100.8 101.8 1.00

@azteca1998 azteca1998 force-pushed the migrate-tooling-to-ethrex-tooling-v2 branch from 0467aae to f1601c8 Compare May 29, 2026 13:09
@azteca1998 azteca1998 changed the title chore: migrate tooling/ to ethrex-tooling repo chore(l1,l2): migrate tooling/ to ethrex-tooling repo May 29, 2026
@github-actions github-actions Bot added L1 Ethereum client L2 Rollup client labels May 29, 2026
@azteca1998 azteca1998 force-pushed the migrate-tooling-to-ethrex-tooling-v2 branch from f1601c8 to f1bd77e Compare June 2, 2026 11:32
@azteca1998 azteca1998 marked this pull request as ready for review June 2, 2026 15:12
@azteca1998 azteca1998 requested a review from a team as a code owner June 2, 2026 15:12
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jun 2, 2026

Too many files changed for review. (170 files found, 100 file limit)

@edg-l
Copy link
Copy Markdown
Contributor

edg-l commented Jun 4, 2026

Overall the migration is sound and the git-dep + [patch] approach is correct. A few things to address before merge, plus coordination with #6725.

1. Pin to a real commit, not main — and bump it after lambdaclass/ethrex-tooling#3 merges

Cargo.toml pins rev = "215859a3" (lambdaclass/ethrex-tooling#1), but every workflow checks out ref: main, which is already ahead. So the binary links monitor/repl from 215859a3 while CI builds/tests tooling from a newer main — they already disagree.

Concrete steps:

  1. Merge lambdaclass/ethrex-tooling#3 first (it forwards GIT_SHA/GIT_BRANCH/VERSION to docker build, ported from #6725). That merge advances ethrex-tooling main to a new HEAD commit — call it <NEW_SHA>.
  2. In this PR, set the monitor/repl git deps to rev = "<NEW_SHA>" (full 40-char SHA, not the short form).
  3. Replace every workflow's ref: main with that same <NEW_SHA>.

Pinning to <NEW_SHA> guarantees the rev contains the monitor/repl crates and the docker_monitor fix, and that CI tests exactly what the binary links. Define the SHA once (shared workflow/repo variable) so the dep rev and the CI ref can't drift apart again.

2. Coordinate with #6725 (Dockerfile modernization) — rebase after it merges

#6725 rewrites the Dockerfile (BuildKit, cache mounts, multi-arch) and also touches .dockerignore, .gitignore, Makefile, and edits tooling/sync/docker_monitor.py (which this PR deletes). To keep its improvements, merge it first, then rebase this PR on top and apply these Dockerfile edits:

  • Delete the two COPY --link tooling/repl ./tooling/repl and COPY --link tooling/monitor ./tooling/monitor lines in both the planner and builder stages — those crates are git deps now, so the COPY would fail on a missing path.
  • Keep ENV CARGO_NET_GIT_FETCH_WITH_CLI=true — now load-bearing, since monitor/repl are fetched as rev-pinned git deps inside the container.
  • Keep the [patch."https://github.com/lambdaclass/ethrex"] section so tooling's transitive ethrex-* deps resolve to the local workspace.
  • That [patch] redirects to ./crates/... which aren't present at the cargo chef cook stage, so cook can't fully resolve. Guard it:
    cargo chef cook --profile $PROFILE --recipe-path recipe.json $BUILD_FLAGS \
      || echo "WARNING: cook skipped (git-patched deps need full tree); full build below reuses the target cache mount"
    The || echo swallows all cook errors, but it's tolerable here because #6725 mounts target/ as a persistent cache (--mount=type=cache,target=/ethrex/target), so cargo build still gets incremental reuse even when cook is a no-op.
  • .dockerignore: keep #6725's .git/ + fixtures/* excludes; replace its granular tooling/ef_tests/... lines with a blanket tooling/.
  • .gitignore / Makefile: take #6725's versions as the base, then re-apply this PR's tooling-path removals on top.
  • tooling/sync/docker_monitor.py: resolve as deleted here — the file lives in ethrex-tooling now, and #6725's edit to it is ported via lambdaclass/ethrex-tooling#3.

3. [patch] section has no guard

If a workspace crate used transitively by tooling is missing from the list, you get a silently divergent/duplicate build. Consider a small cargo metadata CI assertion to enforce it.

4. Local-dev UX

The Makefile still points at in-repo paths (tooling/load_test/Cargo.toml, tooling/genesis, tooling/ef_tests/blockchain/.fixtures_url). A dev who hasn't cloned ethrex-tooling into tooling/ gets cryptic failures. A preflight check would help; non-blocking since docs are updated.

5. Ongoing maintenance note

Any ethrex crate API change now requires a lockstep rev bump of the tooling dep plus a matching CI ref. Worth calling out as a conscious two-repo workflow.

Move all development tooling (EF tests, load tests, monitor TUI, REPL,
benchmarks, etc.) to the external lambdaclass/ethrex-tooling repository.

- Delete the in-repo tooling/ directory (~130 files)
- Change ethrex-monitor and ethrex-repl to git deps with rev pinning
- Add [patch."https://github.com/lambdaclass/ethrex"] section so
  tooling's transitive deps resolve to local workspace crates
- Update CI workflows to checkout ethrex-tooling into tooling/
- Remove stale tooling/ path triggers from LEVM workflow
- Remove tooling manifest entries from Makefile cargo-lock targets
- Update Dockerfile to drop tooling COPY and handle chef cook failures
- Add tooling/ to .gitignore to prevent accidental commits
- Update docs and README to reference ethrex-tooling repo
- Add .cargo/config.toml.example for local cross-repo development

Closes #6487
@azteca1998 azteca1998 force-pushed the migrate-tooling-to-ethrex-tooling-v2 branch from 7eca990 to ed6cc50 Compare June 4, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client L2 Rollup client

Projects

Status: In Review
Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants