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

Docs: Specify blobhash() behaviour when blob does not exist #15210

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

Conversation

ToonVanHove
Copy link

Add description of blobhash() behaviour when the given blob does not exist.
This is currently not specified.

Copy link

Thank you for your contribution to the Solidity compiler! A team member will follow up shortly.

If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother.

If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix.

r0qs
r0qs previously approved these changes Jun 21, 2024
@r0qs
Copy link
Member

r0qs commented Jun 21, 2024

Thanks @ToonVanHove, I'm already approving, but please remove the trailing whitespace as reported here: https://app.circleci.com/pipelines/github/ethereum/solidity/34603/workflows/0f99fcfa-1229-432c-9a19-d59a9ac4b4bb/jobs/1568548

@r0qs
Copy link
Member

r0qs commented Jun 21, 2024

Please, also rebase and squash the commits ;)

@ToonVanHove
Copy link
Author

Sorry about that, should be fixed!

@@ -77,6 +77,7 @@ Block and Transaction Properties
- ``blobhash(uint index) returns (bytes32)``: versioned hash of the ``index``-th blob associated with the current transaction.
A versioned hash consists of a single byte representing the version (currently ``0x01``), followed by the last 31 bytes
of the SHA256 hash of the KZG commitment (`EIP-4844 <https://eips.ethereum.org/EIPS/eip-4844>`_).
Returns zero if no blob with the given index exists.
Copy link
Member

Choose a reason for hiding this comment

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

We should probably include that info in the opcode table as well: https://docs.soliditylang.org/en/develop/yul.html#evm-dialect

The builtin also listed in the cheatsheet: https://docs.soliditylang.org/en/develop/cheatsheet.html#block-and-transaction-properties. Not sure if we should add it there or not though. Cheatsheet is meant to be concise. On the other hand the description is the same as here so it would make sense to have it in both places as well.

@ToonVanHove
Copy link
Author

I've added it to both the opcode table and the cheatsheet. Let me know if you'd like any further changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants