-
Notifications
You must be signed in to change notification settings - Fork 998
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
Update compute_el_header_block_hash for EIP-7685 #3778
Conversation
@lightclient I would appreciate your review but I can't select you as a reviewer. |
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.
The logic looks correct to me. One nit: get_deposit_receipt_rlp
(same with withdrawal requests) returns Request encoding which is not an RLP because of the type byte at the beginning, consider renaming these methods to reflect their actual semantics.
Ah yes, you're right. Thanks for pointing this out! I took this approach. |
Note: if #3757 gets merged, we should rename it in this PR too. |
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.
@jtraglia I fixed the conflicts and added lines for ConsolidationRequest
. Could you take a look?
@hwwhww So I'm guessing |
@jtraglia you're right! I forget to update the prefix when copy-pasting. |
The parent beacon block hash was incorrectly set to zero in ethereum#3778. Passing the state to the computation function allows correct hash computation.
Reference: https://eips.ethereum.org/EIPS/eip-7685
This PR does the following:
deposit_receipts
andwithdrawal_requests
intorequests
.0x00
and0x01
).parent_beacon_root
.parent_beacon_root
causes issues whenrequests_root
is not null.payload.withdrawal_requests = []
inbuild_empty_execution_payload
.I noticed these issues when looking into why the block hash differed from Geth.