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

[5.0] P2P: Fix: Throttling of last block of request caused lost block #1791

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

heifner
Copy link
Member

@heifner heifner commented Oct 17, 2023

When throttling was enabled on a connection, the net_plugin would assume the last block of a peer_requested was sent and reset the peer_requested indicating no other sync blocks need to be sent to the peer. This caused the block to not be sent or rescheduled to be sent later resulting in the peer not receiving the block. The peer would have to wait for a full timeout before requesting the required block from a different peer.

Resolves #1776

@heifner heifner added the OCI Work exclusive to OCI team label Oct 17, 2023
@heifner heifner linked an issue Oct 17, 2023 that may be closed by this pull request
Copy link
Contributor

@greg7mdp greg7mdp left a comment

Choose a reason for hiding this comment

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

I think I'd get rid of num, and use cc.fetch_block_by_number( peer_requested->last + 1 ); and peer_requested->last below, but it is a matter of preference.

@heifner heifner merged commit f65b06c into release/5.0 Oct 18, 2023
21 checks passed
@heifner heifner deleted the GH-1776-throttle-fix-5.0 branch October 18, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test Failure: p2p_sync_throttle_test
3 participants