feat: cache incoming blocks to prevent duplication#259
Merged
Conversation
Contributor
Author
|
@jonastheis the PR is ready for review. Will proceed on peer punishment based on your advice |
jonastheis
reviewed
Aug 25, 2025
Contributor
jonastheis
left a comment
There was a problem hiding this comment.
I think we can skip peer penalization for now as it is also not done in reth. We might also keep the same LRU size. We can always adjust later.
Then there's mainly linter errors and merge conflicts to address + some comments
Contributor
|
@varun-doshi what's the status with this PR? |
Contributor
Author
Apologies for the delay |
4293167 to
b1766f8
Compare
frisitano
approved these changes
Sep 8, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #251
Changes:
blocks_seen: LruCache<(B256, Signature)>inScrollNetworkManagerwhich is responsible to caching (block_hash, signature) pairon_scroll_wire_eventhandle_eth_wire_blockblocks_seenand per peer cache. Then will continue to process that blockblock_seenis set to 100 which is same as that of the peer cache(will update this as advised)To-do: