Class BlockInfo

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

@Generated public final class BlockInfo extends com.google.protobuf.GeneratedMessageLite<BlockInfo,BlockInfo.Builder> implements BlockInfoOrBuilder
 *
 Information for a transaction block.

 This includes:
 - last block number.
 - consensus times for:
 - previous block start.
 - current block start.
 - last handled transaction.
 - hash data for a rolling window of 256 blocks.
 - whether migration records were produced.
 
Protobuf type proto.BlockInfo
  • Field Details

    • LAST_BLOCK_NUMBER_FIELD_NUMBER

      public static final int LAST_BLOCK_NUMBER_FIELD_NUMBER
      See Also:
    • FIRST_CONS_TIME_OF_LAST_BLOCK_FIELD_NUMBER

      public static final int FIRST_CONS_TIME_OF_LAST_BLOCK_FIELD_NUMBER
      See Also:
    • BLOCK_HASHES_FIELD_NUMBER

      public static final int BLOCK_HASHES_FIELD_NUMBER
      See Also:
    • CONS_TIME_OF_LAST_HANDLED_TXN_FIELD_NUMBER

      public static final int CONS_TIME_OF_LAST_HANDLED_TXN_FIELD_NUMBER
      See Also:
    • MIGRATION_RECORDS_STREAMED_FIELD_NUMBER

      public static final int MIGRATION_RECORDS_STREAMED_FIELD_NUMBER
      See Also:
    • FIRST_CONS_TIME_OF_CURRENT_BLOCK_FIELD_NUMBER

      public static final int FIRST_CONS_TIME_OF_CURRENT_BLOCK_FIELD_NUMBER
      See Also:
    • LAST_USED_CONS_TIME_FIELD_NUMBER

      public static final int LAST_USED_CONS_TIME_FIELD_NUMBER
      See Also:
    • LAST_INTERVAL_PROCESS_TIME_FIELD_NUMBER

      public static final int LAST_INTERVAL_PROCESS_TIME_FIELD_NUMBER
      See Also:
    • PREVIOUS_WRAPPED_RECORD_BLOCK_ROOT_HASH_FIELD_NUMBER

      public static final int PREVIOUS_WRAPPED_RECORD_BLOCK_ROOT_HASH_FIELD_NUMBER
      See Also:
    • WRAPPED_INTERMEDIATE_PREVIOUS_BLOCK_ROOT_HASHES_FIELD_NUMBER

      public static final int WRAPPED_INTERMEDIATE_PREVIOUS_BLOCK_ROOT_HASHES_FIELD_NUMBER
      See Also:
    • WRAPPED_INTERMEDIATE_BLOCK_ROOTS_LEAF_COUNT_FIELD_NUMBER

      public static final int WRAPPED_INTERMEDIATE_BLOCK_ROOTS_LEAF_COUNT_FIELD_NUMBER
      See Also:
  • Method Details

    • getLastBlockNumber

      public long getLastBlockNumber()
       *
       A block number.
       <p>
       The block number of the last completed immutable block.
       
      int64 last_block_number = 1;
      Specified by:
      getLastBlockNumber in interface BlockInfoOrBuilder
      Returns:
      The lastBlockNumber.
    • hasFirstConsTimeOfLastBlock

      public boolean hasFirstConsTimeOfLastBlock()
       *
       A consensus timestamp.
       <p>
       The consensus time of the first transaction for the last completed immutable block.
       
      .proto.Timestamp first_cons_time_of_last_block = 2;
      Specified by:
      hasFirstConsTimeOfLastBlock in interface BlockInfoOrBuilder
      Returns:
      Whether the firstConsTimeOfLastBlock field is set.
    • getFirstConsTimeOfLastBlock

      public Timestamp getFirstConsTimeOfLastBlock()
       *
       A consensus timestamp.
       <p>
       The consensus time of the first transaction for the last completed immutable block.
       
      .proto.Timestamp first_cons_time_of_last_block = 2;
      Specified by:
      getFirstConsTimeOfLastBlock in interface BlockInfoOrBuilder
      Returns:
      The firstConsTimeOfLastBlock.
    • getBlockHashes

      public com.google.protobuf.ByteString getBlockHashes()
       *
       A list of the last 256 block hashes.<br/>
       This is the SHA384 48 byte hashes of the previous 256 blocks,
       collected in a single byte array.
       <p>
       The first 48 bytes SHALL be the oldest block in the list.<br/>
       The last 48 bytes SHALL be the newest block, which is the last fully
       completed immutable block.<br/>
       This SHALL contain less than 256 block hashes if there are less than 256
       preceding blocks; for instance, shortly after network genesis the network
       will not have processed 256 blocks yet.
       <p>
       This MAY change significantly for Block Stream (HIP TBD).
       
      bytes block_hashes = 3;
      Specified by:
      getBlockHashes in interface BlockInfoOrBuilder
      Returns:
      The blockHashes.
    • hasConsTimeOfLastHandledTxn

      public boolean hasConsTimeOfLastHandledTxn()
       *
       A consensus timestamp.
       <p>
       The consensus time of the last transaction that was handled by the node
       within the current block. Only top-level transactions can trigger stake
       period side effects, so we track them separately from the last-used
       time of <i>all</i> transactions, which include children.<br/>
       
      .proto.Timestamp cons_time_of_last_handled_txn = 4;
      Specified by:
      hasConsTimeOfLastHandledTxn in interface BlockInfoOrBuilder
      Returns:
      Whether the consTimeOfLastHandledTxn field is set.
    • getConsTimeOfLastHandledTxn

      public Timestamp getConsTimeOfLastHandledTxn()
       *
       A consensus timestamp.
       <p>
       The consensus time of the last transaction that was handled by the node
       within the current block. Only top-level transactions can trigger stake
       period side effects, so we track them separately from the last-used
       time of <i>all</i> transactions, which include children.<br/>
       
      .proto.Timestamp cons_time_of_last_handled_txn = 4;
      Specified by:
      getConsTimeOfLastHandledTxn in interface BlockInfoOrBuilder
      Returns:
      The consTimeOfLastHandledTxn.
    • getMigrationRecordsStreamed

      public boolean getMigrationRecordsStreamed()
       *
       A flag indicating that migration records have been published.
       <p>
       This property SHALL be `false` immediately following a node upgrade<br/>
       This SHALL be set 'true' as migration records, if any, are published.
       Migration records are typically published "during" the first transaction
       handled by the node following startup.
       
      bool migration_records_streamed = 5;
      Specified by:
      getMigrationRecordsStreamed in interface BlockInfoOrBuilder
      Returns:
      The migrationRecordsStreamed.
    • hasFirstConsTimeOfCurrentBlock

      public boolean hasFirstConsTimeOfCurrentBlock()
       *
       A consensus timestamp.
       <p>
       The consensus time of the first transaction in the current block;
       necessary for reconnecting nodes to detect when the current block
       is finished.
       
      .proto.Timestamp first_cons_time_of_current_block = 6;
      Specified by:
      hasFirstConsTimeOfCurrentBlock in interface BlockInfoOrBuilder
      Returns:
      Whether the firstConsTimeOfCurrentBlock field is set.
    • getFirstConsTimeOfCurrentBlock

      public Timestamp getFirstConsTimeOfCurrentBlock()
       *
       A consensus timestamp.
       <p>
       The consensus time of the first transaction in the current block;
       necessary for reconnecting nodes to detect when the current block
       is finished.
       
      .proto.Timestamp first_cons_time_of_current_block = 6;
      Specified by:
      getFirstConsTimeOfCurrentBlock in interface BlockInfoOrBuilder
      Returns:
      The firstConsTimeOfCurrentBlock.
    • hasLastUsedConsTime

      public boolean hasLastUsedConsTime()
       *
       The consensus time of the last transaction that was handled by the node.
       <p>
       This property is how we 'advance the consensus clock'. The node MUST
       continually set this property to the consensus timestamp for the most
       recent transaction completed by the node.
       
      .proto.Timestamp last_used_cons_time = 7;
      Specified by:
      hasLastUsedConsTime in interface BlockInfoOrBuilder
      Returns:
      Whether the lastUsedConsTime field is set.
    • getLastUsedConsTime

      public Timestamp getLastUsedConsTime()
       *
       The consensus time of the last transaction that was handled by the node.
       <p>
       This property is how we 'advance the consensus clock'. The node MUST
       continually set this property to the consensus timestamp for the most
       recent transaction completed by the node.
       
      .proto.Timestamp last_used_cons_time = 7;
      Specified by:
      getLastUsedConsTime in interface BlockInfoOrBuilder
      Returns:
      The lastUsedConsTime.
    • 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 = 8;
      Specified by:
      hasLastIntervalProcessTime in interface BlockInfoOrBuilder
      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 = 8;
      Specified by:
      getLastIntervalProcessTime in interface BlockInfoOrBuilder
      Returns:
      The lastIntervalProcessTime.
    • getPreviousWrappedRecordBlockRootHash

      public com.google.protobuf.ByteString getPreviousWrappedRecordBlockRootHash()
       *
       The root hash of the previous wrapped record block.
       
      bytes previous_wrapped_record_block_root_hash = 10;
      Specified by:
      getPreviousWrappedRecordBlockRootHash in interface BlockInfoOrBuilder
      Returns:
      The previousWrappedRecordBlockRootHash.
    • getWrappedIntermediatePreviousBlockRootHashesList

      public List<com.google.protobuf.ByteString> getWrappedIntermediatePreviousBlockRootHashesList()
       *
       The intermediate hashes, calculated for all historical wrapped
       record blocks, needed for subroot 2 in the block merkle
       tree structure. These hashes SHALL include the minimum required
       wrapped record block root hashes needed to construct subroot 2's
       final state at the end of the previous block.
       
      repeated bytes wrapped_intermediate_previous_block_root_hashes = 11;
      Specified by:
      getWrappedIntermediatePreviousBlockRootHashesList in interface BlockInfoOrBuilder
      Returns:
      A list containing the wrappedIntermediatePreviousBlockRootHashes.
    • getWrappedIntermediatePreviousBlockRootHashesCount

      public int getWrappedIntermediatePreviousBlockRootHashesCount()
       *
       The intermediate hashes, calculated for all historical wrapped
       record blocks, needed for subroot 2 in the block merkle
       tree structure. These hashes SHALL include the minimum required
       wrapped record block root hashes needed to construct subroot 2's
       final state at the end of the previous block.
       
      repeated bytes wrapped_intermediate_previous_block_root_hashes = 11;
      Specified by:
      getWrappedIntermediatePreviousBlockRootHashesCount in interface BlockInfoOrBuilder
      Returns:
      The count of wrappedIntermediatePreviousBlockRootHashes.
    • getWrappedIntermediatePreviousBlockRootHashes

      public com.google.protobuf.ByteString getWrappedIntermediatePreviousBlockRootHashes(int index)
       *
       The intermediate hashes, calculated for all historical wrapped
       record blocks, needed for subroot 2 in the block merkle
       tree structure. These hashes SHALL include the minimum required
       wrapped record block root hashes needed to construct subroot 2's
       final state at the end of the previous block.
       
      repeated bytes wrapped_intermediate_previous_block_root_hashes = 11;
      Specified by:
      getWrappedIntermediatePreviousBlockRootHashes in interface BlockInfoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The wrappedIntermediatePreviousBlockRootHashes at the given index.
    • getWrappedIntermediateBlockRootsLeafCount

      public long getWrappedIntermediateBlockRootsLeafCount()
       *
       The number of leaves in the intermediate wrapped record block
       roots subtree.
       
      uint64 wrapped_intermediate_block_roots_leaf_count = 12;
      Specified by:
      getWrappedIntermediateBlockRootsLeafCount in interface BlockInfoOrBuilder
      Returns:
      The wrappedIntermediateBlockRootsLeafCount.
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static BlockInfo.Builder newBuilder()
    • newBuilder

      public static BlockInfo.Builder newBuilder(BlockInfo 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<BlockInfo,BlockInfo.Builder>
    • getDefaultInstance

      public static BlockInfo getDefaultInstance()
    • parser

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