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

Remove farmer piece getter deduplication #3133

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

nazar-pc
Copy link
Member

The feature was introduced as part of #2565 and later refactored in #2793 to de-duplicate in-flight piece requests.

While it helped at the time, with growing network size (meaning larger selection of pieces) and Snap sync (meaning little to no overlap between node sync, piece cache sync and plotting) its assumptions no longer hold and it just adds a bunch of complexity for very little benefit. As such I think we should remove it.

Moreover, with #3132 and other upcoming PRs many simple cases like plotting right after genesis where out of 1000 unique pieces there are just 256 unique pieces will be internally de-duplicated (see 29b86e3#diff-765c2c9791b623384f826fa8f02a4e4c4c78735e85b42a3533537cb58d3df116R278-R289).

First commit is the actual change, second simply inlines the function which only has a trivial call from a single place.

Code contributor checklist:

@nazar-pc nazar-pc added this pull request to the merge queue Oct 16, 2024
Merged via the queue into main with commit 51f7beb Oct 16, 2024
8 checks passed
@nazar-pc nazar-pc deleted the remove-farmer-piece-getter-deduplication branch October 16, 2024 08:16
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