Skip to content

Introduce BlockGap#5592

Merged
bkchr merged 4 commits intoparitytech:masterfrom
liuchengxu:fix-fast-sync-part-1
Sep 6, 2024
Merged

Introduce BlockGap#5592
bkchr merged 4 commits intoparitytech:masterfrom
liuchengxu:fix-fast-sync-part-1

Conversation

@liuchengxu
Copy link
Copy Markdown
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
Copy Markdown
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!

@dmitry-markin dmitry-markin requested a review from bkchr September 5, 2024 14:04
@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
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.

4 participants