-
Notifications
You must be signed in to change notification settings - Fork 3
feat: cache incoming blocks to prevent duplication #259
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
@jonastheis the PR is ready for review. Will proceed on peer punishment based on your advice |
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.
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
@varun-doshi what's the status with this PR? |
Apologies for the delay |
4293167
to
b1766f8
Compare
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.
lgtm!
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.
lgtm
Fixes #251
Changes:
blocks_seen: LruCache<(B256, Signature)>
inScrollNetworkManager
which is responsible to caching (block_hash, signature) pairon_scroll_wire_event
handle_eth_wire_block
blocks_seen
and per peer cache. Then will continue to process that blockblock_seen
is set to 100 which is same as that of the peer cache(will update this as advised)To-do: