feat(riscv-guest): l2 execution guest rollup - #3783
Open
Filter94 wants to merge 28 commits into
Open
Conversation
Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
…at/l2-execution-guest-rollup
…est program Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
…rmatted the output from the wrapped runner
Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
…at/l2-execution-guest-rollup
Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
…at/l2-execution-guest-rollup
Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
…at/l2-execution-guest-rollup # Conflicts: # arithmetization/src/main/riscv/main.zkc
…implementation as a stub for now
…implementation as a stub for now
Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
…at/l2-execution-guest-rollup
Move test content that isn't required for this branch's own CI (unit tests, JSON/runner/wrap host tooling) downstream to the coverage PR stack, keeping only extended-vanilla-runner + vanilla_wrap (the reference-tests CI job depends on them). Finalize "Python reference implementation" wording at the source instead of introducing "Python oracle" here and renaming it in a later PR. Trim a few comments that restated the code directly below them.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the l2-execution guest from a “vanilla stateless execution wrapper” into Linea’s extended rollup l2-execution guest (range conflation + bridge/FTX logic + committed public inputs), and updates the host/reference-test tooling and CI to validate it against the Ethereum Foundation zkevm fixture corpus.
Changes:
- Added “no L2MessageService configured” (zero-address) bridge-suppression semantics in the Python spec, plus targeted tests for both bridge-state reads and message-log extraction suppression.
- Reworked the RISC-V l2-execution guest into the extended-input/extended-output pipeline (new SSZ codec, guest logic, log-preserving execution seam) and added an “extended-vs-vanilla” reference-test runner over EF fixtures.
- Updated guest developer tooling + CI workflows (reference-test job, crypto-deps install target, fixture harness wrapping) to match the new extended guest interface.
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| rollup_spec/tests/test_l2_execution.py | Adds tests for zero-address bridge suppression behavior. |
| rollup_spec/tests/test_l1_rollup.py | Adds business-level tests for ProgramVK approval anchoring on finalization. |
| rollup_spec/src/rollup_spec/rollup.py | Renames list-hash helper usage to hash_digest_list for message/root hashing. |
| rollup_spec/src/rollup_spec/rollup_aggregation.py | Updates rollup aggregation preimage-binding hashes to hash_digest_list. |
| rollup_spec/src/rollup_spec/l2_execution.py | Implements zero-address bridge short-circuit + withdrawal rejection + digest-list hashing. |
| rollup_spec/src/rollup_spec/l1_rollup.py | Updates L2->L1 roots hashing to hash_digest_list for preimage checks. |
| riscv-guests/README.md | Updates documentation to describe extended guest + reference-test terminology. |
| riscv-guests/Makefile | Adds native crypto deps install target for host tools/tests. |
| riscv-guests/l2-execution/test/vanilla_wrap.zig | Implements dummy-wrap adapter from vanilla EF SSZ input to extended guest input. |
| riscv-guests/l2-execution/test/stdlibs_accel_test.zig | Updates delegated precompile backend import name (zesu_zkvm_stdlibs). |
| riscv-guests/l2-execution/test/spec_runner.zig | Generalizes adapter contract (skip/adaptation failure) and adds skipped stats. |
| riscv-guests/l2-execution/test/extended_vanilla_runner.zig | Adds extended-guest reference-test runner against EF fixture validity verdicts. |
| riscv-guests/l2-execution/test/evm_spec_runner.zig | Removes the old vanilla spec runner entrypoint. |
| riscv-guests/l2-execution/test/evm_execution_guest_test.zig | Updates host test to validate log-preserving seam parity vs vanilla executor. |
| riscv-guests/l2-execution/src/zkvm_provide.zig | Switches to zesu_zkvm_stdlibs and adds modexp/ripemd160 + zkvm_log export wiring. |
| riscv-guests/l2-execution/src/zesu_crypto_backend.zig | Adds a small shim to reuse Zesu’s pure-Zig crypto implementations. |
| riscv-guests/l2-execution/src/l2_execution.zig | Adds extended guest logic (conflation invariants, bridge suppression, FTX, message extraction). |
| riscv-guests/l2-execution/src/l2_execution_ssz.zig | Adds the extended guest SSZ codec (schema 0x0002/0x0003). |
| riscv-guests/l2-execution/src/execution.zig | Adds log-preserving stateless execution seam returning full receipts/logs. |
| riscv-guests/l2-execution/src/evm_execution_guest.zig | Changes guest entrypoint to extended input/output pipeline + commits PI hash. |
| riscv-guests/l2-execution/scripts/run_execution_specs_ssz_fixtures.go | Wraps vanilla EF inputs before running guest; improves mismatch diagnostics. |
| riscv-guests/l2-execution/README.md | Updates package-level docs to describe extended guest scope and reference-tests. |
| riscv-guests/l2-execution/Makefile | Replaces spec-test target with reference-test target and updates exec flags docs. |
| riscv-guests/l2-execution/build.zig.zon | Bumps Zesu pin and EF fixtures version. |
| riscv-guests/l2-execution/build.zig | Rewires build graph for extended guest modules + reference-test runner. |
| riscv-guests/.gitignore | Ignores nested guest .cache/ directories. |
| .husky/commit-msg | Adds riscv-guest as an allowed commit scope. |
| .github/workflows/riscv-guests-host-tests.yml | Replaces spec-test job with extended-guest reference-test job. |
| .github/actions/setup-riscv-guests/action.yml | Uses the shared Makefile target for native crypto deps; caches /usr/local artifacts. |
| .github/actions/setup-arithmetization-riscv/action.yml | Adds the same native crypto deps cache/install logic for arithmetization jobs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
brew --prefix replaces the hardcoded /opt/homebrew path, which broke on Intel Macs; sudo is now detected before use, which broke in sudo-less root containers. Addresses Copilot review comments on PR #3783. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…not just main pull_request: branches: [main] means these workflows only ever evaluate for a PR whose base is main. This repo's l2-execution/rollup guest work is developed as a series of stacked PRs (feat/l2-execution-guest-rollup-v2 -> ... -> pr4-v2), where every PR but the last targets another branch in the stack, not main. None of those intermediate PRs ever got a signal from these workflows, regardless of what they changed — there was no way to tell whether a given guest-program PR actually built or ran under zkc until the whole stack reached a main-targeting PR. Dropped the branches: filter from pull_request (kept on push, which is for post-merge validation and would otherwise fire on every push to every branch touching these paths) on the 4 workflows that actually exercise the guest program end to end: riscv-guests-host-tests (native unit tests), riscv-guests-zkc-interpreter-run and arithmetization-guest-programs-run (build + run under zkc), and arithmetization-riscv-act4-test (RISC-V architecture compliance). This is additive only — main-targeting PRs match exactly as before, plus now every stacked PR does too. The paths: filters (already audited and corrected on this branch in the same commit) keep it scoped to actual guest-program/CI-infra changes. Left the two benchmark workflows and the two simple-compile-check workflows on main-only pull_request gating: the benchmarks are 120-minute paired A/B comparisons driven by explicit base_ref/optim_ref workflow_dispatch inputs, not something to run automatically on every stacked-PR push. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements issue(s) #
Checklist
PR.