Skip to content

Conversation

@noel2004
Copy link
Member

@noel2004 noel2004 commented Nov 27, 2025

Summary by CodeRabbit

  • New Features

    • Added support for Galileo V2 fork and Codec V10 across tools, runtimes, tests and configs.
    • GPU-enabled end-to-end prover test target (CUDA).
    • Enhanced integration test tooling for block fetching and validium-mode flows.
  • Chores

    • Bumped core dependencies (go-ethereum, da-codec, zkvm components and related crates).
    • Added Galileo V2 test environments, genesis, and configuration templates.
  • Refactor

    • Broadened STF/version handling and updated related public interfaces and config shapes.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 27, 2025

Walkthrough

Adds GalileoV2 / CodecV10 support across coordinator, rollup, and prover; renames Rust batch header API to include V10 and updates accessors; removes a prover config field; bumps multiple Go/Rust dependency pins; adds sepolia-galileoV2 e2e environment and updates integration fetch/import tooling and test infra.

Changes

Cohort / File(s) Change Summary
Dependency & build bumps
Cargo.toml, Makefile, bridge-history-api/go.mod, common/go.mod, coordinator/go.mod, database/go.mod, rollup/go.mod, tests/integration-test/go.mod, tests/prover-e2e/Makefile
Bumped go-ethereum pseudo-version and da-codec to v0.10.0, updated L2GETH_TAG, and updated workspace zkvm dependency tags.
CodecV10 acceptance (rollup & coordinator)
coordinator/internal/logic/provertask/batch_prover_task.go, rollup/internal/controller/blob_uploader/blob_uploader.go, rollup/internal/controller/relayer/l2_relayer.go, rollup/internal/utils/utils.go
Added CodecV10 handling across batch/blob construction, relayer commit/finalize flows, and validium header encoding; extended accepted codec-version branches.
GalileoV2 support & config
coordinator/build/setup_releases.sh, coordinator/conf/config.json, coordinator/internal/utils/version.go, zkvm-prover/config.json.template
Default fork changed to galileov2; added galileoV2 verifier entry and mapped "galileov2" to STF v10; removed hard_fork_name from prover config template entries.
Rust API refactor (public)
crates/libzkp/src/tasks/batch.rs
Renamed enum variant V7_V8_V9V7_to_V10, updated Display text, extended V10 logic, and renamed public accessors (must_*to_zkvm_batch_header_*) with updated call sites (public API change).
Prover config field removal & Makefile GPU target
crates/prover-bin/src/prover.rs, zkvm-prover/Makefile
Removed pub hard_fork_name: String from CircuitConfig; added test_e2e_run_gpu Make target that runs cargo with --features cuda.
Integration tool: fetch + import changes
rollup/tests/integration_tool/block_fetching.go, rollup/tests/integration_tool/imports.go, rollup/tests/integration_tool/main.go
Added block fetch/store routine (RPC fetch, L1 message handling, queueIndex checks), changed importData signature to accept blocks and optionally insert L2 blocks, introduced FetchConfig and CodecVersion, and conditional fetch-before-import flow.
Test infra & configs
tests/prover-e2e/*/.make.env, tests/prover-e2e/*/config.json, tests/prover-e2e/prepare/dump_block_records.sql
Added migration_blocks and unified import_data in Makefile, moved codec_version into JSON configs or removed env CODEC_VERSION, adjusted BEGIN/END block ranges and SQL block range.
New GalileoV2 e2e env
tests/prover-e2e/sepolia-galileoV2/...
Added test directory with .make.env, config.json (codec_version: 10, validium_mode:false), config.template.json, and a comprehensive genesis.json.
Misc version string bump
common/version/version.go
Internal version tag bumped from v4.7.8v4.7.9.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

  • Focus review on public API changes in crates/libzkp/src/tasks/batch.rs and all updated downstream call sites.
  • Verify consistent CodecV10 handling across coordinator, rollup, and prover task logic.
  • Inspect integration tool changes for correctness (noting a cfg usage/order issue in block_fetching.go where cfg appears referenced before definition).
  • Validate new genesis/config templates for structure and accidental sensitive data.

Possibly related PRs

Suggested labels

bump-version

Suggested reviewers

  • lispc
  • georgehao

Poem

🐇 I hopped from V7 through V8 and V9 to V10,

GalileoV2 now dances on the testnet green.
I fetched, I bumped, I renamed headers with care,
Built new configs and a genesis laid bare.
Carrots for CI — run fast, run clean! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided by the author, violating the template requirement to describe purpose, design rationale, and deployment details. Add a comprehensive description explaining what Galileo v2 does, why it's needed, how it's implemented, and confirm deployment tag versioning and breaking change status.
Docstring Coverage ⚠️ Warning Docstring coverage is 13.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title '[Feat] Galileo v2' clearly summarizes the main change: introducing Galileo v2 support.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/galileo-v2

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e9da849 and 6a94280.

📒 Files selected for processing (1)
  • crates/libzkp/src/tasks/batch.rs (5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: test
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: check
🔇 Additional comments (6)
crates/libzkp/src/tasks/batch.rs (6)

31-48: LGTM! Clear documentation and consistent naming.

The enum variant rename from V7_V8_V9 to V7_to_V10 accurately reflects the expanded STF version support, and the comments clearly explain the mapping between STF versions (v6, v7-v10) and the zkvm-prover witness header types (v6, v7, validium).


69-91: Method renames improve clarity.

The rename from must_* to to_zkvm_batch_header_* better describes the conversion intent. The unreachable!() calls serve as defensive guards since callers are expected to have matched the variant beforehand, which is the correct pattern here.


160-165: GalileoV2 hardfork check correctly added.

The extension to include ForkName::GalileoV2 in the valid forks list for V7_to_V10 headers aligns with the PR objective. The error message clearly lists all expected forks for debugging.


251-253: Accessor call updated consistently.

The call to to_zkvm_batch_header_validium() correctly uses the renamed accessor method.


50-57: Display implementation updated correctly.

The output "V7 - V10" clearly communicates the STF version range covered by this variant.


247-250: The code correctly handles STFVersion::V10 through the ReferenceHeader::V7_V8_V9 variant. The comprehensive comments at lines 236–246 explicitly document this as intentional: the da-codec is identical for versions 7–10, and the zkvm-prover deliberately reuses the same variant rather than creating new ones. The version differentiation occurs via the version byte in the batch header, not the ReferenceHeader variant name. The code compiles without errors, confirming that the external scroll_zkvm_types library supports this usage.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@noel2004 noel2004 marked this pull request as ready for review November 30, 2025 07:27
@noel2004
Copy link
Member Author

local e2e test has passed with following configurations:

  • feynman with guest 0.5.6
  • galileo with guest 0.7.0
  • galileoV2 with guest 0.7.1

@codecov-commenter
Copy link

codecov-commenter commented Nov 30, 2025

Codecov Report

❌ Patch coverage is 2.29885% with 85 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.49%. Comparing base (690bc01) to head (6a94280).

Files with missing lines Patch % Lines
rollup/tests/integration_tool/block_fetching.go 0.00% 56 Missing ⚠️
rollup/tests/integration_tool/main.go 0.00% 16 Missing ⚠️
rollup/tests/integration_tool/imports.go 0.00% 7 Missing ⚠️
coordinator/internal/utils/version.go 0.00% 2 Missing ⚠️
...tor/internal/logic/provertask/batch_prover_task.go 0.00% 1 Missing ⚠️
...internal/controller/blob_uploader/blob_uploader.go 0.00% 1 Missing ⚠️
rollup/internal/controller/relayer/l2_relayer.go 66.66% 1 Missing ⚠️
rollup/internal/utils/utils.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1771      +/-   ##
===========================================
- Coverage    36.59%   36.49%   -0.11%     
===========================================
  Files          247      248       +1     
  Lines        21239    21310      +71     
===========================================
+ Hits          7773     7777       +4     
- Misses       12637    12705      +68     
+ Partials       829      828       -1     
Flag Coverage Δ
bridge-history-api 8.07% <ø> (ø)
common 29.40% <ø> (+0.07%) ⬆️
coordinator 32.75% <0.00%> (+0.06%) ⬆️
database 42.05% <ø> (ø)
rollup 35.10% <2.38%> (-0.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (9)
coordinator/internal/utils/version.go (1)

25-35: New galileov2 → stfVersion 10 mapping fits existing pattern

Adding:

case "galileo":
    stfVersion = 9
case "galileov2":
    stfVersion = 10

after lowercasing hardForkName cleanly extends support for the GalileoV2 fork and stays consistent with the existing naming scheme. This should play nicely with config values like "galileoV2" thanks to strings.ToLower.

If this mapping grows further, consider hoisting these magic numbers into named constants or a small lookup map for easier maintenance, but it’s not blocking for this change.

Cargo.toml (1)

20-26: Consider pinning zkvm deps to a tag/commit instead of a feature branch

Pointing scroll-zkvm-prover, scroll-zkvm-verifier, and scroll-zkvm-types at the feat/galileo-v2 branch is fine while iterating, but it makes builds non‑reproducible once merged into develop. When the fork stabilizes, consider switching these to a tagged release or explicit commit hash; the sbv crates already follow that pattern with scroll-v91.2.

tests/prover-e2e/sepolia-galileoV2/config.json (1)

2-13: DB DSN credentials are dev‑friendly but may trigger secret scanners

The hard‑coded DSN (postgres://dev:dev@localhost:5432/...) is clearly for local/test use, but tools like Checkov will still flag it as a credential. If this path is scanned in CI and causes noise or failures, consider either:

  • Moving the DSN to an environment variable that tests read, or
  • Using a placeholder value here and letting your test harness substitute the real DSN.

From a functionality perspective, the validium_mode: false + codec_version: 10 wiring for the GalileoV2 e2e setup looks consistent.

zkvm-prover/Makefile (1)

1-1: Add test_e2e_run_gpu to the .PHONY declaration.

The new test_e2e_run_gpu target should be declared as phony to prevent conflicts with any potential file of the same name and to ensure Make always executes the recipe.

-.PHONY: prover prover_cpu lint tests_binary test_e2e_run test_run
+.PHONY: prover prover_cpu lint tests_binary test_e2e_run test_e2e_run_gpu test_run
tests/prover-e2e/Makefile (1)

12-14: .OPTIONAL is non-standard; consider .SECONDARY or removing the directive.

.OPTIONAL is not a standard GNU Make special target. If the intent is to prevent errors when no SQL files exist, the wildcard function already handles this gracefully by returning an empty string. Consider removing line 13 or using a more explicit approach.

 BLOCK_PRE_MIGRATIONS := $(wildcard conf/*.sql)
-.OPTIONAL: $(BLOCK_PRE_MIGRATIONS)
-

If the goal is to mark these as intermediate files that shouldn't be deleted, use .SECONDARY instead:

.SECONDARY: $(BLOCK_PRE_MIGRATIONS)
crates/libzkp/src/tasks/batch.rs (1)

69-91: Accessor method renames improve clarity.

The to_zkvm_batch_header_* naming convention better conveys the transformation intent compared to must_*. However, note that to_zkvm_batch_header_v7_to_v9 on line 76 handles V10 as well (per the match arm on line 78), so the name could be slightly misleading.

Consider renaming for consistency with the enum variant:

-    pub fn to_zkvm_batch_header_v7_to_v9(&self) -> &BatchHeaderV7 {
+    pub fn to_zkvm_batch_header_v7_to_v10(&self) -> &BatchHeaderV7 {
rollup/tests/integration_tool/imports.go (1)

45-58: LGTM! Block import parameter addition is well-integrated.

The new blocks parameter and conditional insertion logic cleanly extends the import workflow to support externally-fetched blocks.

Consider enhancing the log message for better observability:

 	if len(blocks) > 0 {
-		log.Info("import block")
+		log.Info("importing blocks", "count", len(blocks))
 		blockOrm := orm.NewL2Block(db)
 		if err := blockOrm.InsertL2Blocks(ctx, blocks); err != nil {
 			return nil, err
 		}
 	}
rollup/tests/integration_tool/main.go (1)

171-177: Use camelCase for variable naming per Go conventions.

The variable import_blocks uses snake_case, which is not idiomatic Go.

-	var import_blocks []*encoding.Block
+	var importBlocks []*encoding.Block
 	if cfg.FetchConfig != nil {
-		import_blocks, err = fetchAndStoreBlocks(ctx.Context, beginBlk, endBlk)
+		importBlocks, err = fetchAndStoreBlocks(ctx.Context, beginBlk, endBlk)
 		if err != nil {
 			return err
 		}
 	}

Also update the call at line 192:

-	ret, err := importData(ctx.Context, beginBlk, endBlk, import_blocks, chkNum, batchNum, bundleNum, seed)
+	ret, err := importData(ctx.Context, beginBlk, endBlk, importBlocks, chkNum, batchNum, bundleNum, seed)
rollup/tests/integration_tool/block_fetching.go (1)

71-74: Inconsistent error variable naming.

Use err consistently instead of introducing err3:

-	withdrawRoot, err3 := ethCli.StorageAt(ctx, cfg.L2MessageQueueAddress, cfg.WithdrawTrieRootSlot, big.NewInt(int64(number)))
-	if err3 != nil {
-		return nil, fmt.Errorf("failed to get withdrawRoot: %v. number: %v", err3, number)
+	withdrawRoot, err := ethCli.StorageAt(ctx, fetchCfg.L2MessageQueueAddress, fetchCfg.WithdrawTrieRootSlot, big.NewInt(int64(number)))
+	if err != nil {
+		return nil, fmt.Errorf("failed to get withdrawRoot: %v. number: %v", err, number)
 	}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e75d6c1 and 4ed1f6c.

⛔ Files ignored due to path filters (8)
  • Cargo.lock is excluded by !**/*.lock
  • bridge-history-api/go.sum is excluded by !**/*.sum
  • common/go.sum is excluded by !**/*.sum
  • coordinator/go.sum is excluded by !**/*.sum
  • database/go.sum is excluded by !**/*.sum
  • go.work.sum is excluded by !**/*.sum
  • rollup/go.sum is excluded by !**/*.sum
  • tests/integration-test/go.sum is excluded by !**/*.sum
📒 Files selected for processing (34)
  • Cargo.toml (1 hunks)
  • Makefile (1 hunks)
  • bridge-history-api/go.mod (2 hunks)
  • common/go.mod (2 hunks)
  • coordinator/build/setup_releases.sh (1 hunks)
  • coordinator/conf/config.json (1 hunks)
  • coordinator/go.mod (1 hunks)
  • coordinator/internal/logic/provertask/batch_prover_task.go (1 hunks)
  • coordinator/internal/utils/version.go (1 hunks)
  • crates/libzkp/src/tasks/batch.rs (6 hunks)
  • crates/prover-bin/src/prover.rs (0 hunks)
  • database/go.mod (1 hunks)
  • rollup/go.mod (1 hunks)
  • rollup/internal/controller/blob_uploader/blob_uploader.go (1 hunks)
  • rollup/internal/controller/relayer/l2_relayer.go (3 hunks)
  • rollup/internal/utils/utils.go (1 hunks)
  • rollup/tests/integration_tool/block_fetching.go (1 hunks)
  • rollup/tests/integration_tool/imports.go (1 hunks)
  • rollup/tests/integration_tool/main.go (7 hunks)
  • tests/integration-test/go.mod (1 hunks)
  • tests/prover-e2e/Makefile (3 hunks)
  • tests/prover-e2e/cloak-xen/.make.env (0 hunks)
  • tests/prover-e2e/cloak-xen/config.json (1 hunks)
  • tests/prover-e2e/prepare/dump_block_records.sql (1 hunks)
  • tests/prover-e2e/sepolia-feynman/.make.env (0 hunks)
  • tests/prover-e2e/sepolia-feynman/config.json (1 hunks)
  • tests/prover-e2e/sepolia-galileo/.make.env (1 hunks)
  • tests/prover-e2e/sepolia-galileo/config.json (1 hunks)
  • tests/prover-e2e/sepolia-galileoV2/.make.env (1 hunks)
  • tests/prover-e2e/sepolia-galileoV2/config.json (1 hunks)
  • tests/prover-e2e/sepolia-galileoV2/config.template.json (1 hunks)
  • tests/prover-e2e/sepolia-galileoV2/genesis.json (1 hunks)
  • zkvm-prover/Makefile (1 hunks)
  • zkvm-prover/config.json.template (1 hunks)
💤 Files with no reviewable changes (3)
  • tests/prover-e2e/cloak-xen/.make.env
  • tests/prover-e2e/sepolia-feynman/.make.env
  • crates/prover-bin/src/prover.rs
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-10-18T06:49:24.796Z
Learnt from: Thegaram
Repo: scroll-tech/scroll PR: 1746
File: rollup/internal/controller/sender/sender.go:637-640
Timestamp: 2025-10-18T06:49:24.796Z
Learning: In the file `rollup/internal/controller/sender/sender.go`, the resubmission logic in `createReplacingTransaction` does not convert V0 blob sidecars to V1 when resubmitting transactions after the Fusaka upgrade. This is an accepted edge case because it's unlikely to occur, geth is expected to handle it gracefully, and manual recovery is available if needed.

Applied to files:

  • rollup/internal/controller/relayer/l2_relayer.go
📚 Learning: 2025-07-29T16:38:24.647Z
Learnt from: colinlyguo
Repo: scroll-tech/scroll PR: 1714
File: rollup/internal/controller/relayer/l2_relayer.go:1548-1555
Timestamp: 2025-07-29T16:38:24.647Z
Learning: In rollup/internal/controller/relayer/l2_relayer.go, the validateBatchFields function should error out when GetBatchByHash fails to find a parent batch. This is intentional behavior - missing parent batches represent genuine error conditions that should halt batch submission processing. Genesis batch handling occurs separately from normal batch validation flow.

Applied to files:

  • rollup/internal/controller/relayer/l2_relayer.go
📚 Learning: 2025-04-15T08:52:44.176Z
Learnt from: colinlyguo
Repo: scroll-tech/scroll PR: 1645
File: rollup/proposer-tool-config.json:34-40
Timestamp: 2025-04-15T08:52:44.176Z
Learning: In configuration files like `rollup/proposer-tool-config.json`, placeholders such as `<mainnet read db config>` are intentionally left as-is to be replaced by users with their own configuration values when deploying the tool.

Applied to files:

  • tests/prover-e2e/sepolia-galileoV2/config.template.json
📚 Learning: 2024-10-20T15:30:18.084Z
Learnt from: colinlyguo
Repo: scroll-tech/scroll PR: 1530
File: tests/integration-test/go.mod:21-21
Timestamp: 2024-10-20T15:30:18.084Z
Learning: In the `tests/integration-test` folder, updates to import statements or dependencies are not necessary since it's only used for testing purposes.

Applied to files:

  • tests/integration-test/go.mod
🧬 Code graph analysis (3)
rollup/internal/controller/relayer/l2_relayer.go (3)
coordinator/internal/utils/codec_validium.go (1)
  • CodecVersion (10-10)
rollup/internal/orm/batch.go (2)
  • Batch (25-75)
  • Batch (83-85)
coordinator/internal/orm/batch.go (2)
  • Batch (18-72)
  • Batch (80-82)
rollup/tests/integration_tool/main.go (3)
database/config.go (1)
  • DBConfig (12-19)
coordinator/internal/config/config.go (1)
  • Config (57-63)
coordinator/internal/utils/codec_validium.go (1)
  • CodecVersion (10-10)
rollup/tests/integration_tool/imports.go (2)
common/database/db.go (1)
  • InitDB (48-80)
database/config.go (1)
  • DBConfig (12-19)
🪛 Checkov (3.2.334)
tests/prover-e2e/sepolia-galileoV2/config.json

[medium] 4-5: Basic Auth Credentials

(CKV_SECRET_4)

tests/prover-e2e/sepolia-galileoV2/config.template.json

[medium] 21-22: Basic Auth Credentials

(CKV_SECRET_4)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: test
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: tests
🔇 Additional comments (34)
tests/prover-e2e/prepare/dump_block_records.sql (1)

28-28: Block range update is correct for sepolia-galileoV2 test environment.

The WHERE clause correctly filters for blocks 15206780–15206809 (30 blocks), which matches the test data in tests/prover-e2e/sepolia-galileo/00100_import_blocks.sql. The old block range (20278000–20278050) has no remaining references in the codebase.

coordinator/internal/logic/provertask/batch_prover_task.go (1)

312-320: CodecV10 acceptance in switch looks correct; please confirm BlobDataProof layout compatibility

Adding encoding.CodecV10 to the allowed set in this switch cleanly extends support for V10 in the non‑validium path and keeps the error handling behavior unchanged. This matches the PR’s objective to roll out CodecV10.

One thing to double‑check: this path assumes the BlobDataProof memory layout (z, y, kzg_commitment, kzg_proof with the current hard‑coded byte offsets) is identical for all listed codec versions. Please confirm that CodecV10 uses the same layout; if it doesn’t, we’d need a version‑aware extraction instead of the current shared offsets.

tests/prover-e2e/sepolia-galileo/.make.env (1)

1-2: No verification issues found. The block range in sepolia-galileo is independently configured test data. Each .make.env file (galileo, galileoV2, feynman, cloak-xen) uses its own isolated block range from the respective testnet to populate the local e2e test database. Block numbers across different configurations do not need to follow any particular ordering.

Likely an incorrect or invalid review comment.

Makefile (1)

3-3: L2GETH_TAG bump looks consistent; just confirm tag–commit alignment

L2GETH_TAG now points to scroll-v5.9.17, which is used by the update target to pin github.com/scroll-tech/go-ethereum across modules. That’s aligned with the go-ethereum version bumps elsewhere; just make sure this tag actually corresponds to the same commit/pseudo-version you use in the various go.mod files so you don’t get drift between go get and the checked-in versions.

tests/prover-e2e/sepolia-feynman/config.json (1)

8-9: Explicit codec_version for Feynman is reasonable; ensure readers are updated

Adding "codec_version": 8 alongside "validium_mode": false makes the environment self-describing. Please double-check that whatever component parses this config now uses codec_version (and no longer relies on an external CODEC_VERSION env or default) so Feynman runs with codec v8 as intended.

database/go.mod (1)

11-11: go-ethereum bump matches the rest of the repo; verify DB paths still behave

Updating github.com/scroll-tech/go-ethereum here to v1.10.14-0.20251128092113-8629f088d78f keeps the database module aligned with the other services. Please just ensure you’ve run the full database test suite (and any migration/CLI flows that touch geth types) against this version to catch subtle API or type changes.

tests/integration-test/go.mod (1)

8-9: Test harness deps aligned with main modules; just re-run integration tests

Bumping github.com/scroll-tech/da-codec to v0.10.0 and github.com/scroll-tech/go-ethereum to v1.10.14-0.20251128092113-8629f088d78f keeps the integration-test module in sync with the main services. Since this is tests-only, the risk is low but you’ll still want to re-run the integration suite to catch any subtle behavior changes in the new codec / geth versions. Based on learnings, this folder is non-critical, so no blockers from my side.

tests/prover-e2e/sepolia-galileo/config.json (1)

8-9: Explicit codec_version for Galileo aligns with the new codec matrix

Introducing "codec_version": 9 under "validium_mode": false makes the Galileo prover-e2e config self-contained and consistent with the new codec-versioned environments. Please ensure the prover/coordinator stack that reads this config now relies on codec_version here (and doesn’t still depend on a separate CODEC_VERSION env or hardcoded default), so Galileo scenarios actually run with codec v9.

tests/prover-e2e/cloak-xen/config.json (1)

8-9: Codec version wiring for cloak‑xen looks consistent

Adding "codec_version": 8 alongside validium_mode: true is consistent with the broader codec‑versioned configs; no issues from this file alone.

rollup/internal/controller/blob_uploader/blob_uploader.go (1)

147-178: CodecV10 sharing the V7–V9 batch layout looks correct; update comment for clarity

Extending the CodecV7/8/9 branch to include encoding.CodecV10 is consistent as long as V10 uses the same DA Batch fields (parent hash, chunks, L1 queue hashes, and collected Blocks). You might also want to update the allBlocks comment (“collect blocks for CodecV7”) to mention V7–V10 to avoid confusion later.

coordinator/go.mod (1)

12-13: Dependency bumps look fine; rely on CI to confirm compatibility

Bumping github.com/scroll-tech/da-codec to v0.10.0 and github.com/scroll-tech/go-ethereum to the new pseudo‑version is straightforward here; just ensure coordinator CI (and any integration tests exercising CodecV10 / GalileoV2 paths) pass so we catch any upstream API or behavior changes.

bridge-history-api/go.mod (1)

13-25: Version bumps look straightforward; double‑check the go‑ethereum hotfix behavior

Upgrading github.com/scroll-tech/da-codec and github.com/scroll-tech/go-ethereum here and updating the replace to v1.10.14-0.20251128092359-25d5bf6b817b is mechanically fine. Given the explicit “header hash incompatibility” hotfix note, please confirm that this new go‑ethereum version still includes the required fix (or an equivalent upstream change) so bridge‑history behavior remains correct.

zkvm-prover/Makefile (1)

65-66: LGTM!

The new test_e2e_run_gpu target correctly mirrors the existing test_e2e_run target while adding CUDA support via --features cuda. The implementation maintains consistency with the existing pattern.

tests/prover-e2e/sepolia-galileoV2/config.template.json (2)

19-24: Template credentials acknowledged.

The dev:dev credentials in the DSN are appropriate for a test configuration template. Based on learnings, placeholders in configuration files are intentionally left for users to replace when deploying. The Checkov static analysis finding (CKV_SECRET_4) is a false positive in this context.


1-40: New galileoV2 test configuration template looks good.

The configuration structure properly defines prover_manager settings with galileoV2 fork support, appropriate test database settings, and placeholder values for user-provided secrets. This aligns with the broader PR objective of adding galileoV2 support to the prover-e2e test infrastructure.

common/go.mod (2)

18-18: LGTM!

The go-ethereum dependency update is consistent with the rollup/go.mod changes.


187-187: LGTM!

The da-codec indirect dependency update to v0.10.0 aligns with the direct dependency in rollup/go.mod.

tests/prover-e2e/sepolia-galileoV2/genesis.json (2)

1-111: LGTM! Genesis configuration for sepolia-galileoV2 test environment.

The genesis file properly defines:

  • Chain ID 534351 (Scroll Sepolia)
  • Complete fork progression through galileoV2
  • Scroll-specific L1 configuration pointing to Sepolia
  • System contract deployments at 0x5300... addresses
  • Pre-funded test accounts

This aligns well with the galileoV2 test infrastructure being introduced.


23-25: Fork timestamp progression is correct.

The galileoV2Time (1764244000) appropriately follows galileoTime (1764236000) with an 8000-second gap (~2.2 hours). The timing is intentional and suitable for the test environment staging of the galileoV2 upgrade.

tests/prover-e2e/Makefile (2)

31-34: LGTM!

The migration_blocks target correctly gates pre-migration execution based on the presence of SQL files. The conditional ifneq block ensures the goose command only runs when migrations exist.


63-64: LGTM!

The unified import_data target simplifies the workflow by using a single config-driven approach instead of separate codec-specific targets. The dependency chain properly ensures migrations run before data import.

crates/libzkp/src/tasks/batch.rs (4)

31-34: Documentation update correctly reflects V10 support.

The updated comments clearly explain the relationship between STF versions (v6-v10) from the golang side and the batch header types (v6, v7, validium) used in zkvm-prover's witness definition.


43-47: Enum variant rename clarifies STF version range.

The rename from V7_V8_V9 to V7_to_V10 accurately reflects that this variant now handles STF versions v7 through v10, as GalileoV2 introduces STFVersion::V10.


160-165: Fork validation correctly extended for GalileoV2.

The assertion now properly validates that V7_to_V10 headers are only used with EuclidV2, Feynman, Galileo, or GalileoV2 forks, aligning with the STF version support matrix.


246-249: STF version handling correctly extended to V10.

V10 is correctly mapped to the same ReferenceHeader::V7_V8_V9 variant since the da-codec structure remains identical across these STF versions. The version byte in the batch header differentiates the STF version while the header format stays consistent.

rollup/go.mod (1)

18-19: Dependency version updates are consistent across all Go modules.

The da-codec upgrade to v0.10.0 is uniformly applied across five modules (rollup, tests/integration-test, common, bridge-history-api, coordinator), and the go-ethereum commit 8629f088d78f is consistently pinned across six modules. The one exception in bridge-history-api (using commit 25d5bf6b817b via a documented replace directive for PR #1133) is intentional and properly annotated.

These updates align with the GalileoV2 and CodecV10 support objectives mentioned in the PR.

rollup/internal/utils/utils.go (1)

189-198: LGTM! CodecV10 correctly added to validium header version mapping.

The addition of encoding.CodecV10 to the version=1 branch is consistent with the existing V8/V9 handling pattern for validium mode.

rollup/internal/controller/relayer/l2_relayer.go (3)

491-517: LGTM! CodecV10 correctly added to ProcessPendingBatches.

The extension of the codec version switch to include CodecV10 follows the existing pattern for V7-V9 handling in both validium and non-validium paths.


749-764: LGTM! CodecV10 correctly added to finalizeBundle.

The codec version check extension maintains consistency with the ProcessPendingBatches changes and properly handles both validium and non-validium finalization paths.


1052-1059: LGTM! CodecV10 correctly added to validium commit payload construction.

The extension is consistent with the corresponding change in rollup/internal/utils/utils.go:encodeBatchHeaderValidium, ensuring CodecV10 is treated identically to V8/V9 for validium mode (version = 1).

rollup/tests/integration_tool/main.go (2)

82-97: LGTM! Configuration structures are well-designed.

The fetchConfig struct provides appropriate fields for RPC-based block fetching, and the optional FetchConfig field in the main config allows backward compatibility with existing configurations.


144-160: LGTM! CodecV10 support correctly added.

The codec version switch properly handles CodecV10 (case 10) alongside existing versions.

rollup/tests/integration_tool/block_fetching.go (2)

75-80: LGTM! Block construction is correct.

The encoding.Block is properly constructed with the block header, converted transactions, and withdraw root.


55-68: Unsafe assumption about L1 message transaction positioning in block.

The replacement logic (lines 60-68) assumes L1 message transactions occupy indices 0 to count-1 in blockTxs, but the counting logic (lines 35-40) counts L1 messages throughout all transactions without recording their positions. If L1 messages can appear at arbitrary positions within a block, this would attempt to replace non-L1 transactions or call AsL1MessageTx() on wrong transaction types. Either build a map of actual L1 message positions or add explicit validation that all L1 messages appear at the start of the block.

This same issue exists in rollup/internal/controller/watcher/l2_watcher.go.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
rollup/tests/integration_tool/main.go (1)

162-169: Minor: error message for end block parse is misleading

When parsing endBlk, the error message still says "invalid begin block number", which can be confusing when troubleshooting CLI input. Consider changing it to mention "end block number" instead.

♻️ Duplicate comments (1)
tests/prover-e2e/sepolia-galileoV2/config.template.json (1)

29-29: Fix typo in placeholder: "serach" should be "search".

-      "endpoint": "<serach for a public rpc endpoint like alchemy>"
+      "endpoint": "<search for a public rpc endpoint like alchemy>"
🧹 Nitpick comments (3)
tests/prover-e2e/sepolia-galileoV2/config.template.json (1)

21-22: Consider using environment variables for database credentials instead of hardcoding.

While this is a template file intended for local development, hardcoded credentials (even dev credentials) create unnecessary security surface. This template should be clearer that users must update these values before any deployment, or better yet, use environment variable placeholders.

As a reference, you could refactor the DSN to use environment variables:

-    "dsn": "postgres://dev:dev@localhost/scroll?sslmode=disable",
+    "dsn": "postgres://<POSTGRES_USER>:<POSTGRES_PASSWORD>@<POSTGRES_HOST>/scroll?sslmode=disable",

Then add a comment or documentation instructing users to replace the placeholders, or use actual environment variable references if the configuration loader supports them.

rollup/tests/integration_tool/main.go (2)

22-25: CodecVersion mapping is correct; consider small helper for reuse

The mapping from cfg.CodecVersion 6–10 to encoding.CodecV6CodecV10, with 0 falling back to the global default CodecV9, is logically consistent and guarded with an explicit error on unsupported values. If you end up needing this mapping elsewhere, consider extracting a small helper (e.g., codecFromInt(int) (encoding.CodecVersion, error)) to avoid duplicating the switch.

Also applies to: 144-160


190-206: JSON result output is clear; consider a small test around it

Marshalling ret with json.MarshalIndent and writing to outputPath with 0600 permissions is a clean way to expose deterministic output from this tool. Given Codecov is flagging missing coverage in this file, it might be worth adding a minimal test (or golden‑file style test) around importData’s returned structure and the file write path, to guard future refactors.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ed1f6c and fa3d0df.

📒 Files selected for processing (4)
  • rollup/tests/integration_tool/block_fetching.go (1 hunks)
  • rollup/tests/integration_tool/main.go (8 hunks)
  • tests/prover-e2e/sepolia-galileoV2/.make.env (1 hunks)
  • tests/prover-e2e/sepolia-galileoV2/config.template.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/prover-e2e/sepolia-galileoV2/.make.env
  • rollup/tests/integration_tool/block_fetching.go
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-04-15T08:52:44.176Z
Learnt from: colinlyguo
Repo: scroll-tech/scroll PR: 1645
File: rollup/proposer-tool-config.json:34-40
Timestamp: 2025-04-15T08:52:44.176Z
Learning: In configuration files like `rollup/proposer-tool-config.json`, placeholders such as `<mainnet read db config>` are intentionally left as-is to be replaced by users with their own configuration values when deploying the tool.

Applied to files:

  • tests/prover-e2e/sepolia-galileoV2/config.template.json
🧬 Code graph analysis (1)
rollup/tests/integration_tool/main.go (4)
coordinator/internal/types/auth.go (1)
  • Hash (134-141)
database/config.go (1)
  • DBConfig (12-19)
coordinator/internal/config/config.go (1)
  • Config (57-63)
coordinator/internal/utils/codec_validium.go (1)
  • CodecVersion (10-10)
🪛 Checkov (3.2.334)
tests/prover-e2e/sepolia-galileoV2/config.template.json

[medium] 21-22: Basic Auth Credentials

(CKV_SECRET_4)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: test
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: tests
🔇 Additional comments (4)
rollup/tests/integration_tool/main.go (4)

12-20: New common import usage looks appropriate

The added github.com/scroll-tech/go-ethereum/common import is only used in the config struct for addresses/hashes, keeping this dependency localized to the integration tool. No issues here.


82-97: Config and fetchConfig wiring is coherent

Using a dedicated fetchConfig and a pointer field FetchConfig *fetchConfig in config cleanly gates the optional fetch‑and‑store behavior, and adding CodecVersion at config level makes codec selection explicit and testable. This struct layout and JSON tagging look solid.


123-136: newConfig refactor is straightforward and safe

Unmarshalling into a local loadCfg and returning it directly is idiomatic and keeps cfg initialization contained to the Before hook. Error propagation is clear; no concerns.


171-177: Conditional fetch path using FetchConfig is sensible

Guarding fetchAndStoreBlocks behind cfg.FetchConfig != nil gives a clear feature flag for the fetch‑and‑store mode, and passing the resulting slice into importData via import_blocks (nil when not fetching) aligns with Go’s safe handling of nil slices. This control flow looks good.

lispc
lispc previously approved these changes Dec 2, 2025
Thegaram
Thegaram previously approved these changes Dec 2, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
crates/libzkp/src/tasks/batch.rs (3)

31-34: Tighten wording around STF→header mapping

The comment is clearer than before but still a bit ambiguous (“v7-v10 (current)” and “v7 (current)”). Consider explicitly naming the Rust types and the STF range they cover to avoid reintroducing the earlier confusion around V9 vs V10.

-/// We distinguish the header type in golang side according to the STF
-/// version, i.e. v6, v7-v10 (current), and validium
-/// And adapt it to the corresponding batch header type used in zkvm-prover's witness
-/// definition, i.e. v6, v7 (current), and validium
+/// We distinguish the header type on the Go side according to the STF
+/// version, i.e. v6, v7–v10 (current), and validium.
+/// These map to the batch header types used in zkvm-prover's witness
+/// definition: [`BatchHeaderV6`] for STF v6, [`BatchHeaderV7`] for STF v7–v10,
+/// and validium.

69-91: Accessors retain previous invariants; API rename is reasonable

The new to_zkvm_batch_header_* accessors mirror the old must_* helpers, with the same invariant enforcement via unreachable!() and clearer naming for the V7–V10 case.

If this crate has external consumers, you might optionally alias the old names to these (and deprecate them) to ease upgrades, but functionally this looks fine.


160-165: Fork sanity check correctly extended to GalileoV2

Including ForkName::GalileoV2 in the matches! and expected list keeps the da‑codec@v7/8/9/10 header guardrails in place for the new fork.

Very minor nit: for consistency, you could use {:?} for found as well, but that’s cosmetic.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 68f6509 and e9da849.

📒 Files selected for processing (1)
  • crates/libzkp/src/tasks/batch.rs (5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: test
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: tests
🔇 Additional comments (2)
crates/libzkp/src/tasks/batch.rs (2)

43-48: V7_to_V10 variant and Display/batch_hash wiring look consistent

Renaming the variant to V7_to_V10 and printing "V7 - V10" aligns the type and Display with the STF range, and forwarding batch_hash() to BatchHeaderV7 preserves existing behavior.

Also applies to: 54-55, 64-65


234-252: ReferenceHeader mapping cleanly reuses V7_V8_V9 for STF v10

Handling (Domain::Scroll, STFVersion::V7 | V8 | V9 | V10) via ReferenceHeader::V7_V8_V9 and the shared to_zkvm_batch_header_v7_to_v10() accessor matches the “codec unchanged” comment and keeps V10 on the existing path. The v6 and validium arms also line up with the new accessors.

@Thegaram Thegaram merged commit 22479a7 into develop Dec 2, 2025
18 checks passed
@Thegaram Thegaram deleted the feat/galileo-v2 branch December 2, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants