Skip to content

p2p: fix connection deduplication in hybrid mode#6082

Merged
algorandskiy merged 2 commits intoalgorand:masterfrom
algorandskiy:pavel/p2p-hybrid-dedup-fix
Jul 26, 2024
Merged

p2p: fix connection deduplication in hybrid mode#6082
algorandskiy merged 2 commits intoalgorand:masterfrom
algorandskiy:pavel/p2p-hybrid-dedup-fix

Conversation

@algorandskiy
Copy link
Copy Markdown
Contributor

@algorandskiy algorandskiy commented Jul 25, 2024

Summary

Some TestHybridNetwork_DuplicateConn failures indicate deduplication does not work when a node first connects via wsnet and then via p2p. In this case p2p correctly determines duplicate but does not exit the handler as it should.

Test Plan

Added a unit test checking the stream handler processes duplication correctly.

@algorandskiy algorandskiy added Bug-Fix p2p Work related to the p2p project labels Jul 25, 2024
@algorandskiy algorandskiy self-assigned this Jul 25, 2024
@algorandskiy algorandskiy force-pushed the pavel/p2p-hybrid-dedup-fix branch from 18f228b to 1d4dabd Compare July 26, 2024 15:09
@algorandskiy algorandskiy changed the title WIP: p2p: fix connection deduplication in hybrid mode p2p: fix connection deduplication in hybrid mode Jul 26, 2024
@algorandskiy algorandskiy marked this pull request as ready for review July 26, 2024 15:37
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.27%. Comparing base (2b34eda) to head (87e8ea3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6082   +/-   ##
=======================================
  Coverage   56.27%   56.27%           
=======================================
  Files         488      488           
  Lines       69587    69588    +1     
=======================================
+ Hits        39157    39161    +4     
+ Misses      27771    27769    -2     
+ Partials     2659     2658    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread network/p2pNetwork.go
@algorandskiy algorandskiy merged commit adaecde into algorand:master Jul 26, 2024
@algorandskiy algorandskiy deleted the pavel/p2p-hybrid-dedup-fix branch March 16, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug-Fix p2p Work related to the p2p project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants