-
Notifications
You must be signed in to change notification settings - Fork 278
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
refactor(rollup sync service): use CalldataBlobSource
to retrieve data from L1
#1103
base: jt/l1-follower-mode-l1-reader
Are you sure you want to change the base?
refactor(rollup sync service): use CalldataBlobSource
to retrieve data from L1
#1103
Conversation
…retrieve data from L1
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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 (
|
6e06325
to
da81a2e
Compare
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.
nice work and LGTM.
return &rawdb.CommittedBatchMeta{ | ||
Version: uint8(commitedBatch.Version()), | ||
ChunkBlockRanges: chunkRanges, | ||
BlobVersionedHashes: commitedBatch.BlobVersionedHashes(), |
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.
this field is dangling (used in previous versions but not used after da-codec refactoring), should (and could) we remove it as well?
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.
Does removing it cause some problems for nodes that upgrade? And want to decode older data from DB?
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.
I think you're right. some upgrade code would be added. what about keeping it as it is? (or add a comment in CommittedBatchMeta
that this field is currently not used).
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.
Done in 2499c69
1. Purpose or design rationale of this PR
This PR refactors the rollup sync service to use
CalldataBlobSource
to retrieve data from L1. This removes a lot of duplicate code and makes future upgrades easier to support.Specifically, before this PR the rollup sync service relied solely on the batch information contained in the commit transaction's calldata. However, with a future upgrade we will move this calldata to the blob. Therefore, the rollup sync service needs to be able to retrieve and interpret the blob data additionally.
This functionality is already given within the
L1 follower mode
which is why this PR reuses the internal componentCalldataBlobSource
to do this job. To support another upgrade (new batch version) changes need to be made only withinCalldataBlobSource
.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?