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

shgraph.hedera-protobuf-java-api.0.13.2.source-code.ThrottleDefinitions.proto Maven / Gradle / Ivy

syntax = "proto3";

package proto;

/*-
 * ‌
 * Hedera Network Services Protobuf
 * ​
 * Copyright (C) 2018 - 2021 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.hederahashgraph.api.proto.java";
option java_multiple_files = true;

import "BasicTypes.proto";

/* For details behind this throttling design, please see the docs/throttle-design.md
document in the Hedera Services repository. */

/* A set of operations which should be collectively throttled at a given milli-ops-per-second limit. */
message ThrottleGroup {
  repeated HederaFunctionality operations = 1; // The operations to be throttled
  uint64 milliOpsPerSec = 2; // The number of total operations per second across the entire network, multiplied by 1000. So, to choose 3 operations per second (which on a network of 30 nodes is a tenth of an operation per second for each node), set milliOpsPerSec = 3000. And to choose 3.6 ops per second, use milliOpsPerSec = 3600. Minimum allowed value is 1, and maximum allowed value is 9223372.
}

/* A list of throttle groups that should all compete for the same internal bucket. */
message ThrottleBucket {
  string name = 1; // A name for this bucket (primarily for use in logs)
  uint64 burstPeriodMs = 2; // The number of milliseconds required for this bucket to drain completely when full. The product of this number and the least common multiple of the milliOpsPerSec values in this bucket must not exceed 9223372036.
  repeated ThrottleGroup throttleGroups = 3; // The throttle groups competing for this bucket
}

/* A list of throttle buckets which, simultaneously enforced, define the system's throttling policy. 
  1. When an operation appears in more than one throttling bucket, all its buckets must have room or it will be throttled.
  2. An operation assigned to no buckets is always throttled.
*/ message ThrottleDefinitions { repeated ThrottleBucket throttleBuckets = 1; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy