Skip to content

Conversation

Thegaram
Copy link
Contributor

@Thegaram Thegaram commented Oct 9, 2025

Purpose or design rationale of this PR

PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • feat: A new feature

Deployment tag versioning

Has tag in common/version.go been updated or have you added bump-version label to this PR?

  • No, this PR doesn't involve a new deployment, git tag, docker image tag
  • Yes

Breaking change label

Does this PR have the breaking-change label?

  • No, this PR is not a breaking change
  • Yes

Summary by CodeRabbit

  • New Features

    • Added fusaka_timestamp setting to relayer sender config to control timestamp-based sidecar behavior.
    • Blob transactions now select sidecar version based on block timestamp and will pause before the Fusaka upgrade when appropriate.
    • Relayer validates fusaka_timestamp on startup and fails fast if unset.
  • Chores

    • Upgraded go-ethereum, KZG/crypto stacks (c-kzg v2, go-eth-kzg), blst, golang.org/x/crypto, and test dependencies.
    • Bumped public version tag to v4.5.49 and updated build fetch tag.

Copy link

coderabbitai bot commented Oct 9, 2025

Walkthrough

Pin go-ethereum and bump several KZG/crypto and indirect dependencies; add fusaka_timestamp to relayer config and SenderConfig; validate it on startup; read block timestamp in sender, pause pre-upgrade blob txs, and select/version sidecar proof generation accordingly; update tests and version tag. (37 words)

Changes

