mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Document difficulty vs. prevrandao
This commit is contained in:
parent
eb8af2caec
commit
c353eb0af5
@ -173,7 +173,7 @@ at each version. Backward compatibility is not guaranteed between each version.
|
|||||||
- ``london`` (**default**)
|
- ``london`` (**default**)
|
||||||
- The block's base fee (`EIP-3198 <https://eips.ethereum.org/EIPS/eip-3198>`_ and `EIP-1559 <https://eips.ethereum.org/EIPS/eip-1559>`_) can be accessed via the global ``block.basefee`` or ``basefee()`` in inline assembly.
|
- The block's base fee (`EIP-3198 <https://eips.ethereum.org/EIPS/eip-3198>`_ and `EIP-1559 <https://eips.ethereum.org/EIPS/eip-1559>`_) can be accessed via the global ``block.basefee`` or ``basefee()`` in inline assembly.
|
||||||
- ``paris``
|
- ``paris``
|
||||||
- No changes.
|
- No changes, however the semantics of the ``difficulty`` value have changed (see `EIP-4399 <https://eips.ethereum.org/EIPS/eip-4399>`_).
|
||||||
|
|
||||||
.. index:: ! standard JSON, ! --standard-json
|
.. index:: ! standard JSON, ! --standard-json
|
||||||
.. _compiler-api:
|
.. _compiler-api:
|
||||||
|
@ -933,7 +933,7 @@ the ``dup`` and ``swap`` instructions as well as ``jump`` instructions, labels a
|
|||||||
+-------------------------+-----+---+-----------------------------------------------------------------+
|
+-------------------------+-----+---+-----------------------------------------------------------------+
|
||||||
| number() | | F | current block number |
|
| number() | | F | current block number |
|
||||||
+-------------------------+-----+---+-----------------------------------------------------------------+
|
+-------------------------+-----+---+-----------------------------------------------------------------+
|
||||||
| difficulty() | | F | difficulty of the current block |
|
| difficulty() | | F | difficulty of the current block (see note below) |
|
||||||
+-------------------------+-----+---+-----------------------------------------------------------------+
|
+-------------------------+-----+---+-----------------------------------------------------------------+
|
||||||
| gaslimit() | | F | block gas limit of the current block |
|
| gaslimit() | | F | block gas limit of the current block |
|
||||||
+-------------------------+-----+---+-----------------------------------------------------------------+
|
+-------------------------+-----+---+-----------------------------------------------------------------+
|
||||||
@ -948,6 +948,13 @@ the ``dup`` and ``swap`` instructions as well as ``jump`` instructions, labels a
|
|||||||
You need to use the ``returndatasize`` opcode to check which part of this memory area contains the return data.
|
You need to use the ``returndatasize`` opcode to check which part of this memory area contains the return data.
|
||||||
The remaining bytes will retain their values as of before the call.
|
The remaining bytes will retain their values as of before the call.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
With the Paris network upgrade the semantics of ``difficulty`` have been changed.
|
||||||
|
It returns the value of ``prevrandao``, which is a 256-bit value, whereas the highest recorded
|
||||||
|
difficulty value within Ethash was ~54 bits.
|
||||||
|
This change is described in `EIP-4399 <https://eips.ethereum.org/EIPS/eip-4399>`_.
|
||||||
|
Please note that irrelevant to which EVM version is selected in the compiler, the semantics of
|
||||||
|
instructions depend on the final chain of deployment.
|
||||||
|
|
||||||
In some internal dialects, there are additional functions:
|
In some internal dialects, there are additional functions:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user