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

p2p: reuse existing libp2p.Host for http clients #6129

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

algorandskiy
Copy link
Contributor

Summary

In some scenarios GetPeers for archival role gets called too often, and each time new libp2p.Host gets created that causes high memory usage.

Although this fix is good as is, the underlying issue with high GetPeers invocation rate is under investigation.

Test Plan

Tested manually against devnet.

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 7.69231% with 24 lines in your changes missing coverage. Please review.

Project coverage is 56.17%. Comparing base (3b3b5ce) to head (35c3ec5).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
network/p2p/http.go 0.00% 21 Missing ⚠️
network/p2p/p2p.go 0.00% 2 Missing ⚠️
network/p2pNetwork.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6129      +/-   ##
==========================================
+ Coverage   54.28%   56.17%   +1.88%     
==========================================
  Files         494      494              
  Lines       69936    69951      +15     
==========================================
+ Hits        37968    39297    +1329     
+ Misses      29246    27981    -1265     
+ Partials     2722     2673      -49     

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

@algorandskiy algorandskiy force-pushed the pavel/p2p-get-peer-host branch from 1061d11 to 13f21a9 Compare September 12, 2024 19:08
network/p2p/http.go Outdated Show resolved Hide resolved
cce
cce previously approved these changes Sep 13, 2024
gmalouf
gmalouf previously approved these changes Sep 13, 2024
@algorandskiy algorandskiy dismissed stale reviews from gmalouf and cce via 35c3ec5 September 13, 2024 18:24
@algorandskiy algorandskiy requested review from cce and gmalouf September 13, 2024 18:26
@algorandskiy algorandskiy merged commit 619d257 into algorand:master Sep 16, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants