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

shgraph.hedera-protobuf-java-api.0.55.0.source-code.record_stream_file.proto Maven / Gradle / Ivy

The newest version!
syntax = "proto3";

package proto;

/*-
 * ‌
 * Hedera Network Services Protobuf
 * ​
 * Copyright (C) 2018 - 2022 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.services.stream.proto";
// <<>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;

import "basic_types.proto";
import "transaction.proto";
import "transaction_record.proto";
import "hash_object.proto";

/**
 * RecordStreamFile is used to serialize all RecordStreamItems that are part of the
 * same period into record stream files.
 * This structure represents a block in Hedera (HIP-415).
 */
message RecordStreamFile {
  /**
   * Version of HAPI that was used to serialize the file.
   */
  SemanticVersion hapi_proto_version = 1;

  /**
   * Running Hash of all RecordStreamItems before writing this file.
   */
  HashObject start_object_running_hash = 2;

  /**
   * List of all the record stream items from that period.
   */
  repeated RecordStreamItem record_stream_items = 3;

  /**
   * Running Hash of all RecordStreamItems before closing this file.
   */
  HashObject end_object_running_hash = 4;

  /**
   * The block number associated with this period.
   */
  int64 block_number = 5;

  /**
   * List of the hashes of all the sidecar record files created for the same period.
   * Allows multiple sidecar files to be linked to this RecordStreamFile.
   */
  repeated SidecarMetadata sidecars = 6;
}

/**
 * A RecordStreamItem consists of a Transaction and a TransactionRecord,
 * which are already defined protobuf messages.
 */
message RecordStreamItem {
  Transaction transaction = 1;
  TransactionRecord record = 2;
}

/**
 * Information about a single sidecar file.
 */
message SidecarMetadata {
  /**
   * The hash of the entire file.
   */
  HashObject hash = 1;

  /**
   * The id of the sidecar record file
   */
  int32 id = 2;

  /**
   * The types of sidecar records that will be included in the file.
   */
  repeated SidecarType types = 3;
}

/**
 * The type of sidecar records contained in the sidecar record file
 */
enum SidecarType {
  SIDECAR_TYPE_UNKNOWN = 0;
  CONTRACT_STATE_CHANGE = 1;
  CONTRACT_ACTION = 2;
  CONTRACT_BYTECODE = 3;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy