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

Pass vec to range sync batch #5710

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

dapplion
Copy link
Collaborator

@dapplion dapplion commented May 3, 2024

Issue Addressed

Non-urgent clean-up possible after

This can wait for after v5.2.0

Currently we are:

  • Fetching an entire Vec of blocks in the network context
  • Constructing a stream with None terminator in sync manager
  • Batch handles each block individually

Proposed Changes

Instead, we can just pass the vec from the network context to the batch

All logic in unchanged, most of the diff is a change in indentation

@dapplion dapplion force-pushed the range-sync-pass-block-vec branch from e12d908 to 87cbe23 Compare May 3, 2024 13:51
@dapplion dapplion added the ready-for-review The code is ready for review label May 15, 2024
Copy link
Member

@pawanjay176 pawanjay176 left a comment

Choose a reason for hiding this comment

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

Nice find

Copy link
Member

@AgeManning AgeManning left a comment

Choose a reason for hiding this comment

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

Yeah, looks like a clear improvement. We drop a single log field in blocks.len() in the downloading state, but this is much cleaner

@realbigsean
Copy link
Member

@mergify queue

Copy link

mergify bot commented Jun 27, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 784ef5f

mergify bot added a commit that referenced this pull request Jun 27, 2024
@mergify mergify bot merged commit 784ef5f into sigp:unstable Jun 27, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Networking ready-for-review The code is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants