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

Cleanup/Remove fast sync with header only #7779

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

asdacap
Copy link
Contributor

@asdacap asdacap commented Nov 21, 2024

  • Remove blockdownloader capability to forward sync with header only or without downloading receipt when not processing.
    • This was somewhat useful before when sync pivot is not updated from CL, but now it make things hard to understand.
  • Also try to reduce duplicated code between MergeBlockDownloader and BlockDownloader.
    • Cut down a lot of code.
    • Make it easier to fix other stuff like state sync being run multiple time or do things like make forward sync download in parallel.
  • Fix/Disallow the unclear behaviour where if a node is synced with DownloadBodiesInFastSync or DownloadReceiptsInFastSync set to false, then after snap sync, restarted with the two option set to true, the portion of receipts that is after sync pivot is not downloaded.
  • Fix receipts on fast sync transition edge case not working on non-merge network since it is only available on MergeBlockDownloader, not BlockDownloader.

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • Refactoring

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

  • Being tested....

_logger = logManager.GetClassLogger();
}

public override async Task Dispatch(PeerInfo bestPeer, BlocksRequest? blocksRequest, CancellationToken cancellation)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

DownloadBlocks also have the beacon pivot check so this method is not needed.

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.

1 participant