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

Sample peers if input peer missing for repair shred #34818

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

bw-solana
Copy link
Contributor

@bw-solana bw-solana commented Jan 18, 2024

Problem

This builds off of #34771. The repair-shred-from-peer command currently requires a valid peer pubkey to be provided as input and a valid repair socket to exist in cluster info. In the event no pubkey or an invalid pubkey is provided, it would be nice to log this and then sample a random set of validators instead. The idea here is that one of the validators should possess

Summary of Changes

  1. Make pubkey input optional
  2. When pubkey is not present or no socket can be acquired, sample a random set of 10 validators that are likely to have the slot we're trying to repair (based on LowestSlot data in Gossip)

For testing, spun up a node on testnet and tried issuing this command with the following pubkey inputs:

  • valid pubkey 9YVpEeZf8uBoUtzCFC6SSFDDqPt16uKFubNhLvGxeUDy <-- we requested repair from only this node
  • invalid pubkey 9YVpEeZf8uBoUtzCFC6SSFDDqPt16uKFubNhLvGxeUD <-- we requested repair from random 10 nodes
  • no pubkey <-- we requested repair from random 10 nodes

@bw-solana bw-solana changed the title sample peers if peer missing Sample peers if input peer missing for repair shreds Jan 18, 2024
@bw-solana bw-solana changed the title Sample peers if input peer missing for repair shreds Sample peers if input peer missing for repair shred Jan 18, 2024
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 56 lines in your changes are missing coverage. Please review.

Comparison is base (8f9d915) 81.8% compared to head (b91e60b) 81.7%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #34818     +/-   ##
=========================================
- Coverage    81.8%    81.7%   -0.1%     
=========================================
  Files         825      825             
  Lines      223269   223317     +48     
=========================================
- Hits       182635   182603     -32     
- Misses      40634    40714     +80     

@bw-solana bw-solana marked this pull request as ready for review January 18, 2024 03:22
@bw-solana
Copy link
Contributor Author

Everything still appears to be working after the latest changes to use cluster slots and take a weighted sampling:

[2024-01-18T22:07:05.109321073Z WARN  solana_core::repair::repair_service] BW: successfully sent repair request to 7dKiopJkRwh6yrsBUnhEX5zTNCDWQwBRsvbD4fTdrUVc / 195.3.223.104:8008!
[2024-01-18T22:07:05.109392349Z WARN  solana_core::repair::repair_service] BW: successfully sent repair request to 8E9KWWqX1JMNu1YC3NptLA6M8cGqWRTccrF6T1FDnYRJ / 23.111.138.186:8008!
[2024-01-18T22:07:05.109427546Z WARN  solana_core::repair::repair_service] BW: successfully sent repair request to EWhSgyD3VM1HuUisMz31xQPuyAXH5skcY5btY5ezu48J / 69.197.17.101:8008!
[2024-01-18T22:07:05.109461310Z WARN  solana_core::repair::repair_service] BW: successfully sent repair request to 8AebZP7pkQnPHzT3avLQ4HUYFCjjPTLtAS6LTU7siYwG / 69.197.19.60:8008!
[2024-01-18T22:07:05.109497659Z WARN  solana_core::repair::repair_service] BW: successfully sent repair request to 2Nnw9RZvT2qeKq74rkw8hWDJZUDSKxiBarmQMFxHzzCt / 45.250.253.65:8008!
[2024-01-18T22:07:05.109533057Z WARN  solana_core::repair::repair_service] BW: successfully sent repair request to GXePTm3iHy57NWt85uU45VmVT2ucmZUUNm1gTiuCd2e3 / 69.197.18.12:8009!
[2024-01-18T22:07:05.109567202Z WARN  solana_core::repair::repair_service] BW: successfully sent repair request to 4wpWduGYkqgZLrUYFvjqBRhrWT5GTNYakBn1pfCYb2yu / 69.10.35.182:8009!
[2024-01-18T22:07:05.109612558Z WARN  solana_core::repair::repair_service] BW: successfully sent repair request to 7nuWizYQEpkytGTfgEjrvoFFNUCgyzfvwLr3wbTJotym / 95.67.24.12:8008!
[2024-01-18T22:07:05.109645951Z WARN  solana_core::repair::repair_service] BW: successfully sent repair request to 9ziWEWjsoq22VuvYAatMyHHoxYERyiQq5riHFUVaj4r7 / 185.248.24.72:8009!
[2024-01-18T22:07:05.109680908Z WARN  solana_core::repair::repair_service] BW: successfully sent repair request to HvqQDoVtjmDQD13F3FrDypBfpjrBiiGTJYF4MvYE5qQC / 66.206.2.234:8008!

Copy link
Contributor

@AshwinSekar AshwinSekar left a comment

Choose a reason for hiding this comment

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

lgtm!

@bw-solana bw-solana merged commit 3d7ee19 into solana-labs:master Jan 19, 2024
35 checks passed
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