-
Notifications
You must be signed in to change notification settings - Fork 281
fix(verifier,l1follower): update da-codec to latest version #1143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe pull request updates the Changes
Possibly related PRs
Suggested reviewers
Poem
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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 (3)
rollup/rollup_sync_service/rollup_sync_service.go (3)
46-46
: Add a comment for the exported error variableThis newly defined error variable is exported and should have a comment explaining its purpose according to Go's conventions.
-var ErrShouldResetSyncHeight = errors.New("ErrShouldResetSyncHeight") +// ErrShouldResetSyncHeight is returned when the sync height needs to be reset +// due to L1 message hash calculation issues after upgrading to EuclidV2 +var ErrShouldResetSyncHeight = errors.New("ErrShouldResetSyncHeight")
211-216
: Document the significance of block number 7892668The code resets to a hardcoded block number, but there's no explanation of why this specific block was chosen. Adding a comment would improve maintainability.
if errors.Is(err, ErrShouldResetSyncHeight) { - log.Warn("Resetting sync height to L1 block 7892668 to fix L1 message queue hash calculation") + // Block 7892668 is one block before the L1 block where the last batch in CodecV6 was committed + log.Warn("Resetting sync height to L1 block 7892668 to fix L1 message queue hash calculation") s.callDataBlobSource.SetL1Height(7892668) return nil }
212-213
: Consider making the reset block height configurableHardcoding the reset block height in the code makes it difficult to adjust if needed for different environments or networks.
Consider making this value configurable through a constant or configuration parameter:
+// BlockHeightBeforeLastCodecV6 is the L1 block height one block before the last batch in CodecV6 was committed +const BlockHeightBeforeLastCodecV6 = 7892668 + if errors.Is(err, ErrShouldResetSyncHeight) { - log.Warn("Resetting sync height to L1 block 7892668 to fix L1 message queue hash calculation") - s.callDataBlobSource.SetL1Height(7892668) + log.Warn("Resetting sync height to L1 block %d to fix L1 message queue hash calculation", BlockHeightBeforeLastCodecV6) + s.callDataBlobSource.SetL1Height(BlockHeightBeforeLastCodecV6)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
rollup/rollup_sync_service/rollup_sync_service.go
(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build-and-push
- GitHub Check: test
🔇 Additional comments (1)
rollup/rollup_sync_service/rollup_sync_service.go (1)
9-9
: LGTM! Added import for string operationsThe import of "strings" package is necessary for the string comparison operation added in the error handling logic.
1. Purpose or design rationale of this PR
A recent da-codec change was not adopted in
l2geth
which lead to nodes halting with an error message like this:As a workaround, we bump the codec version and add logic to allow nodes to automatically recover by re-syncing recent batches from L1.
2. 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:
3. Deployment tag versioning
Has the version in
params/version.go
been updated?4. Breaking change label
Does this PR have the
breaking-change
label?Summary by CodeRabbit