-
Notifications
You must be signed in to change notification settings - Fork 752
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
Various fixes to custody range sync #6004
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
edc584a
Only start requesting batches when there are good peers across all cu…
jimmygchen 9f82497
Add custody peer check before mutating `BatchInfo` to avoid inconsist…
jimmygchen 05608b0
Add check to cover a case where batch is not processed while waiting …
jimmygchen 9f20029
Fix lint and logic error
jimmygchen 4079d2e
Fix `good_peers_on_subnet` always returning false for `DataColumnSubn…
jimmygchen de05355
Merge branch 'das' into custody-sync-peers
jimmygchen 876ea3b
Add test for `get_custody_peers_for_column`
jimmygchen 4373a28
Revert epoch parameter refactor.
jimmygchen 03a9dce
Fall back to default custody requiremnt if peer ENR is not present.
jimmygchen cfb3ebc
Add metrics and update code comment.
jimmygchen 0a27146
Add more debug logs.
jimmygchen 9cfbfa6
Merge branch 'das' into custody-sync-peers
jimmygchen bf70fb4
Use subscribed peers on subnet before MetaDataV3 is implemented. Remo…
jimmygchen c10fe36
Remove unused code and update docs.
jimmygchen 9cfc670
Merge branch 'das' into custody-sync-peers
jimmygchen 6ff408f
Add comment
jimmygchen e04f98d
Merge branch 'das' into custody-sync-peers
jimmygchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's potentially an issue with the peer selection approach here - as peer selection was previously done one layer up:
request_batches
: here we use a list of "idle peers" and randomly select oneretry_batch_download
: here we sort peers prioritizing unrelated peers with less active requestsAre these selection rules important? I've ran into some issues with concurrent requests to the same peer with the approach on this branch, and need to investigate further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked with Age, and it should be fine to send requests to peers that aren't "idle".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The peer selection logic here isn't ideal - we should probably avoid retrying peers that failed to return a response. Perhaps we could pass the sorted peer list into this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment for this, probably requires some thoughts and refactoring as we don't currently track
data_column_by_range
peers inBatchState
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: we might also need to apply some of these changes to backfill sync.