Class BlockStreamInfo

java.lang.Object
com.google.protobuf.AbstractMessageLite<BlockStreamInfo,BlockStreamInfo.Builder>
com.google.protobuf.GeneratedMessageLite<BlockStreamInfo,BlockStreamInfo.Builder>
com.hedera.hashgraph.sdk.proto.BlockStreamInfo
All Implemented Interfaces:
com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, BlockStreamInfoOrBuilder

@Generated public final class BlockStreamInfo extends com.google.protobuf.GeneratedMessageLite<BlockStreamInfo,BlockStreamInfo.Builder> implements BlockStreamInfoOrBuilder
 *
 A message stored in state to maintain block stream parameters.<br/>
 Nodes use this information for three purposes.
 1. To maintain hash chain continuity at restart and reconnect boundaries.
 2. To store historical hashes for implementation of the EVM `BLOCKHASH`
 and `PREVRANDAO` opcodes.
 3. To track the amount of consensus time that has passed between blocks.

 This value MUST be updated for every block.<br/>
 This value MUST be transmitted in the "state changes" section of
 _each_ block, but MUST be updated at the beginning of the _next_ block.<br/>
 This value SHALL contain the block hash up to, and including, the
 immediately prior completed block.<br/>
 The state change to update this singleton MUST be the last
 block item in this block.
 
Protobuf type com.hedera.hapi.node.state.blockstream.BlockStreamInfo
  • Field Details

    • BLOCK_NUMBER_FIELD_NUMBER

      public static final int BLOCK_NUMBER_FIELD_NUMBER
      See Also:
    • BLOCK_TIME_FIELD_NUMBER

      public static final int BLOCK_TIME_FIELD_NUMBER
      See Also:
    • TRAILING_OUTPUT_HASHES_FIELD_NUMBER

      public static final int TRAILING_OUTPUT_HASHES_FIELD_NUMBER
      See Also:
    • TRAILING_BLOCK_HASHES_FIELD_NUMBER

      public static final int TRAILING_BLOCK_HASHES_FIELD_NUMBER
      See Also:
    • INPUT_TREE_ROOT_HASH_FIELD_NUMBER

      public static final int INPUT_TREE_ROOT_HASH_FIELD_NUMBER
      See Also:
    • START_OF_BLOCK_STATE_HASH_FIELD_NUMBER

      public static final int START_OF_BLOCK_STATE_HASH_FIELD_NUMBER
      See Also:
    • NUM_PRECEDING_STATE_CHANGES_ITEMS_FIELD_NUMBER

      public static final int NUM_PRECEDING_STATE_CHANGES_ITEMS_FIELD_NUMBER
      See Also:
    • RIGHTMOST_PRECEDING_STATE_CHANGES_TREE_HASHES_FIELD_NUMBER

      public static final int RIGHTMOST_PRECEDING_STATE_CHANGES_TREE_HASHES_FIELD_NUMBER
      See Also:
    • BLOCK_END_TIME_FIELD_NUMBER

      public static final int BLOCK_END_TIME_FIELD_NUMBER
      See Also:
    • POST_UPGRADE_WORK_DONE_FIELD_NUMBER

      public static final int POST_UPGRADE_WORK_DONE_FIELD_NUMBER
      See Also:
    • CREATION_SOFTWARE_VERSION_FIELD_NUMBER

      public static final int CREATION_SOFTWARE_VERSION_FIELD_NUMBER
      See Also:
    • LAST_INTERVAL_PROCESS_TIME_FIELD_NUMBER

      public static final int LAST_INTERVAL_PROCESS_TIME_FIELD_NUMBER
      See Also:
    • LAST_HANDLE_TIME_FIELD_NUMBER

      public static final int LAST_HANDLE_TIME_FIELD_NUMBER
      See Also:
    • CONSENSUS_HEADER_ROOT_HASH_FIELD_NUMBER

      public static final int CONSENSUS_HEADER_ROOT_HASH_FIELD_NUMBER
      See Also:
    • OUTPUT_ITEM_ROOT_HASH_FIELD_NUMBER

      public static final int OUTPUT_ITEM_ROOT_HASH_FIELD_NUMBER
      See Also:
    • TRACE_DATA_ROOT_HASH_FIELD_NUMBER

      public static final int TRACE_DATA_ROOT_HASH_FIELD_NUMBER
      See Also:
    • INTERMEDIATE_PREVIOUS_BLOCK_ROOT_HASHES_FIELD_NUMBER

      public static final int INTERMEDIATE_PREVIOUS_BLOCK_ROOT_HASHES_FIELD_NUMBER
      See Also:
    • INTERMEDIATE_BLOCK_ROOTS_LEAF_COUNT_FIELD_NUMBER

      public static final int INTERMEDIATE_BLOCK_ROOTS_LEAF_COUNT_FIELD_NUMBER
      See Also:
  • Method Details

    • getBlockNumber

      public long getBlockNumber()
       *
       A block number.<br/>
       This is the current block number.
       
      uint64 block_number = 1;
      Specified by:
      getBlockNumber in interface BlockStreamInfoOrBuilder
      Returns:
      The blockNumber.
    • hasBlockTime

      public boolean hasBlockTime()
       *
       A consensus time for the current block.<br/>
       This is the consensus time of the first round in the current block,
       which equates to the first contained transaction's consensus time.
       It is used to determine if this block was the first across an
       important boundary in consensus time, such as UTC midnight.
       This may also be used to purge entities expiring between the last
       block time and this time.
       
      .proto.Timestamp block_time = 2;
      Specified by:
      hasBlockTime in interface BlockStreamInfoOrBuilder
      Returns:
      Whether the blockTime field is set.
    • getBlockTime

      public Timestamp getBlockTime()
       *
       A consensus time for the current block.<br/>
       This is the consensus time of the first round in the current block,
       which equates to the first contained transaction's consensus time.
       It is used to determine if this block was the first across an
       important boundary in consensus time, such as UTC midnight.
       This may also be used to purge entities expiring between the last
       block time and this time.
       
      .proto.Timestamp block_time = 2;
      Specified by:
      getBlockTime in interface BlockStreamInfoOrBuilder
      Returns:
      The blockTime.
    • getTrailingOutputHashes

      public com.google.protobuf.ByteString getTrailingOutputHashes()
       *
       A concatenation of hash values.<br/>
       This combines several trailing output block item hashes and
       is used as a seed value for a pseudo-random number generator.<br/>
       This is also required to implement the EVM `PREVRANDAO` opcode.<br/>
       This MUST contain at least 256 bits of entropy.
       
      bytes trailing_output_hashes = 3;
      Specified by:
      getTrailingOutputHashes in interface BlockStreamInfoOrBuilder
      Returns:
      The trailingOutputHashes.
    • getTrailingBlockHashes

      public com.google.protobuf.ByteString getTrailingBlockHashes()
       *
       A concatenation of hash values.<br/>
       This field combines up to 256 trailing block hashes.
       <p>
       If this message is for block number N, then the earliest available
       hash SHALL be for block number N-256.<br/>
       The latest available hash SHALL be for block N-1.<br/>
       This is REQUIRED to implement the EVM `BLOCKHASH` opcode.
       <p>
       ### Field Length
       Each hash value SHALL be the trailing 265 bits of a SHA2-384 hash.<br/>
       The length of this field SHALL be an integer multiple of 32 bytes.<br/>
       This field SHALL be at least 32 bytes.<br/>
       The maximum length of this field SHALL be 8192 bytes.
       
      bytes trailing_block_hashes = 4;
      Specified by:
      getTrailingBlockHashes in interface BlockStreamInfoOrBuilder
      Returns:
      The trailingBlockHashes.
    • getInputTreeRootHash

      public com.google.protobuf.ByteString getInputTreeRootHash()
       *
       A SHA2-384 hash value.<br/>
       This is the final hash of the "input" subtree for this block.
       
      bytes input_tree_root_hash = 5;
      Specified by:
      getInputTreeRootHash in interface BlockStreamInfoOrBuilder
      Returns:
      The inputTreeRootHash.
    • getStartOfBlockStateHash

      public com.google.protobuf.ByteString getStartOfBlockStateHash()
       *
       A SHA2-384 hash value.<br/>
       This is the hash of consensus state at the _start_ of this block.
       
      bytes start_of_block_state_hash = 6;
      Specified by:
      getStartOfBlockStateHash in interface BlockStreamInfoOrBuilder
      Returns:
      The startOfBlockStateHash.
    • getNumPrecedingStateChangesItems

      public long getNumPrecedingStateChangesItems()
       *
       A count of "state change" block items in this block.
       <p>
       This SHALL count the number of state change block items that _precede_
       the state change that updates this singleton.
       
      uint64 num_preceding_state_changes_items = 7;
      Specified by:
      getNumPrecedingStateChangesItems in interface BlockStreamInfoOrBuilder
      Returns:
      The numPrecedingStateChangesItems.
    • getRightmostPrecedingStateChangesTreeHashesList

      public List<com.google.protobuf.ByteString> getRightmostPrecedingStateChangesTreeHashesList()
       *
       A concatenation of SHA2-384 hash values.<br/>
       This is the "rightmost" values of the "output" subtree.
       <p>
       The subtree containing these hashes SHALL be constructed from all "output"
       `BlockItem`s in this block that _precede_ the update to this singleton.
       
      repeated bytes rightmost_preceding_state_changes_tree_hashes = 8;
      Specified by:
      getRightmostPrecedingStateChangesTreeHashesList in interface BlockStreamInfoOrBuilder
      Returns:
      A list containing the rightmostPrecedingStateChangesTreeHashes.
    • getRightmostPrecedingStateChangesTreeHashesCount

      public int getRightmostPrecedingStateChangesTreeHashesCount()
       *
       A concatenation of SHA2-384 hash values.<br/>
       This is the "rightmost" values of the "output" subtree.
       <p>
       The subtree containing these hashes SHALL be constructed from all "output"
       `BlockItem`s in this block that _precede_ the update to this singleton.
       
      repeated bytes rightmost_preceding_state_changes_tree_hashes = 8;
      Specified by:
      getRightmostPrecedingStateChangesTreeHashesCount in interface BlockStreamInfoOrBuilder
      Returns:
      The count of rightmostPrecedingStateChangesTreeHashes.
    • getRightmostPrecedingStateChangesTreeHashes

      public com.google.protobuf.ByteString getRightmostPrecedingStateChangesTreeHashes(int index)
       *
       A concatenation of SHA2-384 hash values.<br/>
       This is the "rightmost" values of the "output" subtree.
       <p>
       The subtree containing these hashes SHALL be constructed from all "output"
       `BlockItem`s in this block that _precede_ the update to this singleton.
       
      repeated bytes rightmost_preceding_state_changes_tree_hashes = 8;
      Specified by:
      getRightmostPrecedingStateChangesTreeHashes in interface BlockStreamInfoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The rightmostPrecedingStateChangesTreeHashes at the given index.
    • hasBlockEndTime

      public boolean hasBlockEndTime()
       *
       A block-end consensus time stamp.
       <p>
       This field SHALL hold the last-used consensus time for
       the current block.
       
      .proto.Timestamp block_end_time = 9;
      Specified by:
      hasBlockEndTime in interface BlockStreamInfoOrBuilder
      Returns:
      Whether the blockEndTime field is set.
    • getBlockEndTime

      public Timestamp getBlockEndTime()
       *
       A block-end consensus time stamp.
       <p>
       This field SHALL hold the last-used consensus time for
       the current block.
       
      .proto.Timestamp block_end_time = 9;
      Specified by:
      getBlockEndTime in interface BlockStreamInfoOrBuilder
      Returns:
      The blockEndTime.
    • getPostUpgradeWorkDone

      public boolean getPostUpgradeWorkDone()
       *
       Whether the post-upgrade work has been done.
       <p>
       This MUST be false if and only if the network just restarted
       after an upgrade and has not yet done the post-upgrade work.
       
      bool post_upgrade_work_done = 10;
      Specified by:
      getPostUpgradeWorkDone in interface BlockStreamInfoOrBuilder
      Returns:
      The postUpgradeWorkDone.
    • hasCreationSoftwareVersion

      public boolean hasCreationSoftwareVersion()
       *
       A version describing the version of application software.
       <p>
       This SHALL be the software version that created this block.
       
      .proto.SemanticVersion creation_software_version = 11;
      Specified by:
      hasCreationSoftwareVersion in interface BlockStreamInfoOrBuilder
      Returns:
      Whether the creationSoftwareVersion field is set.
    • getCreationSoftwareVersion

      public SemanticVersion getCreationSoftwareVersion()
       *
       A version describing the version of application software.
       <p>
       This SHALL be the software version that created this block.
       
      .proto.SemanticVersion creation_software_version = 11;
      Specified by:
      getCreationSoftwareVersion in interface BlockStreamInfoOrBuilder
      Returns:
      The creationSoftwareVersion.
    • hasLastIntervalProcessTime

      public boolean hasLastIntervalProcessTime()
       *
       The time stamp at which the last interval process was done.
       <p>
       This field SHALL hold the consensus time for the last time
       at which an interval of time-dependent events were processed.
       
      .proto.Timestamp last_interval_process_time = 12;
      Specified by:
      hasLastIntervalProcessTime in interface BlockStreamInfoOrBuilder
      Returns:
      Whether the lastIntervalProcessTime field is set.
    • getLastIntervalProcessTime

      public Timestamp getLastIntervalProcessTime()
       *
       The time stamp at which the last interval process was done.
       <p>
       This field SHALL hold the consensus time for the last time
       at which an interval of time-dependent events were processed.
       
      .proto.Timestamp last_interval_process_time = 12;
      Specified by:
      getLastIntervalProcessTime in interface BlockStreamInfoOrBuilder
      Returns:
      The lastIntervalProcessTime.
    • hasLastHandleTime

      public boolean hasLastHandleTime()
       *
       The time stamp at which the last user transaction was handled.
       <p>
       This field SHALL hold the consensus time for the last time
       at which a user transaction was handled.
       
      .proto.Timestamp last_handle_time = 13;
      Specified by:
      hasLastHandleTime in interface BlockStreamInfoOrBuilder
      Returns:
      Whether the lastHandleTime field is set.
    • getLastHandleTime

      public Timestamp getLastHandleTime()
       *
       The time stamp at which the last user transaction was handled.
       <p>
       This field SHALL hold the consensus time for the last time
       at which a user transaction was handled.
       
      .proto.Timestamp last_handle_time = 13;
      Specified by:
      getLastHandleTime in interface BlockStreamInfoOrBuilder
      Returns:
      The lastHandleTime.
    • getConsensusHeaderRootHash

      public com.google.protobuf.ByteString getConsensusHeaderRootHash()
       *
       A SHA2-384 hash value.<br/>
       This is the final hash of the "consensus headers" subtree for this block.
       
      bytes consensus_header_root_hash = 14;
      Specified by:
      getConsensusHeaderRootHash in interface BlockStreamInfoOrBuilder
      Returns:
      The consensusHeaderRootHash.
    • getOutputItemRootHash

      public com.google.protobuf.ByteString getOutputItemRootHash()
       *
       A SHA2-384 hash value.<br/>
       This is the final hash of the "output" subtree for this block.
       
      bytes output_item_root_hash = 15;
      Specified by:
      getOutputItemRootHash in interface BlockStreamInfoOrBuilder
      Returns:
      The outputItemRootHash.
    • getTraceDataRootHash

      public com.google.protobuf.ByteString getTraceDataRootHash()
       *
       A SHA2-384 hash value.<br/>
       This is the final hash of the "trace data" subtree for this block.
       
      bytes trace_data_root_hash = 16;
      Specified by:
      getTraceDataRootHash in interface BlockStreamInfoOrBuilder
      Returns:
      The traceDataRootHash.
    • getIntermediatePreviousBlockRootHashesList

      public List<com.google.protobuf.ByteString> getIntermediatePreviousBlockRootHashesList()
       *
       The intermediate hashes needed for subroot 2 in the block merkle
       tree structure. These hashes SHALL include the minimum required
       block root hashes needed to construct subroot 2's final state at
       the end of the previous block.
       
      repeated bytes intermediate_previous_block_root_hashes = 17;
      Specified by:
      getIntermediatePreviousBlockRootHashesList in interface BlockStreamInfoOrBuilder
      Returns:
      A list containing the intermediatePreviousBlockRootHashes.
    • getIntermediatePreviousBlockRootHashesCount

      public int getIntermediatePreviousBlockRootHashesCount()
       *
       The intermediate hashes needed for subroot 2 in the block merkle
       tree structure. These hashes SHALL include the minimum required
       block root hashes needed to construct subroot 2's final state at
       the end of the previous block.
       
      repeated bytes intermediate_previous_block_root_hashes = 17;
      Specified by:
      getIntermediatePreviousBlockRootHashesCount in interface BlockStreamInfoOrBuilder
      Returns:
      The count of intermediatePreviousBlockRootHashes.
    • getIntermediatePreviousBlockRootHashes

      public com.google.protobuf.ByteString getIntermediatePreviousBlockRootHashes(int index)
       *
       The intermediate hashes needed for subroot 2 in the block merkle
       tree structure. These hashes SHALL include the minimum required
       block root hashes needed to construct subroot 2's final state at
       the end of the previous block.
       
      repeated bytes intermediate_previous_block_root_hashes = 17;
      Specified by:
      getIntermediatePreviousBlockRootHashes in interface BlockStreamInfoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The intermediatePreviousBlockRootHashes at the given index.
    • getIntermediateBlockRootsLeafCount

      public long getIntermediateBlockRootsLeafCount()
       *
       The number of leaves in the intermediate block roots subtree.
       
      uint64 intermediate_block_roots_leaf_count = 18;
      Specified by:
      getIntermediateBlockRootsLeafCount in interface BlockStreamInfoOrBuilder
      Returns:
      The intermediateBlockRootsLeafCount.
    • parseFrom

      public static BlockStreamInfo parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BlockStreamInfo parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BlockStreamInfo parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BlockStreamInfo parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BlockStreamInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BlockStreamInfo parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BlockStreamInfo parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static BlockStreamInfo parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static BlockStreamInfo parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static BlockStreamInfo parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static BlockStreamInfo parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static BlockStreamInfo parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static BlockStreamInfo.Builder newBuilder()
    • newBuilder

      public static BlockStreamInfo.Builder newBuilder(BlockStreamInfo prototype)
    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<BlockStreamInfo,BlockStreamInfo.Builder>
    • getDefaultInstance

      public static BlockStreamInfo getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<BlockStreamInfo> parser()