Skip to content
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 EIP-7685: exclude empty requests data in commitment #8989

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fjl
Copy link
Contributor

@fjl fjl commented Oct 22, 2024

Here I am proposing to change the requests_hash commitment so that empty items are excluded. The point of this is to ensure a stable empty requests hash which is independent of fork. Having such a hash makes testing a lot easier, and it mirrors how other execution-layer commitments behave.

There is also a corresponding engine API change: ethereum/execution-apis#599

Here I am proposing to change the `requests_hash` commitment so that empty items are
excluded. The point of this is to ensure a stable empty requests hash which is independent
of fork. Having such a hash makes testing a lot easier, and it mirrors how other
execution-layer commitments behave.
@fjl fjl requested a review from eth-bot as a code owner October 22, 2024 08:48
@github-actions github-actions bot added c-update Modifies an existing proposal s-review This EIP is in Review t-core labels Oct 22, 2024
@eth-bot
Copy link
Collaborator

eth-bot commented Oct 22, 2024

File EIPS/eip-7685.md

Requires 1 more reviewers from @lightclient

@eth-bot eth-bot added the a-review Waiting on author to review label Oct 22, 2024
@eth-bot eth-bot changed the title EIP-7685: exclude empty requests data in commitment Update EIP-7685: exclude empty requests data in commitment Oct 22, 2024
for r in requests:
m.update(sha256(r))
for r in block_requests:
if len(r) > 1:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this works, but this assumes that request_type is one byte, which is not specified.

I would also somewhere note that this thus checks that there is any request_data (without request_data then r len is indeed 1 (assuming that it is a Bytes1 type)). I initially thought this was off and should be len(r) >= 1.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type will always be one byte. We should probably add that to the EIP.

@lucassaldanha
Copy link
Contributor

Having such a hash makes testing a lot easier

To me this is already a good reason for the change! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-review Waiting on author to review c-update Modifies an existing proposal s-review This EIP is in Review t-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants