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

Improving backwards sync #3638

Merged
merged 2 commits into from
Apr 14, 2022
Merged

Conversation

gezero
Copy link
Contributor

@gezero gezero commented Mar 28, 2022

Previous implementation of backward sync only saved the headers and block bodies to disk. This PR combines the structure of backward sync chain into one dequeue, together with storing the chain on the disk.

@gezero gezero force-pushed the improving-backwards-sync branch 3 times, most recently from 9d543a6 to a593aec Compare April 7, 2022 12:21
@gezero gezero requested a review from macfarla April 7, 2022 13:05
@gezero gezero force-pushed the improving-backwards-sync branch 3 times, most recently from 66ca12a to f827634 Compare April 7, 2022 16:23
Copy link
Contributor

@jflo jflo left a comment

Choose a reason for hiding this comment

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

Approved with suggested minor changes below.

Copy link
Contributor

@garyschulte garyschulte left a comment

Choose a reason for hiding this comment

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

short circuited my review while I look at resolving the conflict with #3696

Copy link
Contributor

@garyschulte garyschulte left a comment

Choose a reason for hiding this comment

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

Looks good to merge 👍

@gezero gezero force-pushed the improving-backwards-sync branch 2 times, most recently from 4d59b5b to c1794d5 Compare April 13, 2022 16:04
Copy link
Contributor

@jflo jflo left a comment

Choose a reason for hiding this comment

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

Love the listener, thanks!

@gezero gezero force-pushed the improving-backwards-sync branch 3 times, most recently from 4b466e1 to 9ebaad1 Compare April 13, 2022 22:53
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

Abstracting the creation of BackwardChain into a factory

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

Improving coverage

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

Pivot should not be in constructor

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

Reverse the internal backward chain

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

Restarting after restart of backward sync improved

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

Backward chain completely stored on disk

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

Fixing tests

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

Looking for block is now a step instead of a service

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

Addressing review problems

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

Removing BackwardChainFactory as this abstraction is not needed anymore

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Apr 14, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

83.1% 83.1% Coverage
0.0% 0.0% Duplication

@gezero gezero merged commit d07771b into hyperledger:main Apr 14, 2022
gezero added a commit that referenced this pull request Apr 14, 2022
Refactor Backwards sync to use a rocks db.

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
matkt pushed a commit that referenced this pull request Apr 14, 2022
Refactor Backwards sync to use a rocks db.

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
garyschulte pushed a commit to garyschulte/besu that referenced this pull request May 2, 2022
Refactor Backwards sync to use a rocks db.

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
Refactor Backwards sync to use a rocks db.

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
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.

None yet

4 participants