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

Fix some p2p issues #1306

Merged
merged 14 commits into from
Oct 31, 2023
Merged

Fix some p2p issues #1306

merged 14 commits into from
Oct 31, 2023

Conversation

ImplOfAnImpl
Copy link
Contributor

@ImplOfAnImpl ImplOfAnImpl commented Oct 27, 2023

The following was done for both v1 and v2:

  1. Fix potential header flooding by a malicious peer.
    The node no longer allows new block headers to connect to pending_headers only.
    Conversely, when sending new headers, v2 node no longer takes best_sent_block_header into account (and v1 didn't do this anyway).

  2. Nodes no longer send block announcements if outgoing.blocks_queue is non-empty (because the peer will send a header request anyway when it's done downloading the blocks).

  3. The check for a duplicate block request was only working for already downloaded blocks, but not for those which are inside outgoing.blocks_queue. I've added an additional check.

  4. I renamed the flag send_tip_updates to have_sent_all_headers, because it's exactly what it means.

P.S. The fix for the failing test is in the separate PR #1309

Edit: PRs #1309 and #1316 were also merged into this one

@ImplOfAnImpl ImplOfAnImpl marked this pull request as draft October 31, 2023 10:10
@ImplOfAnImpl ImplOfAnImpl force-pushed the p2p_v2_issues branch 2 times, most recently from 9c7b58d to ce50a48 Compare October 31, 2023 14:55
@ImplOfAnImpl ImplOfAnImpl marked this pull request as ready for review October 31, 2023 15:42
p2p/src/sync/peer_v2.rs Outdated Show resolved Hide resolved
p2p/src/sync/peer_v2.rs Outdated Show resolved Hide resolved
@ImplOfAnImpl ImplOfAnImpl marked this pull request as draft October 31, 2023 16:02
Fixes in p2p related to blocks order
…ling_test

Attempt to fix spuriously failing test "dont_make_announcements_while_blocks_are_being_sent".
Also, PR #1316 was merged into this branch.
@ImplOfAnImpl ImplOfAnImpl marked this pull request as ready for review October 31, 2023 16:27
@TheQuantumPhysicist TheQuantumPhysicist merged commit cf7b5c0 into master Oct 31, 2023
31 checks passed
@TheQuantumPhysicist TheQuantumPhysicist deleted the p2p_v2_issues branch October 31, 2023 19:43
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.

2 participants