-
Notifications
You must be signed in to change notification settings - Fork 549
Perf/More accurate request limit. #8474
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
Conversation
public IEnumerator<BlockBody?> GetEnumerator() | ||
{ | ||
foreach (var blockBody in _rawBodies) | ||
{ | ||
yield return blockBody; | ||
} | ||
} |
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.
Why not just
public IEnumerator<BlockBody?> GetEnumerator() | |
{ | |
foreach (var blockBody in _rawBodies) | |
{ | |
yield return blockBody; | |
} | |
} | |
public IEnumerator<BlockBody?> GetEnumerator() => _rawBodies.GetEnumerator(); |
/// on the allocation strategy and context. May not be accurate as different peer may get allocated. | ||
/// </summary> | ||
Task<int?> EstimateRequestLimit( | ||
RequestType bodies, |
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.
RequestType bodies, | |
RequestType requestType, |
Task<int?> EstimateRequestLimit( | ||
RequestType bodies, | ||
IPeerAllocationStrategy peerAllocationStrategy, | ||
AllocationContexts blocks, |
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.
allocationContext
* Parallel forward sync * Singleton for the block downloader * Some test * Add test for parallel download * Whitespace * Map pruner * Whitespace * Fix build * Move request sizer to node stats * Expose request size * For bodies * Simplify * Fast headers * Receipt sync feed * Also check for response count * DLS and fix test * Fix wrong signature * Use tx count to estimate buffer size * Nicer dsl * Hard timeout * Fix overlow error * Fix overlow error * More tuning * Address comment from #8474 * Fix build * Fix test * Remove unnecessary code * Trying to reduce change * Minor change * Make blocks request disposable * Fix some test * Fix test * Slight cleanup * Minor cleanup * Whitespace * Fix test * Address copilot * Fix test * Update src/Nethermind/Nethermind.Synchronization/Blocks/BlockDownloader.cs Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com> * Update src/Nethermind/Nethermind.Synchronization/Blocks/BlockDownloader.cs Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com> * Update src/Nethermind/Nethermind.Synchronization/Blocks/BlockDownloader.cs Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com> * Update src/Nethermind/Nethermind.Synchronization/Blocks/BlockDownloader.cs Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com> * Update src/Nethermind/Nethermind.Synchronization/Blocks/BlockDownloader.cs Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com> * Update src/Nethermind/Nethermind.Synchronization/Blocks/BlockDownloader.cs Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com> * Update src/Nethermind/Nethermind.Synchronization/Blocks/BlockDownloader.cs Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com> * Update src/Nethermind/Nethermind.Synchronization/Blocks/BlocksSyncPeerSelectionStrategy.cs Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com> * Address comment * Dont change tests * Introduce allocate delay to prevent spinning --------- Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing