public static final class LedgerInfoOuterClass.LedgerInfo.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<LedgerInfoOuterClass.LedgerInfo.Builder> 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 | Method and Description |
|---|---|
LedgerInfoOuterClass.LedgerInfo.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
LedgerInfoOuterClass.LedgerInfo |
build() |
LedgerInfoOuterClass.LedgerInfo |
buildPartial() |
LedgerInfoOuterClass.LedgerInfo.Builder |
clear() |
LedgerInfoOuterClass.LedgerInfo.Builder |
clearConsensusBlockId()
The block id of the last committed block corresponding to this ledger info.
|
LedgerInfoOuterClass.LedgerInfo.Builder |
clearConsensusDataHash()
Hash of consensus-specific data that is opaque to all parts of the system
other than consensus.
|
LedgerInfoOuterClass.LedgerInfo.Builder |
clearEpochNum()
Epoch number corresponds to the set of validators that are active for this
ledger info.
|
LedgerInfoOuterClass.LedgerInfo.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
LedgerInfoOuterClass.LedgerInfo.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
LedgerInfoOuterClass.LedgerInfo.Builder |
clearTimestampUsecs()
Timestamp that represents the microseconds since the epoch (unix time) that is
generated by the proposer of the block.
|
LedgerInfoOuterClass.LedgerInfo.Builder |
clearTransactionAccumulatorHash()
Root hash of transaction accumulator at this version
|
LedgerInfoOuterClass.LedgerInfo.Builder |
clearVersion()
Current latest version of the system
|
LedgerInfoOuterClass.LedgerInfo.Builder |
clone() |
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.
|
LedgerInfoOuterClass.LedgerInfo |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
long |
getEpochNum()
Epoch number corresponds to the set of validators that are active for this
ledger info.
|
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
|
long |
getVersion()
Current latest version of the system
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
LedgerInfoOuterClass.LedgerInfo.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
LedgerInfoOuterClass.LedgerInfo.Builder |
mergeFrom(LedgerInfoOuterClass.LedgerInfo other) |
LedgerInfoOuterClass.LedgerInfo.Builder |
mergeFrom(com.google.protobuf.Message other) |
LedgerInfoOuterClass.LedgerInfo.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
LedgerInfoOuterClass.LedgerInfo.Builder |
setConsensusBlockId(com.google.protobuf.ByteString value)
The block id of the last committed block corresponding to this ledger info.
|
LedgerInfoOuterClass.LedgerInfo.Builder |
setConsensusDataHash(com.google.protobuf.ByteString value)
Hash of consensus-specific data that is opaque to all parts of the system
other than consensus.
|
LedgerInfoOuterClass.LedgerInfo.Builder |
setEpochNum(long value)
Epoch number corresponds to the set of validators that are active for this
ledger info.
|
LedgerInfoOuterClass.LedgerInfo.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
LedgerInfoOuterClass.LedgerInfo.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
LedgerInfoOuterClass.LedgerInfo.Builder |
setTimestampUsecs(long value)
Timestamp that represents the microseconds since the epoch (unix time) that is
generated by the proposer of the block.
|
LedgerInfoOuterClass.LedgerInfo.Builder |
setTransactionAccumulatorHash(com.google.protobuf.ByteString value)
Root hash of transaction accumulator at this version
|
LedgerInfoOuterClass.LedgerInfo.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
LedgerInfoOuterClass.LedgerInfo.Builder |
setVersion(long value)
Current latest version of the system
|
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>public LedgerInfoOuterClass.LedgerInfo.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>public LedgerInfoOuterClass.LedgerInfo getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic LedgerInfoOuterClass.LedgerInfo build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic LedgerInfoOuterClass.LedgerInfo buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic LedgerInfoOuterClass.LedgerInfo.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>public LedgerInfoOuterClass.LedgerInfo.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>public LedgerInfoOuterClass.LedgerInfo.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>public LedgerInfoOuterClass.LedgerInfo.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>public LedgerInfoOuterClass.LedgerInfo.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>public LedgerInfoOuterClass.LedgerInfo.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>public LedgerInfoOuterClass.LedgerInfo.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>public LedgerInfoOuterClass.LedgerInfo.Builder mergeFrom(LedgerInfoOuterClass.LedgerInfo other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>public LedgerInfoOuterClass.LedgerInfo.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>IOExceptionpublic long getVersion()
Current latest version of the system
uint64 version = 1;getVersion in interface LedgerInfoOuterClass.LedgerInfoOrBuilderpublic LedgerInfoOuterClass.LedgerInfo.Builder setVersion(long value)
Current latest version of the system
uint64 version = 1;public LedgerInfoOuterClass.LedgerInfo.Builder clearVersion()
Current latest version of the system
uint64 version = 1;public com.google.protobuf.ByteString getTransactionAccumulatorHash()
Root hash of transaction accumulator at this version
bytes transaction_accumulator_hash = 2;getTransactionAccumulatorHash in interface LedgerInfoOuterClass.LedgerInfoOrBuilderpublic LedgerInfoOuterClass.LedgerInfo.Builder setTransactionAccumulatorHash(com.google.protobuf.ByteString value)
Root hash of transaction accumulator at this version
bytes transaction_accumulator_hash = 2;public LedgerInfoOuterClass.LedgerInfo.Builder clearTransactionAccumulatorHash()
Root hash of transaction accumulator at this version
bytes transaction_accumulator_hash = 2;public 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 LedgerInfoOuterClass.LedgerInfo.Builder setConsensusDataHash(com.google.protobuf.ByteString value)
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;public LedgerInfoOuterClass.LedgerInfo.Builder clearConsensusDataHash()
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;public 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 LedgerInfoOuterClass.LedgerInfo.Builder setConsensusBlockId(com.google.protobuf.ByteString value)
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;public LedgerInfoOuterClass.LedgerInfo.Builder clearConsensusBlockId()
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;public 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 LedgerInfoOuterClass.LedgerInfo.Builder setEpochNum(long value)
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;public LedgerInfoOuterClass.LedgerInfo.Builder clearEpochNum()
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;public 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 LedgerInfoOuterClass.LedgerInfo.Builder setTimestampUsecs(long value)
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;public LedgerInfoOuterClass.LedgerInfo.Builder clearTimestampUsecs()
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;public final LedgerInfoOuterClass.LedgerInfo.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>public final LedgerInfoOuterClass.LedgerInfo.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<LedgerInfoOuterClass.LedgerInfo.Builder>Copyright © 2019. All rights reserved.