-
Notifications
You must be signed in to change notification settings - Fork 276
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: use new codec interfaces #997
Conversation
Co-authored-by: georgehao <[email protected]>
return encoding.CodecV4 // codecv4: batches after DarwinV2 | ||
} | ||
} | ||
|
||
// decodeBlockRangesFromEncodedChunks decodes the provided chunks into a list of block ranges. | ||
func decodeBlockRangesFromEncodedChunks(codecVersion encoding.CodecVersion, chunks [][]byte) ([]*rawdb.ChunkBlockRange, error) { |
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 function should belong to da-codec repo.
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.
put this function here looks more suitable IMO. because the function encapsulates initializing codec logic. and the return value is []*rawdb.ChunkBlockRange
, which is an l2geth's type.
@@ -50,7 +50,7 @@ require ( | |||
github.com/prometheus/tsdb v0.7.1 | |||
github.com/rjeczalik/notify v0.9.1 | |||
github.com/rs/cors v1.7.0 | |||
github.com/scroll-tech/da-codec v0.1.1-0.20240822151711-9e32313056ac | |||
github.com/scroll-tech/da-codec v0.1.1-0.20241004100020-91ac897e28fc |
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.
Why not upgrade da-codec version.
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.
OK. will upgrade it in another PR based on syncUpstream/active
branch.
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.
Shouldn't this be better based on top of syncUpstream/active
branch?
makes sense. this pr is opened before activating the |
new incremental updates will be merged to |
1. Purpose or design rationale of this PR
Based on codec repo's simple factory pattern version (also after refactoring).
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: