Class BlockHeader

java.lang.Object
com.norswap.nanoeth.blocks.BlockHeader
All Implemented Interfaces:
RLPLayoutable

public final class BlockHeader
extends Object
implements RLPLayoutable
  • Field Details

    • parentHash

      public final Hash parentHash
      The hash of the parent block.

      Yellowpaper notation: Hp

    • uncleHash

      public final Hash uncleHash
      Hash of the the uncles (aka "ommers") list of the block.

      Yellowpaper notation: Ho

    • coinbase

      public final Address coinbase
      Address that will receive the block reward (aka "beneficiary", aka "miner's address").

      Yellowpaper notation: Hc

    • stateRoot

      public final MerkleRoot stateRoot
      The Merkle root of the state tree.

      Yellowpaper notation: Hr

    • transactionsRoot

      public final MerkleRoot transactionsRoot
      The Merkle root of the transactions list of the block.

      Yellowpaper notation: Ht

    • receiptsRoot

      public final MerkleRoot receiptsRoot
      The Merkle root of the receipts list of the block.

      Yellowpaper notation: He

    • logsBloom

      public final BloomFilter logsBloom
      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.

      Yellowpaper notation: Hb

    • difficulty

      public final Natural difficulty
      The difficult level of the block, calculated from the previous' block difficulty level and the timestamp (cf. Difficulty).
    • number

      public final Natural number
      The number of ancestor blocks (aka "height"). The genesis block has number 0.

      Yellowpaper notation: Hi

    • gasLimit

      public final Natural gasLimit
      Current maximum amount of gas usable per block.

      Yellowpaper notation: Hl

      A block's miner can choose to update the gas limit incrementally (up or down) within the limit set by the protocol (cf. validate(BlockHeader)).

    • gasUsed

      public final Natural gasUsed
      The amount of gas used in this block.

      Yellowpaper notation: Hg

    • timestamp

      public final Natural timestamp
      A value equal to the reasonable output of Unix’s time() at this block’s inception.

      Yellowpaper notation: Hs

      The yellowpaper puts a 256 bytes limit on this, but it doesn't seem to affect serialization.

    • extraData

      public final byte[] extraData
      An arbitrary byte array containing data relevant to this block. This must be 32 bytes or fewer.

      Yellowpaper notaion: Hx

    • mixHash

      public final Hash mixHash
      A hash which, combined with the nonce, proves that a sufficient amount of computation has been carried out on this block.

      Yellowpaper notation: Hm

    • nonce

      public final long nonce
      A 64-bit scalar value which, combined with the mixHash, proves that a sufficient amount of computation has been carried out on this block.

      Miners iterate the nonce value until they can find a mixHash that satisfies the difficulty requirement.

      Yellowpaper notation: Hn

      Note that unlike other scalar values, by like addresses, hashes, ... the nonce gets serialized in full, even if it has leading zeroes.

  • Constructor Details

  • Method Details