-
Notifications
You must be signed in to change notification settings - Fork 973
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
Add randao to execution payload #2479
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.
nice! a bit confused about Bytes32()
in the helpers for randao reveal but otherwise, looking good
I'm okay with the suggested cleanups. Although it is an important design goal for execution layer to be parallelizable, I don't think the added param moves the needle too much on making that clear to the reader. I would suggest noting the parallelizability in the header comment (or pre-function text) of |
Thanks everyone for your inputs! I've accepted suggested polishing with related comment about |
Adds the most recent
randao_mix
into execution payload.This PR is a follow up to the corresponding discussion that took place in Merge Implementers' Call 5.
The value of new
randao
field inExecutionPayload
must be assigned todifficulty
field of derivedExecutionBlock
. And furtherrandao
value is exposed by theDIFFICULTY
opcode in the EVM. This way allows to preserve randomness property of the value returned by this opcode. Potentially,DIFFICULTY
opcode will be renamed toRANDAO
and is one of the post-Merge cleanups.There two reasons whyrandao
should be an explicit part of the payload:-ExecutionPayload
is the only input required to build correspondingExecutionBlock
- further compatibility with stateless executionUPD
The main idea of this particular solution is to exclude EVM changes from the Merge scope. An implementation where
randao
value is passed alongside with the payload and utilized by EVM context directly without requirement of being a part ofExecutionBlock
could be done after the Merge within other EVM changes.Should be rebased after #2472 gets merged