-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Archify EthStateCache #5744
Archify EthStateCache #5744
Conversation
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.
couple of comments:
- We should not change provider interfaces for this purpose
- The values should be wrapped in
Arc
inside lru cache itself and theArc
should only be created upon insertion - Having values wrapped in an
Arc
would require creating a custom limiter sinceByLength
is not implemented forArc<Vec<T>>
- All of the other
to_vec
andclone
calls should become unnecessary after completion of all steps above
@rkrasiuk Thanks for the comments. However, I have one question:
For block_and_receipts to align with the same type, receipts can be Arc(as returned from the cache) or the value itself(returned from the provider). For this to happen, I need to change the provider interface. Am I missing something here? |
ah I see, |
Yeah, would wrap the receipt in Arc and not change the provider interface. |
7b43e6f
to
92fc57b
Compare
543c486
to
9e4ad13
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
Ref #5720