Skip to content

Commit 4ae9f97

Browse files
committed
Add documentation
1 parent 6bd37d4 commit 4ae9f97

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### 0.8.24 (unreleased)
22

33
Language Features:
4-
4+
* Introduce global ``blobhash`` for retrieving the versioned blob hash of a given block.
55

66
Compiler Features:
77
* EVM: Support for the EVM Version "Cancun".

docs/cheatsheet.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ Members of ``address``
5656
returns ``false`` on failure
5757
- ``<address payable>.transfer(uint256 amount)``: send given amount of Wei to :ref:`address`, throws on failure
5858

59-
.. index:: blockhash, block, block;basefree, block;chainid, block;coinbase, block;difficulty, block;gaslimit, block;number, block;prevrandao, block;timestamp
59+
.. index:: blockhash, blobhash, block, block;basefree, block;chainid, block;coinbase, block;difficulty, block;gaslimit, block;number, block;prevrandao, block;timestamp
6060
.. index:: gasleft, msg;data, msg;sender, msg;sig, msg;value, tx;gasprice, tx;origin
6161

6262
Block and Transaction Properties
6363
================================
6464

6565
- ``blockhash(uint blockNumber) returns (bytes32)``: hash of the given block - only works for 256 most recent blocks
66+
- ``blobhash(uint blockNumber) returns (bytes32)``: versioned blob hash of the given block. The versioned hash consists of a single byte (0x01) representing the blob hash version, followed by the last 31 bytes of the SHA256 hash of the KZG commitment (`EIP-4844 <https://eips.ethereum.org/EIPS/eip-4844>`_)
6667
- ``block.basefee`` (``uint``): current block's base fee (`EIP-3198 <https://eips.ethereum.org/EIPS/eip-3198>`_ and `EIP-1559 <https://eips.ethereum.org/EIPS/eip-1559>`_)
6768
- ``block.chainid`` (``uint``): current chain id
6869
- ``block.coinbase`` (``address payable``): current block miner's address

docs/yul.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,8 @@ This document does not want to be a full description of the Ethereum virtual mac
752752
Please refer to a different document if you are interested in the precise semantics.
753753

754754
Opcodes marked with ``-`` do not return a result and all others return exactly one value.
755-
Opcodes marked with ``F``, ``H``, ``B``, ``C``, ``I``, ``L`` and ``P`` are present since Frontier,
756-
Homestead, Byzantium, Constantinople, Istanbul, London or Paris respectively.
755+
Opcodes marked with ``F``, ``H``, ``B``, ``C``, ``I``, ``L``, ``P`` and ``N`` are present since Frontier,
756+
Homestead, Byzantium, Constantinople, Istanbul, London, Paris or Cancun respectively.
757757

758758
In the following, ``mem[a...b)`` signifies the bytes of memory starting at position ``a`` up to
759759
but not including position ``b`` and ``storage[p]`` signifies the storage contents at slot ``p``.
@@ -925,6 +925,8 @@ the ``dup`` and ``swap`` instructions as well as ``jump`` instructions, labels a
925925
+-------------------------+-----+---+-----------------------------------------------------------------+
926926
| blockhash(b) | | F | hash of block nr b - only for last 256 blocks excluding current |
927927
+-------------------------+-----+---+-----------------------------------------------------------------+
928+
| blobhash(b) | | N | versioned blob hash of block nr b |
929+
+-------------------------+-----+---+-----------------------------------------------------------------+
928930
| coinbase() | | F | current mining beneficiary |
929931
+-------------------------+-----+---+-----------------------------------------------------------------+
930932
| timestamp() | | F | timestamp of the current block in seconds since the epoch |

0 commit comments

Comments
 (0)