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

[R4R] improve the protocol details of Diff sync #527

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

unclezoro
Copy link
Collaborator

@unclezoro unclezoro commented Nov 8, 2021

Description

This pr focus on the detailed improvement of diff sync.

Rationale

The diff sync protocol does not behave well as we expected:

  1. A peer gets less than 50% chance to diff sync.
  2. A peer may receive duplicated diff layer.
  3. The diff layer cache may pop recent difflayer.
  4. Open too many files issue when enable persist diff
  5. The received difflayers maybe dropped once disconnected with the peer.

Example

No

Changes

No

Copy link

@FAVE01 FAVE01 left a comment

Choose a reason for hiding this comment

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

gh pr checkout 527

@unclezoro unclezoro force-pushed the sync_logs branch 12 times, most recently from 88ecaf8 to 6ebaa50 Compare November 9, 2021 08:25
@unclezoro unclezoro changed the title [WIP]Sync logs [R4R] improvement the protocol of Diff sync Nov 9, 2021
@unclezoro unclezoro changed the title [R4R] improvement the protocol of Diff sync [R4R] improve the protocol details of Diff sync Nov 9, 2021
cmd/utils/flags.go Outdated Show resolved Hide resolved
eth/downloader/downloader.go Outdated Show resolved Hide resolved
add logs

fix useful difflayer item in cache been prune issue

fix too many open files
@unclezoro unclezoro merged commit 9603407 into bnb-chain:develop Nov 9, 2021
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