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

Introduce BlockGap #5592

Merged
merged 4 commits into from
Sep 6, 2024
Merged

Conversation

liuchengxu
Copy link
Contributor

Previously, block gaps could only be created by warp sync, but block gaps will also be generated by fast sync once #5406 is fixed. This PR is part 1 of the detailed implementation plan in #5406 (comment): refactor BlockGap.

This refactor converts the existing (NumberFor<Block>, NumberFor<Block>) into a dedicated BlockGap<NumberFor<Block>> struct. This change is purely structural and does not alter existing logic, but lays the groundwork for the follow-up PR.

The compatibility concern caused by the new structure is addressed in the second commit.

cc @dmitry-markin

Previously, block gaps could only be created by warp sync, but with upcoming
changes (paritytech#5406), block gaps will also be generated by fast sync, thus
`BlockGapType` is needed.

This refactor converts the existing `(NumberFor<Block>, NumberFor<Block>)`
into a dedicated `BlockGap<NumberFor<Block>>` struct. This change is purely
structural and does not alter existing logic, but it lays the groundwork for
future changes.
This commit introduces changes to address compatibility issues
resulting from the transition from the old block gap representation
`(NumberFor<Block>, NumberFor<Block>)` to the new `BlockGap<NumberFor<Block>>`
structure.
Copy link
Contributor

@dmitry-markin dmitry-markin left a comment

Choose a reason for hiding this comment

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

Looks pretty good, thank you!

@bkchr bkchr added the T0-node This PR/Issue is related to the topic “node”. label Sep 6, 2024
@bkchr bkchr enabled auto-merge September 6, 2024 07:37
@bkchr bkchr added this pull request to the merge queue Sep 6, 2024
Merged via the queue into paritytech:master with commit fdb4554 Sep 6, 2024
204 of 207 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants