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

network: peer selector expansion and PeersPhonebookArchivalNodes #5385

Merged

Conversation

algonautshant
Copy link
Contributor

@algonautshant algonautshant commented May 12, 2023

In this PR:

  1. The peer selector is expanded to allow up to 5 classes of peers
  2. PeersPhonebookArchivalNodes is introduced, to distinguish between archival and non-archival peers/relays
  3. PeersPhonebookArchivalNodes category of nodes is added, which is the same as PeersPhonebookRelays for now.
  4. ReadFromSRVPriority is added, which is similar to ReadFromSRV, but also retrieves the priority value of each record. Currently not used.

@algonautshant algonautshant self-assigned this May 12, 2023
@algonautshant algonautshant changed the title Peer selector expansion and PeersPhonebookArchivalNodes p2p: Peer selector expansion and PeersPhonebookArchivalNodes May 12, 2023
@codecov
Copy link

codecov bot commented May 13, 2023

Codecov Report

Merging #5385 (1ba4a13) into master (3cbb422) will increase coverage by 0.09%.
The diff coverage is 96.61%.

@@            Coverage Diff             @@
##           master    #5385      +/-   ##
==========================================
+ Coverage   55.38%   55.48%   +0.09%     
==========================================
  Files         447      447              
  Lines       63312    63351      +39     
==========================================
+ Hits        35066    35148      +82     
+ Misses      25854    25808      -46     
- Partials     2392     2395       +3     
Impacted Files Coverage Δ
tools/network/bootstrap.go 71.15% <90.00%> (+71.15%) ⬆️
catchup/peerSelector.go 100.00% <100.00%> (+0.89%) ⬆️
catchup/service.go 72.90% <100.00%> (+0.47%) ⬆️
network/wsNetwork.go 71.28% <100.00%> (+0.66%) ⬆️

... and 9 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@algorandskiy algorandskiy left a comment

Choose a reason for hiding this comment

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

although ReadFromSRVPriority is not used but it is implemented so that needs to be tested.

catchup/peerSelector.go Outdated Show resolved Hide resolved
tools/network/bootstrap.go Outdated Show resolved Hide resolved
tools/network/bootstrap.go Outdated Show resolved Hide resolved
@algonautshant algonautshant marked this pull request as ready for review May 24, 2023 14:33
algorandskiy
algorandskiy previously approved these changes Jun 2, 2023
bbroder-algo
bbroder-algo previously approved these changes Jun 7, 2023
Co-authored-by: Bob Broderick <118225939+bbroder-algo@users.noreply.github.com>
@algorandskiy algorandskiy changed the title p2p: Peer selector expansion and PeersPhonebookArchivalNodes network: peer selector expansion and PeersPhonebookArchivalNodes Jun 8, 2023
@algorandskiy algorandskiy merged commit d5593a4 into algorand:master Jun 8, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants