@@ -768,41 +768,6 @@ def increase_recipient_balance(recipient: Account) -> None:
768768 destroy_account (block_env .state , wd .address )
769769
770770
771- def compute_header_hash (header : Header ) -> Hash32 :
772- """
773- Computes the hash of a block header.
774-
775- The header hash of a block is the canonical hash that is used to refer
776- to a specific block and completely distinguishes a block from another.
777-
778- ``keccak256`` is a function that produces a 256 bit hash of any input.
779- It also takes in any number of bytes as an input and produces a single
780- hash for them. A hash is a completely unique output for a single input.
781- So an input corresponds to one unique hash that can be used to identify
782- the input exactly.
783-
784- Prior to using the ``keccak256`` hash function, the header must be
785- encoded using the Recursive-Length Prefix. See :ref:`rlp`.
786- RLP encoding the header converts it into a space-efficient format that
787- allows for easy transfer of data between nodes. The purpose of RLP is to
788- encode arbitrarily nested arrays of binary data, and RLP is the primary
789- encoding method used to serialize objects in Ethereum's execution layer.
790- The only purpose of RLP is to encode structure; encoding specific data
791- types (e.g. strings, floats) is left up to higher-order protocols.
792-
793- Parameters
794- ----------
795- header :
796- Header of interest.
797-
798- Returns
799- -------
800- hash : `ethereum.crypto.hash.Hash32`
801- Hash of the header.
802- """
803- return keccak256 (rlp .encode (header ))
804-
805-
806771def check_gas_limit (gas_limit : Uint , parent_gas_limit : Uint ) -> bool :
807772 """
808773 Validates the gas limit for a block.
0 commit comments