Interface BlockHeader


  • public interface BlockHeader
    The minimum set of data for a BlockHeader, as defined in the Ethereum Yellow Paper.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default java.util.Optional<java.lang.Long> getBaseFee()
      The BASEFEE of this header.
      Hash getBlockHash()
      The Keccak 256-bit hash of this header.
      Address getCoinbase()
      The 160-bit address to which all fees collected from the successful mining of this block be transferred.
      Quantity getDifficulty()
      A scalar value corresponding to the difficulty level of this block.
      org.apache.tuweni.bytes.Bytes getExtraData()
      An arbitrary byte array containing data relevant to this block.
      long getGasLimit()
      A scalar value equal to the current limit of gas expenditure per block.
      long getGasUsed()
      A scalar value equal to the total gas used in transactions in this block.
      org.apache.tuweni.bytes.Bytes getLogsBloom()
      The Bloom filter composed from indexable information (logger address and log topics) contained in each log entry from the receipt of each transaction in the transactions list.
      Hash getMixHash()
      A 256-bit hash which, combined with the nonce, proves that a sufficient amount of computation has been carried out on this block.
      long getNonce()
      A 64-bit value which, combined with the mixhash, proves that a sufficient amount of computation has been carried out on this block.
      long getNumber()
      A scalar value equal to the number of ancestor blocks.
      Hash getOmmersHash()
      The Keccak 256-bit hash of the ommers list portion of this block.
      Hash getParentHash()
      The Keccak 256-bit hash of the parent block’s header, in its entirety.
      Hash getReceiptsRoot()
      The Keccak 256-bit hash of the root node of the trie structure populated with the receipts of each transaction in the transactions list portion of the block.
      Hash getStateRoot()
      The Keccak 256-bit hash of the root node of the state trie, after all transactions are executed and finalisations applied.
      long getTimestamp()
      A scalar value equal to the reasonable output of Unix’s time() at this block’s inception.
      Hash getTransactionsRoot()
      The Keccak 256-bit hash of theroot node of the trie structure populated with each transaction in the transactions list portion of the block.
    • Method Detail

      • getParentHash

        Hash getParentHash()
        The Keccak 256-bit hash of the parent block’s header, in its entirety.
        Returns:
        The Keccak 256-bit hash of the parent block’s header, in its entirety.
      • getOmmersHash

        Hash getOmmersHash()
        The Keccak 256-bit hash of the ommers list portion of this block.
        Returns:
        The Keccak 256-bit hash of the ommers list portion of this block.
      • getCoinbase

        Address getCoinbase()
        The 160-bit address to which all fees collected from the successful mining of this block be transferred.

        The name in the yellow paper is beneficiary.

        Returns:
        The 160-bit address to which all fees collected from the successful mining of this block be transferred.
      • getStateRoot

        Hash getStateRoot()
        The Keccak 256-bit hash of the root node of the state trie, after all transactions are executed and finalisations applied.
        Returns:
        The Keccak 256-bit hash of the root node of the state trie, after all transactions are executed and finalisations applied.
      • getTransactionsRoot

        Hash getTransactionsRoot()
        The Keccak 256-bit hash of theroot node of the trie structure populated with each transaction in the transactions list portion of the block.
        Returns:
        The Keccak 256-bit hash of theroot node of the trie structure populated with each transaction in the transactions list portion of the block.
      • getReceiptsRoot

        Hash getReceiptsRoot()
        The Keccak 256-bit hash of the root node of the trie structure populated with the receipts of each transaction in the transactions list portion of the block.
        Returns:
        The Keccak 256-bit hash of the root node of the trie structure populated with the receipts of each transaction in the transactions list portion of the block.
      • getLogsBloom

        org.apache.tuweni.bytes.Bytes getLogsBloom()
        The Bloom filter composed from indexable information (logger address and log topics) contained in each log entry from the receipt of each transaction in the transactions list.
        Returns:
        The Bloom filter composed from indexable information (logger address and log topics) contained in each log entry from the receipt of each transaction in the transactions list.
      • getDifficulty

        Quantity getDifficulty()
        A scalar value corresponding to the difficulty level of this block. This can be calculated from the previous block’s difficulty level and the timestamp.
        Returns:
        A UInt256 value corresponding to the difficulty level of this block. This can be calculated from the previous block’s difficulty level and the timestamp.
      • getNumber

        long getNumber()
        A scalar value equal to the number of ancestor blocks. The genesis block has a number of zero.
        Returns:
        A scalar value equal to the number of ancestor blocks. The genesis block has a number of zero.
      • getGasLimit

        long getGasLimit()
        A scalar value equal to the current limit of gas expenditure per block.
        Returns:
        A scalar value equal to the current limit of gas expenditure per block.
      • getGasUsed

        long getGasUsed()
        A scalar value equal to the total gas used in transactions in this block.
        Returns:
        A scalar value equal to the total gas used in transactions in this block.
      • getTimestamp

        long getTimestamp()
        A scalar value equal to the reasonable output of Unix’s time() at this block’s inception.
        Returns:
        A scalar value equal to the reasonable output of Unix’s time() at this block’s inception.
      • getExtraData

        org.apache.tuweni.bytes.Bytes getExtraData()
        An arbitrary byte array containing data relevant to this block. This must be 32 bytes or fewer.
        Returns:
        An arbitrary byte array containing data relevant to this block. This must be 32 bytes or fewer.
      • getMixHash

        Hash getMixHash()
        A 256-bit hash which, combined with the nonce, proves that a sufficient amount of computation has been carried out on this block.
        Returns:
        A 256-bit hash which, combined with the nonce, proves that a sufficient amount of computation has been carried out on this block.
      • getNonce

        long getNonce()
        A 64-bit value which, combined with the mixhash, proves that a sufficient amount of computation has been carried out on this block.
        Returns:
        A 64-bit value which, combined with the mixhash, proves that a sufficient amount of computation has been carried out on this block.
      • getBlockHash

        Hash getBlockHash()
        The Keccak 256-bit hash of this header.
        Returns:
        The Keccak 256-bit hash of this header.
      • getBaseFee

        default java.util.Optional<java.lang.Long> getBaseFee()
        The BASEFEE of this header.
        Returns:
        TheBASEFEE of this header.