-
Notifications
You must be signed in to change notification settings - Fork 953
feat: refactor ssload/sstore to JournaledAccount #3145
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
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #3145 will degrade performances by 7.02%Comparing Summary
Benchmarks breakdown
|
| impl<'a, 'b, ENTRY: JournalEntryTr, DB: Database> JournaledAccount<'a, 'b, ENTRY, DB> { | ||
| /// Creates a new journaled account. | ||
| #[inline(never)] | ||
| pub fn sload( |
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.
from precompile pov this doesn't provide any additional benefits because in there we can not contrain any types, so we'd need to write additioal dyn compat wrappers for this I believe @klkvr
| 'b, | ||
| <JOURNAL as JournalTr>::JournalEntry, | ||
| <JOURNAL as JournalTr>::Database, |
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.
if these types are both coming from the JournalTr itself, shouldnt the JournaledAccount then just be generic over that?
This will help with perf as condition for account to be loaded will be not needed.
sload/sstore are moved to JournaledAccount for better accesss to it.
This does not solve foundry API problem where they need to directly inject storage into account. Maybe doing
unsafe_sstorewould be a solution, but will leave this for later.