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-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class* Information for a transaction block.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite, Type>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageLite
unknownFieldsFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionprotected final ObjectdynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) com.google.protobuf.ByteString* 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.* A consensus timestamp.static BlockInfo* A consensus timestamp.* A consensus timestamp.long* A block number.* The time stamp at which the last interval process was done.* The consensus time of the last transaction that was handled by the node.boolean* A flag indicating that migration records have been published.com.google.protobuf.ByteString* The root hash of the previous wrapped record block.long* The number of leaves in the intermediate wrapped record block roots subtree.com.google.protobuf.ByteString* The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure.int* The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure.List<com.google.protobuf.ByteString> * The intermediate hashes, calculated for all historical wrapped record blocks, needed for subroot 2 in the block merkle tree structure.boolean* A consensus timestamp.boolean* A consensus timestamp.boolean* A consensus timestamp.boolean* The time stamp at which the last interval process was done.boolean* The consensus time of the last transaction that was handled by the node.static BlockInfo.Builderstatic BlockInfo.BuildernewBuilder(BlockInfo prototype) static BlockInfoparseDelimitedFrom(InputStream input) static BlockInfoparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static BlockInfoparseFrom(byte[] data) static BlockInfoparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static BlockInfoparseFrom(com.google.protobuf.ByteString data) static BlockInfoparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static BlockInfoparseFrom(com.google.protobuf.CodedInputStream input) static BlockInfoparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static BlockInfoparseFrom(InputStream input) static BlockInfoparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static BlockInfoparseFrom(ByteBuffer data) static BlockInfoparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<BlockInfo> parser()Methods inherited from class com.google.protobuf.GeneratedMessageLite
createBuilder, createBuilder, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeToMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
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:
getLastBlockNumberin interfaceBlockInfoOrBuilder- 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:
hasFirstConsTimeOfLastBlockin interfaceBlockInfoOrBuilder- Returns:
- Whether the firstConsTimeOfLastBlock field is set.
-
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:
getFirstConsTimeOfLastBlockin interfaceBlockInfoOrBuilder- 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:
getBlockHashesin interfaceBlockInfoOrBuilder- 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:
hasConsTimeOfLastHandledTxnin interfaceBlockInfoOrBuilder- Returns:
- Whether the consTimeOfLastHandledTxn field is set.
-
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:
getConsTimeOfLastHandledTxnin interfaceBlockInfoOrBuilder- 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:
getMigrationRecordsStreamedin interfaceBlockInfoOrBuilder- 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:
hasFirstConsTimeOfCurrentBlockin interfaceBlockInfoOrBuilder- Returns:
- Whether the firstConsTimeOfCurrentBlock field is set.
-
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:
getFirstConsTimeOfCurrentBlockin interfaceBlockInfoOrBuilder- 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:
hasLastUsedConsTimein interfaceBlockInfoOrBuilder- Returns:
- Whether the lastUsedConsTime field is set.
-
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:
getLastUsedConsTimein interfaceBlockInfoOrBuilder- 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:
hasLastIntervalProcessTimein interfaceBlockInfoOrBuilder- Returns:
- Whether the lastIntervalProcessTime field is set.
-
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:
getLastIntervalProcessTimein interfaceBlockInfoOrBuilder- 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:
getPreviousWrappedRecordBlockRootHashin interfaceBlockInfoOrBuilder- Returns:
- The previousWrappedRecordBlockRootHash.
-
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:
getWrappedIntermediatePreviousBlockRootHashesListin interfaceBlockInfoOrBuilder- 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:
getWrappedIntermediatePreviousBlockRootHashesCountin interfaceBlockInfoOrBuilder- 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:
getWrappedIntermediatePreviousBlockRootHashesin interfaceBlockInfoOrBuilder- 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:
getWrappedIntermediateBlockRootsLeafCountin interfaceBlockInfoOrBuilder- 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
- Throws:
IOException
-
parseFrom
public static BlockInfo parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static BlockInfo parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static BlockInfo parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethodin classcom.google.protobuf.GeneratedMessageLite<BlockInfo,BlockInfo.Builder>
-
getDefaultInstance
-
parser
-