All Downloads are FREE. Search and download functionalities are using the official Maven repository.

stream.output.consensus_service.proto Maven / Gradle / Ivy

There is a newer version: 0.54.0
Show newest version
/**
 * # Consensus Service
 * Block stream messages that report the results of transactions handled
 * by the `Consensus` service.
 *
 * ### Topic Running Hash Calculation
 * Submitted messages include a topic running hash. This value has changed
 * over time, with the known versions detailed in the `RunningHashVersion`
 * enumeration.
 *
 * ### Keywords
 * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
 * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
 * document are to be interpreted as described in
 * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in
 * [RFC8174](https://www.ietf.org/rfc/rfc8174).
 */
syntax = "proto3";

package com.hedera.hapi.block.stream.output;

/*
 * Copyright (C) 2024 Hedera Hashgraph, LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

option java_package = "com.hedera.hapi.block.stream.output.protoc";
// <<>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;

/**
 * Block Stream data for a `createTopic` transaction.
 *
 * This message SHALL NOT duplicate information already contained in the
 * original transaction.
 */
message CreateTopicOutput {}

/**
 * Block Stream data for a `updateTopic` transaction.
 *
 * This message SHALL NOT duplicate information already contained in the
 * original transaction.
 */
message UpdateTopicOutput {}

/**
 * Block Stream data for a `deleteTopic` transaction.
 *
 * This message SHALL NOT duplicate information already contained in the
 * original transaction.
 */
message DeleteTopicOutput {}

/**
 * Block Stream data for a `submitMessage` transaction.
 *
 * This message SHALL NOT duplicate information already contained in the
 * original transaction.
* The actual topic running hash SHALL be present in a `StateChanges` block * item, and is not duplicated here. */ message SubmitMessageOutput {} /** * A version of the topic running hash. * * The inputs to the topic running hash have changed over time. * This is tracked in earlier record streams as an integer. For the * block stream we chose to use an enumeration for both efficiency * and clarity. Placing the most recent, and most common/highest * volume, version as `0` reduces the serialized size of this message * by not serializing that default value. * *
* * The topic running hash is a 48-byte value that is the output * of a hash digest with input data determined by the value of * the `topic_running_hash_version` field.
* All new transactions SHALL use `topic_running_hash_version` * `WITH_MESSAGE_DIGEST_AND_PAYER`.
*/ enum RunningHashVersion { /** * The most recent version. *

* This version SHALL include, in order *

    *
  1. The previous running hash of the topic (48 bytes)
  2. *
  3. The `topic_running_hash_version` field (8 bytes)
  4. *
  5. The payer account's shard (8 bytes)
  6. *
  7. The payer account's realm (8 bytes)
  8. *
  9. The payer account's number (8 bytes)
  10. *
  11. The topic's shard (8 bytes)
  12. *
  13. The topic's realm (8 bytes)
  14. *
  15. The topic's number (8 bytes)
  16. *
  17. The number of seconds since the epoch when the * `ConsensusSubmitMessage` reached consensus (8 bytes)
  18. *
  19. The number of nanoseconds within the second when the * `ConsensusSubmitMessage` reached consensus (4 bytes)
  20. *
  21. The `topic_sequence_number` field (8 bytes)
  22. *
  23. The output of a SHA-384 digest of the message bytes from the * `ConsensusSubmitMessage` (48 bytes)
  24. *
*/ WITH_MESSAGE_DIGEST_AND_PAYER = 0; /** * An earlier version. *

* This version SHALL include, in order *

    *
  1. The previous running hash of the topic (48 bytes)
  2. *
  3. The `topic_running_hash_version` field (8 bytes)
  4. *
  5. The topic's shard (8 bytes)
  6. *
  7. The topic's realm (8 bytes)
  8. *
  9. The topic's number (8 bytes)
  10. *
  11. The number of seconds since the epoch when the * `ConsensusSubmitMessage` reached consensus (8 bytes)
  12. *
  13. The number of nanoseconds within the second when the * `ConsensusSubmitMessage` reached consensus (4 bytes)
  14. *
  15. The `topic_sequence_number` field (8 bytes)
  16. *
  17. The output of a SHA-384 digest of the message bytes from the * `ConsensusSubmitMessage` (48 bytes)
  18. *
*/ WITH_MESSAGE_DIGEST = 1; /** * The original version, used at genesis. *

* This version SHALL include, in order *

    *
  1. The previous running hash of the topic (48 bytes)
  2. *
  3. The topic's shard (8 bytes)
  4. *
  5. The topic's realm (8 bytes)
  6. *
  7. The topic's number (8 bytes)
  8. *
  9. The number of seconds since the epoch when the * `ConsensusSubmitMessage` reached consensus (8 bytes)
  10. *
  11. The number of nanoseconds within the second when the * `ConsensusSubmitMessage` reached consensus (4 bytes)
  12. *
  13. The `topic_sequence_number` field (8 bytes)
  14. *
  15. The message bytes from the `ConsensusSubmitMessage` * (variable)
  16. *
*/ WITH_FULL_MESSAGE = 2; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy