Skip to content

Conversation

@Thegaram
Copy link
Contributor

@Thegaram Thegaram commented Feb 11, 2026

Purpose or design rationale of this PR

The codebase already maps CodecV10 (GalileoV2) to Validium V1, which is the intended behavior. Just added a few cleanups and clarifications.

Summary by CodeRabbit

  • Bug Fixes
    • Improved error messages and validation for Validium mode configurations
    • Enhanced Validium batch encoding by removing legacy workarounds
    • Tightened codec version requirements for Validium operations

@Thegaram Thegaram requested a review from noel2004 February 11, 2026 09:06
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

Changes tighten ValidiumMode validation by restricting fork names to galileov2 and requiring minimum CodecV10 in relayer configuration. A genesis-state-root workaround is removed from batch header encoding. Error messages and comments are updated for consistency.

Changes

Cohort / File(s) Summary
ValidiumMode Fork Validation
coordinator/internal/utils/version.go, coordinator/internal/utils/codec_validium.go
Added strict fork name validation for ValidiumMode, restricting to "galileov2" only with error handling for unsupported forks. Updated error message reference in codec validation.
RelayerConfig Validation
rollup/cmd/rollup_relayer/app/app.go
Introduced new validation requiring minCodecVersion to be at least CodecV10 when ValidiumMode is enabled.
Batch Header & Comment Updates
rollup/internal/utils/utils.go, rollup/internal/controller/relayer/l2_relayer.go
Removed genesis-state-root workaround block from ValidiumDABatch header encoding. Updated comments reflecting v10 codec behavior and removed logging package import.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • jonastheis
  • georgehao

Poem

🐰 Validium paths now tighter still,
With galileov2 enforced by will,
No more workarounds to weigh us down,
CodecV10 claims the crown!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete; it only provides a brief summary but lacks required template sections like Purpose/rationale details (What/Why/How), deployment tag versioning checkbox, and breaking change label checkbox. Complete the PR description by filling out all required template sections: provide detailed Purpose/rationale answers, check deployment tag versioning status, and indicate breaking change status.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main purpose of the PR - adjustments for launching Cloak with GalileoV2, which aligns with the changes across version validation, codec configuration, and cleanups throughout the codebase.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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/cloak-galileo-updates

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

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.

Caution

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

⚠️ Outside diff range comments (1)
rollup/internal/utils/utils.go (1)

129-131: ⚠️ Potential issue | 🔴 Critical

Nil pointer dereference: b.Index accessed after b == nil check.

If b is nil, fmt.Errorf("batch is nil, version: %v, index: %v", codecVersion, b.Index) will panic.

🐛 Proposed fix
 if b == nil {
-    return nil, common.Hash{}, fmt.Errorf("batch is nil, version: %v, index: %v", codecVersion, b.Index)
+    return nil, common.Hash{}, fmt.Errorf("batch is nil, version: %v", codecVersion)
 }

@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.43%. Comparing base (788f6b9) to head (01a7ffd).

Files with missing lines Patch % Lines
coordinator/internal/utils/version.go 0.00% 5 Missing ⚠️
rollup/cmd/rollup_relayer/app/app.go 0.00% 3 Missing ⚠️
coordinator/internal/utils/codec_validium.go 0.00% 1 Missing ⚠️
rollup/internal/controller/relayer/l2_relayer.go 0.00% 1 Missing ⚠️
rollup/internal/utils/utils.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1793      +/-   ##
===========================================
+ Coverage    36.39%   36.43%   +0.04%     
===========================================
  Files          248      248              
  Lines        21329    21321       -8     
===========================================
+ Hits          7763     7769       +6     
+ Misses       12743    12730      -13     
+ Partials       823      822       -1     
Flag Coverage Δ
coordinator 32.37% <0.00%> (+0.12%) ⬆️
rollup 35.14% <0.00%> (+0.05%) ⬆️

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.

@Thegaram Thegaram merged commit 9b2b5e0 into develop Feb 11, 2026
9 checks passed
@Thegaram Thegaram deleted the feat/cloak-galileo-updates branch February 11, 2026 12:32
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.

2 participants