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

simplify block range request description #1736

Merged
merged 1 commit into from
Apr 21, 2020
Merged

Conversation

arnetheduck
Copy link
Contributor

There's room for ambiguity as to what count means - this clarifies
that it always relates to the slot, and not the number of blocks in the
response which allows clients to request ranges epoch by epoch (for
example) without worrying about overlaps caused by empty slots.

@arnetheduck
Copy link
Contributor Author

ping @AgeManning

There's room for ambiguity as to what `count` means - this clarifies
that it always relates to the slot, and not the number of blocks in the
response which allows clients to request ranges epoch by epoch (for
example) without worrying about overlaps caused by empty slots.
Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

This looks good to me

@djrtwo djrtwo merged commit ebf888b into ethereum:dev Apr 21, 2020
@AgeManning
Copy link
Contributor

Yeah looks good to me, sorry I was late to the party.

@arnetheduck - Are you guys also syncing blocks epoch per epoch? A sneaky optimisation perhaps?

@arnetheduck
Copy link
Contributor Author

We don't have it implemented yet, but there are three straightforward optimizations I can think of:

  • queue up 1 extra request - ie while receiving 1 epoch, send the next request to the peer already - this saves the roundtrip latency
  • time response and adjust request size accordingly - basically, ask for more epochs if peer is fast
  • if a request is taking long, send the same request to a second peer, if that's the last thing you need - the way to do this is to assign priorities to block ranges and having a threshold when the same range is re-requested (this is often done in bittorrent for example to get the last few pieces of the file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants