com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tss_vote.proto
// Protobuf Java Version: 3.25.4
package com.hedera.hapi.services.auxiliary.tss.legacy;
/**
*
**
* A transaction body to vote on the validity of Threshold Signature Scheme
* (TSS) Messages for a candidate roster.
*
* - A `TssVoteTransactionBody` MUST identify the hash of the roster containing
* the node generating this TssVote
* - A `TssVoteTransactionBody` MUST identify the hash of the roster that the
* TSS messages is for
* - If the candidate roster has received enough yes votes, the candidate
* roster SHALL be adopted.
* - Switching to the candidate roster MUST not happen until enough nodes have
* voted that they have verified a threshold number of TSS messages from the
* active roster.
* - A vote consists of a bit vector of message statuses where each bit
* corresponds to the order of TssMessages as they have come through
* consensus.
* - The threshold for votes to adopt a candidate roster SHALL be at least 1/3
* of the consensus weight of the active roster to ensure that at least 1
* honest node has validated the TSS key material.
*
*
* Protobuf type {@code com.hedera.hapi.services.auxiliary.tss.TssVoteTransactionBody}
*/
public final class TssVoteTransactionBody extends
com.google.protobuf.GeneratedMessageLite<
TssVoteTransactionBody, TssVoteTransactionBody.Builder> implements
// @@protoc_insertion_point(message_implements:com.hedera.hapi.services.auxiliary.tss.TssVoteTransactionBody)
TssVoteTransactionBodyOrBuilder {
private TssVoteTransactionBody() {
sourceRosterHash_ = com.google.protobuf.ByteString.EMPTY;
targetRosterHash_ = com.google.protobuf.ByteString.EMPTY;
ledgerId_ = com.google.protobuf.ByteString.EMPTY;
nodeSignature_ = com.google.protobuf.ByteString.EMPTY;
tssVote_ = com.google.protobuf.ByteString.EMPTY;
}
public static final int SOURCE_ROSTER_HASH_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString sourceRosterHash_;
/**
*
**
* A hash of the roster containing the node generating this TssVote.
*
*
* bytes source_roster_hash = 1;
* @return The sourceRosterHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSourceRosterHash() {
return sourceRosterHash_;
}
/**
*
**
* A hash of the roster containing the node generating this TssVote.
*
*
* bytes source_roster_hash = 1;
* @param value The sourceRosterHash to set.
*/
private void setSourceRosterHash(com.google.protobuf.ByteString value) {
java.lang.Class> valueClass = value.getClass();
sourceRosterHash_ = value;
}
/**
*
**
* A hash of the roster containing the node generating this TssVote.
*
*
* bytes source_roster_hash = 1;
*/
private void clearSourceRosterHash() {
sourceRosterHash_ = getDefaultInstance().getSourceRosterHash();
}
public static final int TARGET_ROSTER_HASH_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString targetRosterHash_;
/**
*
**
* A hash of the roster that this TssVote is for.
*
*
* bytes target_roster_hash = 2;
* @return The targetRosterHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTargetRosterHash() {
return targetRosterHash_;
}
/**
*
**
* A hash of the roster that this TssVote is for.
*
*
* bytes target_roster_hash = 2;
* @param value The targetRosterHash to set.
*/
private void setTargetRosterHash(com.google.protobuf.ByteString value) {
java.lang.Class> valueClass = value.getClass();
targetRosterHash_ = value;
}
/**
*
**
* A hash of the roster that this TssVote is for.
*
*
* bytes target_roster_hash = 2;
*/
private void clearTargetRosterHash() {
targetRosterHash_ = getDefaultInstance().getTargetRosterHash();
}
public static final int LEDGER_ID_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString ledgerId_;
/**
*
**
* An identifier (and public key) computed from the TssMessages for the target
* roster.
*
*
* bytes ledger_id = 3;
* @return The ledgerId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLedgerId() {
return ledgerId_;
}
/**
*
**
* An identifier (and public key) computed from the TssMessages for the target
* roster.
*
*
* bytes ledger_id = 3;
* @param value The ledgerId to set.
*/
private void setLedgerId(com.google.protobuf.ByteString value) {
java.lang.Class> valueClass = value.getClass();
ledgerId_ = value;
}
/**
*
**
* An identifier (and public key) computed from the TssMessages for the target
* roster.
*
*
* bytes ledger_id = 3;
*/
private void clearLedgerId() {
ledgerId_ = getDefaultInstance().getLedgerId();
}
public static final int NODE_SIGNATURE_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString nodeSignature_;
/**
*
**
* A signature produced by the node.
* <p>
* This signature SHALL be produced using the node RSA signing key to sign
* the ledger_id.<br/>
* This signature SHALL be used to establish a chain of trust in the ledger id.
*
*
* bytes node_signature = 4;
* @return The nodeSignature.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNodeSignature() {
return nodeSignature_;
}
/**
*
**
* A signature produced by the node.
* <p>
* This signature SHALL be produced using the node RSA signing key to sign
* the ledger_id.<br/>
* This signature SHALL be used to establish a chain of trust in the ledger id.
*
*
* bytes node_signature = 4;
* @param value The nodeSignature to set.
*/
private void setNodeSignature(com.google.protobuf.ByteString value) {
java.lang.Class> valueClass = value.getClass();
nodeSignature_ = value;
}
/**
*
**
* A signature produced by the node.
* <p>
* This signature SHALL be produced using the node RSA signing key to sign
* the ledger_id.<br/>
* This signature SHALL be used to establish a chain of trust in the ledger id.
*
*
* bytes node_signature = 4;
*/
private void clearNodeSignature() {
nodeSignature_ = getDefaultInstance().getNodeSignature();
}
public static final int TSS_VOTE_FIELD_NUMBER = 5;
private com.google.protobuf.ByteString tssVote_;
/**
*
**
* A bit vector of message statuses.
* <p>
* #### Example
* <ul><li>The least significant bit of byte[0] SHALL be the 0th item in the sequence.</li>
* <li>The most significant bit of byte[0] SHALL be the 7th item in the sequence.</li>
* <li>The least significant bit of byte[1] SHALL be the 8th item in the sequence.</li>
* <li>The most significant bit of byte[1] SHALL be the 15th item in the sequence.</li>
* </ul>
* A bit SHALL be set if the `TssMessage` for the `TssMessageTransaction`
* with a sequence number matching that bit index has been
* received, and is valid.<br/>
* A bit SHALL NOT be set if the `TssMessage` has not been received or was
* received but not valid.
*
*
* bytes tss_vote = 5;
* @return The tssVote.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTssVote() {
return tssVote_;
}
/**
*
**
* A bit vector of message statuses.
* <p>
* #### Example
* <ul><li>The least significant bit of byte[0] SHALL be the 0th item in the sequence.</li>
* <li>The most significant bit of byte[0] SHALL be the 7th item in the sequence.</li>
* <li>The least significant bit of byte[1] SHALL be the 8th item in the sequence.</li>
* <li>The most significant bit of byte[1] SHALL be the 15th item in the sequence.</li>
* </ul>
* A bit SHALL be set if the `TssMessage` for the `TssMessageTransaction`
* with a sequence number matching that bit index has been
* received, and is valid.<br/>
* A bit SHALL NOT be set if the `TssMessage` has not been received or was
* received but not valid.
*
*
* bytes tss_vote = 5;
* @param value The tssVote to set.
*/
private void setTssVote(com.google.protobuf.ByteString value) {
java.lang.Class> valueClass = value.getClass();
tssVote_ = value;
}
/**
*
**
* A bit vector of message statuses.
* <p>
* #### Example
* <ul><li>The least significant bit of byte[0] SHALL be the 0th item in the sequence.</li>
* <li>The most significant bit of byte[0] SHALL be the 7th item in the sequence.</li>
* <li>The least significant bit of byte[1] SHALL be the 8th item in the sequence.</li>
* <li>The most significant bit of byte[1] SHALL be the 15th item in the sequence.</li>
* </ul>
* A bit SHALL be set if the `TssMessage` for the `TssMessageTransaction`
* with a sequence number matching that bit index has been
* received, and is valid.<br/>
* A bit SHALL NOT be set if the `TssMessage` has not been received or was
* received but not valid.
*
*
* bytes tss_vote = 5;
*/
private void clearTssVote() {
tssVote_ = getDefaultInstance().getTssVote();
}
public static com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
*
**
* A transaction body to vote on the validity of Threshold Signature Scheme
* (TSS) Messages for a candidate roster.
*
* - A `TssVoteTransactionBody` MUST identify the hash of the roster containing
* the node generating this TssVote
* - A `TssVoteTransactionBody` MUST identify the hash of the roster that the
* TSS messages is for
* - If the candidate roster has received enough yes votes, the candidate
* roster SHALL be adopted.
* - Switching to the candidate roster MUST not happen until enough nodes have
* voted that they have verified a threshold number of TSS messages from the
* active roster.
* - A vote consists of a bit vector of message statuses where each bit
* corresponds to the order of TssMessages as they have come through
* consensus.
* - The threshold for votes to adopt a candidate roster SHALL be at least 1/3
* of the consensus weight of the active roster to ensure that at least 1
* honest node has validated the TSS key material.
*
*
* Protobuf type {@code com.hedera.hapi.services.auxiliary.tss.TssVoteTransactionBody}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody, Builder> implements
// @@protoc_insertion_point(builder_implements:com.hedera.hapi.services.auxiliary.tss.TssVoteTransactionBody)
com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBodyOrBuilder {
// Construct using com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
**
* A hash of the roster containing the node generating this TssVote.
*
*
* bytes source_roster_hash = 1;
* @return The sourceRosterHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSourceRosterHash() {
return instance.getSourceRosterHash();
}
/**
*
**
* A hash of the roster containing the node generating this TssVote.
*
*
* bytes source_roster_hash = 1;
* @param value The sourceRosterHash to set.
* @return This builder for chaining.
*/
public Builder setSourceRosterHash(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setSourceRosterHash(value);
return this;
}
/**
*
**
* A hash of the roster containing the node generating this TssVote.
*
*
* bytes source_roster_hash = 1;
* @return This builder for chaining.
*/
public Builder clearSourceRosterHash() {
copyOnWrite();
instance.clearSourceRosterHash();
return this;
}
/**
*
**
* A hash of the roster that this TssVote is for.
*
*
* bytes target_roster_hash = 2;
* @return The targetRosterHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTargetRosterHash() {
return instance.getTargetRosterHash();
}
/**
*
**
* A hash of the roster that this TssVote is for.
*
*
* bytes target_roster_hash = 2;
* @param value The targetRosterHash to set.
* @return This builder for chaining.
*/
public Builder setTargetRosterHash(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setTargetRosterHash(value);
return this;
}
/**
*
**
* A hash of the roster that this TssVote is for.
*
*
* bytes target_roster_hash = 2;
* @return This builder for chaining.
*/
public Builder clearTargetRosterHash() {
copyOnWrite();
instance.clearTargetRosterHash();
return this;
}
/**
*
**
* An identifier (and public key) computed from the TssMessages for the target
* roster.
*
*
* bytes ledger_id = 3;
* @return The ledgerId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLedgerId() {
return instance.getLedgerId();
}
/**
*
**
* An identifier (and public key) computed from the TssMessages for the target
* roster.
*
*
* bytes ledger_id = 3;
* @param value The ledgerId to set.
* @return This builder for chaining.
*/
public Builder setLedgerId(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setLedgerId(value);
return this;
}
/**
*
**
* An identifier (and public key) computed from the TssMessages for the target
* roster.
*
*
* bytes ledger_id = 3;
* @return This builder for chaining.
*/
public Builder clearLedgerId() {
copyOnWrite();
instance.clearLedgerId();
return this;
}
/**
*
**
* A signature produced by the node.
* <p>
* This signature SHALL be produced using the node RSA signing key to sign
* the ledger_id.<br/>
* This signature SHALL be used to establish a chain of trust in the ledger id.
*
*
* bytes node_signature = 4;
* @return The nodeSignature.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNodeSignature() {
return instance.getNodeSignature();
}
/**
*
**
* A signature produced by the node.
* <p>
* This signature SHALL be produced using the node RSA signing key to sign
* the ledger_id.<br/>
* This signature SHALL be used to establish a chain of trust in the ledger id.
*
*
* bytes node_signature = 4;
* @param value The nodeSignature to set.
* @return This builder for chaining.
*/
public Builder setNodeSignature(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setNodeSignature(value);
return this;
}
/**
*
**
* A signature produced by the node.
* <p>
* This signature SHALL be produced using the node RSA signing key to sign
* the ledger_id.<br/>
* This signature SHALL be used to establish a chain of trust in the ledger id.
*
*
* bytes node_signature = 4;
* @return This builder for chaining.
*/
public Builder clearNodeSignature() {
copyOnWrite();
instance.clearNodeSignature();
return this;
}
/**
*
**
* A bit vector of message statuses.
* <p>
* #### Example
* <ul><li>The least significant bit of byte[0] SHALL be the 0th item in the sequence.</li>
* <li>The most significant bit of byte[0] SHALL be the 7th item in the sequence.</li>
* <li>The least significant bit of byte[1] SHALL be the 8th item in the sequence.</li>
* <li>The most significant bit of byte[1] SHALL be the 15th item in the sequence.</li>
* </ul>
* A bit SHALL be set if the `TssMessage` for the `TssMessageTransaction`
* with a sequence number matching that bit index has been
* received, and is valid.<br/>
* A bit SHALL NOT be set if the `TssMessage` has not been received or was
* received but not valid.
*
*
* bytes tss_vote = 5;
* @return The tssVote.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTssVote() {
return instance.getTssVote();
}
/**
*
**
* A bit vector of message statuses.
* <p>
* #### Example
* <ul><li>The least significant bit of byte[0] SHALL be the 0th item in the sequence.</li>
* <li>The most significant bit of byte[0] SHALL be the 7th item in the sequence.</li>
* <li>The least significant bit of byte[1] SHALL be the 8th item in the sequence.</li>
* <li>The most significant bit of byte[1] SHALL be the 15th item in the sequence.</li>
* </ul>
* A bit SHALL be set if the `TssMessage` for the `TssMessageTransaction`
* with a sequence number matching that bit index has been
* received, and is valid.<br/>
* A bit SHALL NOT be set if the `TssMessage` has not been received or was
* received but not valid.
*
*
* bytes tss_vote = 5;
* @param value The tssVote to set.
* @return This builder for chaining.
*/
public Builder setTssVote(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setTssVote(value);
return this;
}
/**
*
**
* A bit vector of message statuses.
* <p>
* #### Example
* <ul><li>The least significant bit of byte[0] SHALL be the 0th item in the sequence.</li>
* <li>The most significant bit of byte[0] SHALL be the 7th item in the sequence.</li>
* <li>The least significant bit of byte[1] SHALL be the 8th item in the sequence.</li>
* <li>The most significant bit of byte[1] SHALL be the 15th item in the sequence.</li>
* </ul>
* A bit SHALL be set if the `TssMessage` for the `TssMessageTransaction`
* with a sequence number matching that bit index has been
* received, and is valid.<br/>
* A bit SHALL NOT be set if the `TssMessage` has not been received or was
* received but not valid.
*
*
* bytes tss_vote = 5;
* @return This builder for chaining.
*/
public Builder clearTssVote() {
copyOnWrite();
instance.clearTssVote();
return this;
}
// @@protoc_insertion_point(builder_scope:com.hedera.hapi.services.auxiliary.tss.TssVoteTransactionBody)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"sourceRosterHash_",
"targetRosterHash_",
"ledgerId_",
"nodeSignature_",
"tssVote_",
};
java.lang.String info =
"\u0000\u0005\u0000\u0000\u0001\u0005\u0005\u0000\u0000\u0000\u0001\n\u0002\n\u0003" +
"\n\u0004\n\u0005\n";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:com.hedera.hapi.services.auxiliary.tss.TssVoteTransactionBody)
private static final com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody DEFAULT_INSTANCE;
static {
TssVoteTransactionBody defaultInstance = new TssVoteTransactionBody();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
TssVoteTransactionBody.class, defaultInstance);
}
public static com.hedera.hapi.services.auxiliary.tss.legacy.TssVoteTransactionBody getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}