Cohort / File(s) Summary
Makefile tag
Makefile
Update L2GETH_TAG from scroll-v5.8.23 to scroll-v5.9.7.
Dependency bumps & replacements (go.mod files)
bridge-history-api/go.mod, common/go.mod, coordinator/go.mod, database/go.mod, rollup/go.mod, tests/integration-test/go.mod
Bump github.com/scroll-tech/go-ethereum replace pins to a newer hotfix commit; replace crate-crypto/go-kzg-4844 with crate-crypto/go-eth-kzg v1.4.0; switch ethereum/c-kzg-4844 to v2 path v2.1.5; upgrade indirects like supranational/blst, golang.org/x/crypto, and adjust other transitive deps.
Relayer config (json + struct)
rollup/conf/config.json, rollup/internal/config/relayer.go
Add fusaka_timestamp key to JSON config and add FusakaTimestamp uint64 \json:"fusaka_timestamp"`toSenderConfig`.
Startup validation
rollup/cmd/rollup_relayer/app/app.go
Add validation that cfg.L2Config.RelayerConfig.SenderConfig.FusakaTimestamp must be non-zero and exit on failure.
Sender control flow & sidecar versioning
rollup/internal/controller/sender/sender.go, rollup/internal/controller/sender/sender_test.go
Extend block header fetch to return timestamp; pause blob TXs before FusakaTimestamp; choose BlobSidecarVersion (V0/V1) by timestamp; change makeSidecar signature to accept a version and generate version-specific proofs; update call sites and tests accordingly.
Indirect deps cleanup / tooling
database/go.mod
Remove/add some indirect golang.org/x/* deps and add golang.org/x/tools indirect dependency.
Version bump
common/version/version.go
Bump package tag from v4.5.48 to v4.5.49.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Sender as Sender
  participant L1 as L1 RPC
  participant Config as SenderConfig
  participant Sidecar as makeSidecar

  Sender->>L1: request header (number, time, baseFee, blobBaseFee)
  L1-->>Sender: header.number, header.time, baseFee, blobBaseFee
  Sender->>Config: read FusakaTimestamp
  alt header.time < FusakaTimestamp
    note right of Sender #f9f0c1: Pre‑upgrade — pause/skip blob txs
    Sender-->>Sender: skip sending blobs / return early
  else header.time >= FusakaTimestamp
    note right of Sender #e6f7e6: Post‑upgrade — use new sidecar proofs
    Sender->>Sidecar: makeSidecar(version, blobs)
    Sidecar-->>Sender: BlobTxSidecar (versioned proofs)
    Sender->>Sender: build & send (or replace) tx
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • georgehao
  • colinlyguo
  • 0xmountaintop
  • jonastheis

Poem

"I nibble bytes beneath the moon,
Pause my hops till Fusaka's tune.
Versions chosen, proofs to weave,
Sidecars hum — then off I leave.
🥕🐇"

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "feat: support Fusaka blob type" is fully related to the main change in the changeset. The primary modification across the codebase is implementing version-aware sidecar creation that uses BlobSidecarVersion0 before the Fusaka upgrade and BlobSidecarVersion1 after, which directly aligns with the title's emphasis on supporting a new blob type for Fusaka. The title is concise, specific, and follows conventional commits format (feat:), making it clear to teammates scanning the history what the core feature being added is.
Description Check ✅ Passed The pull request description follows the required template structure and completes all necessary sections. The purpose section explains both what the PR does (supports BlobSidecarVersion1 after Fusaka upgrade) and why (by updating dependencies and implementing version-aware logic), the PR title type is correctly selected as "feat", deployment tag versioning is addressed with "Yes" (confirmed by the version.go bump from v4.5.48 to v4.5.49), and the breaking change label is appropriately marked as "No". All critical template requirements are satisfied.
✨ 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-support-fusaka-blob-type

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.

@codecov-commenter
Copy link

codecov-commenter commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 44.18605% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.94%. Comparing base (426c57a) to head (9d159bf).

Files with missing lines Patch % Lines
rollup/internal/controller/sender/sender.go 47.50% 17 Missing and 4 partials ⚠️
rollup/cmd/rollup_relayer/app/app.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1746      +/-   ##
===========================================
- Coverage    36.96%   36.94%   -0.03%     
===========================================
  Files          245      245              
  Lines        20897    20920      +23     
===========================================
+ Hits          7725     7728       +3     
- Misses       12353    12370      +17     
- Partials       819      822       +3     
Flag Coverage Δ
bridge-history-api 8.08% <ø> (ø)
common 29.75% <ø> (ø)
coordinator 33.54% <ø> (-0.09%) ⬇️
database 42.05% <ø> (ø)
rollup 35.81% <44.18%> (-0.04%) ⬇️

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: 1

🧹 Nitpick comments (1)
rollup/internal/controller/sender/sender.go (1)

314-316: Clarify the 180-second pause window.

The hardcoded 180-second (3-minute) pause window before the Fusaka upgrade prevents blob transactions near the transition. While this provides a safety buffer, consider:

  1. Document the rationale for choosing 180 seconds (e.g., expected block time × safety margin)
  2. Consider making this duration configurable if different networks have different requirements

Example refactor to make it configurable:

+// The number of seconds before Fusaka upgrade to pause blob transactions
+FusakaUpgradePauseWindow uint64 `json:"fusaka_upgrade_pause_window"`

Then in sender.go:

-if blockTimestamp < s.config.FusakaTimestamp && (s.config.FusakaTimestamp-blockTimestamp) < 180 {
-    return common.Hash{}, 0, fmt.Errorf("pausing blob txs before Fusaka upgrade, eta %d seconds", s.config.FusakaTimestamp-blockTimestamp)
+if blockTimestamp < s.config.FusakaTimestamp && (s.config.FusakaTimestamp-blockTimestamp) < s.config.FusakaUpgradePauseWindow {
+    return common.Hash{}, 0, fmt.Errorf("pausing blob txs before Fusaka upgrade, eta %d seconds", s.config.FusakaTimestamp-blockTimestamp)
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b7fdf48 and b99b87e.

⛔ Files ignored due to path filters (7)
  • 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 (10)
  • Makefile (1 hunks)
  • bridge-history-api/go.mod (4 hunks)
  • common/go.mod (4 hunks)
  • coordinator/go.mod (3 hunks)
  • database/go.mod (2 hunks)
  • rollup/conf/config.json (1 hunks)
  • rollup/go.mod (3 hunks)
  • rollup/internal/config/relayer.go (1 hunks)
  • rollup/internal/controller/sender/sender.go (6 hunks)
  • tests/integration-test/go.mod (3 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: check
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: test
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: tests
🔇 Additional comments (4)
rollup/internal/controller/sender/sender.go (4)

290-294: LGTM!

The function call properly retrieves the block timestamp needed for Fusaka upgrade detection, and error handling is appropriate.


318-321: LGTM!

The version selection logic correctly chooses BlobSidecarVersion0 before the Fusaka upgrade and BlobSidecarVersion1 at or after the upgrade timestamp. The boundary condition (blockTimestamp == FusakaTimestamp) appropriately uses the post-upgrade version.


827-844: LGTM!

The function correctly extracts header.Time as the block timestamp and maintains the existing logic for determining the latest block number (pending - 1). The expanded return signature properly supports the Fusaka upgrade detection.


846-889: Verify version 1 cell proof handling in external packages

  • Confirm kzg4844.ComputeCellProofs returns all expected cell proofs per blob
  • Ensure gethTypes.NewBlobTxSidecar accepts the larger proof slice for version 1 without error
  • Add or update tests for version 1 sidecar creation to assert the correct proof count

jonastheis
jonastheis previously approved these changes Oct 10, 2025
Copy link
Contributor

@jonastheis jonastheis left a comment

Choose a reason for hiding this comment

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

should we get scroll-tech/go-ethereum#1245 merged first?

georgehao
georgehao previously approved these changes Oct 13, 2025
@jonastheis jonastheis added the bump-version Bump the version tag for deployment label Oct 14, 2025
@github-actions github-actions bot dismissed stale reviews from georgehao and jonastheis via a5ed0c9 October 14, 2025 04:59
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 (1)
rollup/cmd/rollup_relayer/app/app.go (1)

99-101: Consider adding timestamp range validation.

While the zero check is sufficient to catch missing configuration, you could optionally add validation to ensure FusakaTimestamp represents a reasonable Unix timestamp (e.g., after a known lower bound, not too far in the future). This would catch configuration errors where an invalid timestamp value is provided.

Example validation:

 if cfg.L2Config.RelayerConfig.SenderConfig.FusakaTimestamp == 0 {
   log.Crit("cfg.L2Config.RelayerConfig.SenderConfig.FusakaTimestamp must be set")
 }
+// Sanity check: Fusaka timestamp should be after 2024 (1704067200 = 2024-01-01)
+if cfg.L2Config.RelayerConfig.SenderConfig.FusakaTimestamp < 1704067200 {
+  log.Crit("cfg.L2Config.RelayerConfig.SenderConfig.FusakaTimestamp appears invalid", "timestamp", cfg.L2Config.RelayerConfig.SenderConfig.FusakaTimestamp)
+}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5ed0c9 and e40db44.

📒 Files selected for processing (1)
  • rollup/cmd/rollup_relayer/app/app.go (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
rollup/cmd/rollup_relayer/app/app.go (2)
rollup/internal/config/l2.go (1)
  • L2Config (10-29)
rollup/internal/config/relayer.go (2)
  • RelayerConfig (63-88)
  • SenderConfig (9-40)
⏰ 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). (19)
  • GitHub Check: coordinator-cron
  • GitHub Check: bridgehistoryapi-db-cli
  • GitHub Check: coordinator-api
  • GitHub Check: bridgehistoryapi-fetcher
  • GitHub Check: bridgehistoryapi-api
  • GitHub Check: rollup-db-cli
  • GitHub Check: blob_uploader
  • GitHub Check: gas_oracle
  • GitHub Check: rollup_relayer
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: test
  • GitHub Check: tests
  • GitHub Check: check
🔇 Additional comments (1)
rollup/cmd/rollup_relayer/app/app.go (1)

99-101: LGTM! Essential config validation.

The sanity check ensures FusakaTimestamp is explicitly set before initializing the L2 relayer, which is critical since the sender logic depends on this value for version selection and timing-based behavior. The validation pattern is consistent with other config checks and appropriately uses log.Crit to fail fast on misconfiguration.

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 068948a and 9d159bf.

📒 Files selected for processing (1)
  • rollup/internal/controller/sender/sender.go (7 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). (6)
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: tests
🔇 Additional comments (6)
rollup/internal/controller/sender/sender.go (6)

290-294: LGTM! Timestamp retrieval integrated correctly.

The function call has been properly updated to retrieve and use the block timestamp for version-aware blob transaction handling.


314-316: Verify the 180-second pause threshold is appropriate.

The code pauses blob transactions 3 minutes before the Fusaka upgrade. Ensure this duration provides sufficient safety margin given L1 block times and potential clock skew, while not being overly conservative.

Consider documenting why 180 seconds was chosen (e.g., in a comment or constant).


318-327: LGTM! Version selection logic is correct.

The code properly selects BlobSidecarVersion0 before the upgrade and BlobSidecarVersion1 after, then creates the sidecar with the appropriate version.


653-653: Acceptable: timestamp not needed in this context.

The timestamp is retrieved but unused in checkPendingTransaction, which is appropriate since this function only needs block number and fees for gas price adjustment logic.


831-848: LGTM! Function correctly returns block timestamp.

The renamed function properly extracts and returns the block timestamp (header.Time) along with other required values.


850-896: Code correctly implements V1 cell proofs flattening per EIP-7594 — no changes needed.

The append(proofs, ps...) pattern at line 888 correctly flattens all cell proofs from ComputeCellProofs into a single array. Per EIP-7594, cell_proofs must be a flattened array containing CELLS_PER_EXT_BLOB proofs for each blob, indexed as cell_proofs[i * CELLS_PER_EXT_BLOB + j] for cell j of blobs[i]. The sequential processing of each blob's cell proofs and accumulation into a single slice achieves this structure correctly, matching the expected input for NewBlobTxSidecar.

@Thegaram Thegaram merged commit bfc0fdd into develop Oct 18, 2025
18 checks passed
@Thegaram Thegaram deleted the feat-support-fusaka-blob-type branch October 18, 2025 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump-version Bump the version tag for deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants