public static final class LedgerInfoOuterClass.LedgerInfo extends com.google.protobuf.GeneratedMessageV3 implements LedgerInfoOuterClass.LedgerInfoOrBuilder
/ Even though we don't always need all hashes, we pass them in and return them / always so that we keep them in sync on the client and don't make the client / worry about which one(s) to pass in which cases / / This structure serves a dual purpose. / / First, if this structure is signed by 2f+1 validators it signifies the state / of the ledger at version `version` -- it contains the transaction / accumulator at that version which commits to all historical transactions. / This structure may be expanded to include other information that is derived / from that accumulator (e.g. the current time according to the time contract) / to reduce the number of proofs a client must get. / / Second, the structure contains a `consensus_data_hash` value. This is the / hash of an internal data structure that represents a block that is voted on / by consensus. / / Combining these two concepts when the consensus algorithm votes on a block B / it votes for a LedgerInfo with the `version` being the latest version that / will be committed if B gets 2f+1 votes. It sets `consensus_data_hash` to / represent B so that if those 2f+1 votes are gathered, the block is valid to / commitProtobuf type
types.LedgerInfo| Modifier and Type | Class and Description |
|---|---|
static class |
LedgerInfoOuterClass.LedgerInfo.Builder
/ Even though we don't always need all hashes, we pass them in and return them
/ always so that we keep them in sync on the client and don't make the client
/ worry about which one(s) to pass in which cases
/
/ This structure serves a dual purpose.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable| Modifier and Type | Field and Description |
|---|---|
static int |
CONSENSUS_BLOCK_ID_FIELD_NUMBER |
static int |
CONSENSUS_DATA_HASH_FIELD_NUMBER |
static int |
EPOCH_NUM_FIELD_NUMBER |
static int |
TIMESTAMP_USECS_FIELD_NUMBER |
static int |
TRANSACTION_ACCUMULATOR_HASH_FIELD_NUMBER |
static int |
VERSION_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
com.google.protobuf.ByteString |
getConsensusBlockId()
The block id of the last committed block corresponding to this ledger info.
|
com.google.protobuf.ByteString |
getConsensusDataHash()
Hash of consensus-specific data that is opaque to all parts of the system
other than consensus.
|
static LedgerInfoOuterClass.LedgerInfo |
getDefaultInstance() |
LedgerInfoOuterClass.LedgerInfo |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
long |
getEpochNum()
Epoch number corresponds to the set of validators that are active for this
ledger info.
|
com.google.protobuf.Parser<LedgerInfoOuterClass.LedgerInfo> |
getParserForType() |
int |
getSerializedSize() |
long |
getTimestampUsecs()
Timestamp that represents the microseconds since the epoch (unix time) that is
generated by the proposer of the block.
|
com.google.protobuf.ByteString |
getTransactionAccumulatorHash()
Root hash of transaction accumulator at this version
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
long |
getVersion()
Current latest version of the system
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static LedgerInfoOuterClass.LedgerInfo.Builder |
newBuilder() |
static LedgerInfoOuterClass.LedgerInfo.Builder |
newBuilder(LedgerInfoOuterClass.LedgerInfo prototype) |
LedgerInfoOuterClass.LedgerInfo.Builder |
newBuilderForType() |
protected LedgerInfoOuterClass.LedgerInfo.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
static LedgerInfoOuterClass.LedgerInfo |
parseDelimitedFrom(InputStream input) |
static LedgerInfoOuterClass.LedgerInfo |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LedgerInfoOuterClass.LedgerInfo |
parseFrom(byte[] data) |
static LedgerInfoOuterClass.LedgerInfo |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LedgerInfoOuterClass.LedgerInfo |
parseFrom(ByteBuffer data) |
static LedgerInfoOuterClass.LedgerInfo |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LedgerInfoOuterClass.LedgerInfo |
parseFrom(com.google.protobuf.ByteString data) |
static LedgerInfoOuterClass.LedgerInfo |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LedgerInfoOuterClass.LedgerInfo |
parseFrom(com.google.protobuf.CodedInputStream input) |
static LedgerInfoOuterClass.LedgerInfo |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LedgerInfoOuterClass.LedgerInfo |
parseFrom(InputStream input) |
static LedgerInfoOuterClass.LedgerInfo |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<LedgerInfoOuterClass.LedgerInfo> |
parser() |
LedgerInfoOuterClass.LedgerInfo.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int VERSION_FIELD_NUMBER
public static final int TRANSACTION_ACCUMULATOR_HASH_FIELD_NUMBER
public static final int CONSENSUS_DATA_HASH_FIELD_NUMBER
public static final int CONSENSUS_BLOCK_ID_FIELD_NUMBER
public static final int EPOCH_NUM_FIELD_NUMBER
public static final int TIMESTAMP_USECS_FIELD_NUMBER
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public long getVersion()
Current latest version of the system
uint64 version = 1;getVersion in interface LedgerInfoOuterClass.LedgerInfoOrBuilderpublic com.google.protobuf.ByteString getTransactionAccumulatorHash()
Root hash of transaction accumulator at this version
bytes transaction_accumulator_hash = 2;getTransactionAccumulatorHash in interface LedgerInfoOuterClass.LedgerInfoOrBuilderpublic com.google.protobuf.ByteString getConsensusDataHash()
Hash of consensus-specific data that is opaque to all parts of the system other than consensus. This is needed to verify signatures because consensus signing includes this hash
bytes consensus_data_hash = 3;getConsensusDataHash in interface LedgerInfoOuterClass.LedgerInfoOrBuilderpublic com.google.protobuf.ByteString getConsensusBlockId()
The block id of the last committed block corresponding to this ledger info. This field is not particularly interesting to the clients, but can be used by the validators for synchronization.
bytes consensus_block_id = 4;getConsensusBlockId in interface LedgerInfoOuterClass.LedgerInfoOrBuilderpublic long getEpochNum()
Epoch number corresponds to the set of validators that are active for this ledger info. The main motivation for keeping the epoch number in the LedgerInfo is to ensure that the client has enough information to verify that the signatures for this info are coming from the validators that indeed form a quorum. Without epoch number a potential attack could reuse the signatures from the validators in one epoch in order to sign the wrong info belonging to another epoch, in which these validators do not form a quorum. The very first epoch number is 0.
uint64 epoch_num = 5;getEpochNum in interface LedgerInfoOuterClass.LedgerInfoOrBuilderpublic long getTimestampUsecs()
Timestamp that represents the microseconds since the epoch (unix time) that is generated by the proposer of the block. This is strictly increasing with every block. If a client reads a timestamp > the one they specified for transaction expiration time, they can be certain that their transaction will never be included in a block in the future (assuming that their transaction has not yet been included)
uint64 timestamp_usecs = 6;getTimestampUsecs in interface LedgerInfoOuterClass.LedgerInfoOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static LedgerInfoOuterClass.LedgerInfo parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LedgerInfoOuterClass.LedgerInfo parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LedgerInfoOuterClass.LedgerInfo parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LedgerInfoOuterClass.LedgerInfo parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LedgerInfoOuterClass.LedgerInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LedgerInfoOuterClass.LedgerInfo parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LedgerInfoOuterClass.LedgerInfo parseFrom(InputStream input) throws IOException
IOExceptionpublic static LedgerInfoOuterClass.LedgerInfo parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static LedgerInfoOuterClass.LedgerInfo parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static LedgerInfoOuterClass.LedgerInfo parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static LedgerInfoOuterClass.LedgerInfo parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static LedgerInfoOuterClass.LedgerInfo parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic LedgerInfoOuterClass.LedgerInfo.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static LedgerInfoOuterClass.LedgerInfo.Builder newBuilder()
public static LedgerInfoOuterClass.LedgerInfo.Builder newBuilder(LedgerInfoOuterClass.LedgerInfo prototype)
public LedgerInfoOuterClass.LedgerInfo.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected LedgerInfoOuterClass.LedgerInfo.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static LedgerInfoOuterClass.LedgerInfo getDefaultInstance()
public static com.google.protobuf.Parser<LedgerInfoOuterClass.LedgerInfo> parser()
public com.google.protobuf.Parser<LedgerInfoOuterClass.LedgerInfo> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public LedgerInfoOuterClass.LedgerInfo getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2019. All rights reserved.