Skip to content

p2p: reduce severity of failed capabilities advertisement #6318

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

Merged
merged 2 commits into from
May 15, 2025

Conversation

algorandskiy
Copy link
Contributor

Summary

We observe quite a lot of messages failed to advertise for capability gossip: context deadline exceeded in telemetry.
From DHT source code it is not quite clear where the context.DeadlineExceeded returned from - from finding peers or from sending to some particular peer.

It looks more probable tho it could fetch some peers and attempts to send out capabilities. Following this assumption, this PR increases probability of advertising more by shuffling capabilities array before re-attempt. It also looks like the 10s repeat timeout is too short, so increased to 100s.

Test Plan

Existing tests

@algorandskiy algorandskiy requested review from cce, jannotti and gmalouf May 9, 2025 19:25
@algorandskiy algorandskiy self-assigned this May 9, 2025
@algorandskiy algorandskiy force-pushed the pavel/p2p-cap-adv1 branch from 2b89def to 67f5be4 Compare May 9, 2025 21:23
@algorandskiy algorandskiy requested a review from jannotti May 9, 2025 21:27
Copy link

codecov bot commented May 9, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 51.81%. Comparing base (f13575c) to head (67f5be4).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
network/p2p/capabilities.go 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6318      +/-   ##
==========================================
- Coverage   51.84%   51.81%   -0.03%     
==========================================
  Files         652      652              
  Lines       87442    87446       +4     
==========================================
- Hits        45331    45314      -17     
- Misses      39244    39263      +19     
- Partials     2867     2869       +2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@algorandskiy algorandskiy requested a review from gmalouf May 13, 2025 14:44
@algorandskiy algorandskiy merged commit a3563ef into algorand:master May 15, 2025
19 checks passed
@algorandskiy algorandskiy added the p2p Work related to the p2p project label May 19, 2025
cce pushed a commit to cce/go-algorand that referenced this pull request May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement p2p Work related to the p2p project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants