-
Notifications
You must be signed in to change notification settings - Fork 464
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
feat: implement EIP-2935 #1354
feat: implement EIP-2935 #1354
Conversation
Valgrind Results:
|
interpreter.instruction_result = InstructionResult::FatalExternalError; | ||
return; | ||
}; | ||
gas!(interpreter, gas::sload_cost(SPEC::SPEC_ID, is_cold)); |
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.
Maybe extract the SLOAD
logic from its function into a separate function where we also call here?
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.
yeah i had this in mind too, i just forgor
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 tried making a func but mut borrow of interpreter from pop_top!
prevented me, so I made an sload!
macro instead
Putting this in draft, unfortunately the current impl of EIP-2935 requires some changes to how we persist accounts and storage since it is exempt from state clearing. This will be changed in a later change to the EIP but the spec is currently frozen for devnet 0 |
After some consulting in Eth R&D discord we are likely going to add a nonce > 1 or a balance of 1 wei to the EIP-2935 system account until the EIP is fixed, so this is RFR again as there are no changes required to how we handle state clearing. The balance hack has been implemented upstream in Reth for now |
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 with one nit on naming
@rakita Renamed the constants, PTAL |
Implements the changes for
BLOCKHASH
as outlined in EIP-2935, and adds EIP-2935 constants.This requires an external processing step to fill the contract's storage with data. See paradigmxyz/reth#7818
Additionally, since
BLOCKHASH
now does anSLOAD
internally, I pulled thesload
logic into a reusablesload!
macro.