Skip to content
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

Closed
wants to merge 39 commits into from

Conversation

colinlyguo
Copy link
Member

@colinlyguo colinlyguo commented Aug 21, 2024

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:

  • refactor: A code change that doesn't fix a bug, or add a feature, or improves performance

rollup/rollup_sync_service/rollup_sync_service.go Outdated Show resolved Hide resolved
rollup/rollup_sync_service/rollup_sync_service.go Outdated Show resolved Hide resolved
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) {
Copy link
Member

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.

Copy link
Member Author

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.

Base automatically changed from feat/rollup-verifier-codecv4 to develop August 23, 2024 06:50
@colinlyguo colinlyguo changed the title refactor: use new codecv4 interface refactor: use new codec interfaces Oct 7, 2024
@@ -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
Copy link
Member

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.

Copy link
Member Author

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.

Copy link

@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.

Shouldn't this be better based on top of syncUpstream/active branch?

@colinlyguo
Copy link
Member Author

Shouldn't this be better based on top of syncUpstream/active branch?

makes sense. this pr is opened before activating the syncUpstream/active branch, will open another PR based on syncUpstream/active branch instead.

@colinlyguo
Copy link
Member Author

new incremental updates will be merged to syncUpstream/active branch, thus closing this PR.

@colinlyguo colinlyguo closed this Oct 10, 2024
@colinlyguo colinlyguo deleted the refactor/use-new-codecv4-interface branch October 10, 2024 18:19
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.

5 participants