Skip to content

Commit

Permalink
Squash 0.20.0 changes with proper signoff (#113)
Browse files Browse the repository at this point in the history
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
  • Loading branch information
Michael Tinker committed Nov 5, 2021
1 parent 1aa959f commit d98061a
Show file tree
Hide file tree
Showing 14 changed files with 349 additions and 9 deletions.
40 changes: 38 additions & 2 deletions services/basic_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,27 @@ enum TokenKycStatus {
Revoked = 2;
}

/**
* Possible Pause statuses returned on TokenGetInfoQuery
*/
enum TokenPauseStatus {
/**
* Indicates that a Token has no pauseKey
*/
PauseNotApplicable = 0;

/**
* Indicates that a Token is Paused
*/
Paused = 1;

/**
* Indicates that a Token is Unpaused.
*/
Unpaused = 2;
}


/**
* A Key can be a public key from one of the three supported systems (ed25519, RSA-3072, ECDSA with
* p384). Or, it can be the ID of a smart contract instance, which is authorized to act as if it had
Expand Down Expand Up @@ -986,6 +1007,16 @@ enum HederaFunctionality {
* Get execution time(s) by TransactionID, if available
*/
NetworkGetExecutionTime = 78;

/**
* Pause the Token
*/
TokenPause = 79;

/**
* Unpause the Token
*/
TokenUnpause = 80;
}

/**
Expand Down Expand Up @@ -1179,7 +1210,9 @@ message NodeAddress {
bytes memo = 3 [deprecated=true];

/**
* The node's hex-encoded X509 RSA public key
* The node's X509 RSA public key used to sign stream files (e.g., record stream
* files). Precisely, this field is a string of hexadecimal characters which,
* translated to binary, are the public key's DER encoding.
*/
string RSA_PubKey = 4;

Expand All @@ -1194,7 +1227,10 @@ message NodeAddress {
AccountID nodeAccountId = 6;

/**
* # The hex-encoded SHA-384 hash of the X509 cert used to encrypt gRPC traffic to the node
* # Hash of the node's TLS certificate. Precisely, this field is a string of
* hexadecimal characters which, translated to binary, are the SHA-384 hash of
* the UTF-8 NFKD encoding of the node's TLS cert in PEM format. Its value can be
* used to verify the node's certificate it presents during TLS negotiations.
*/
bytes nodeCertHash = 7;

Expand Down
2 changes: 1 addition & 1 deletion services/contract_call_local.proto
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ message ContractCallLocalQuery {
/**
* max number of bytes that the result might include. The run will fail if it would have returned more than this number of bytes.
*/
int64 maxResultSize = 5;
int64 maxResultSize = 5 [deprecated=true];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion services/contract_update.proto
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ message ContractUpdateTransactionBody {
* The new id of the file asserted to contain the bytecode of the Solidity transaction that
* created this contract
*/
FileID fileID = 8;
FileID fileID = 8 [deprecated = true];

/**
* The new contract memo, assumed to be Unicode encoded with UTF-8 (at most 100 bytes)
Expand Down
16 changes: 13 additions & 3 deletions services/freeze.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,45 +28,55 @@ option java_multiple_files = true;
import "duration.proto";
import "timestamp.proto";
import "basic_types.proto";
import "freeze_type.proto";

/**
* At consensus, sets the consensus time at which the platform should stop creating events and
* accepting transactions, and enter a maintenance window.
*/
message FreezeTransactionBody {
/**
* !! DEPRECATED and REJECTED by nodes
* The start hour (in UTC time), a value between 0 and 23
*/
int32 startHour = 1 [deprecated=true];

/**
* !! DEPRECATED and REJECTED by nodes
* The start minute (in UTC time), a value between 0 and 59
*/
int32 startMin = 2 [deprecated=true];

/**
* !! DEPRECATED and REJECTED by nodes
* The end hour (in UTC time), a value between 0 and 23
*/
int32 endHour = 3 [deprecated=true];

/**
* !! DEPRECATED and REJECTED by nodes
* The end minute (in UTC time), a value between 0 and 59
*/
int32 endMin = 4 [deprecated=true];

/**
* If set, the file whose contents should be used for a network software update during the
* maintenance window
* maintenance window.
*/
FileID update_file = 5;

/**
* If set, the expected hash of the contents of the update file (used to verify the update)
* If set, the expected hash of the contents of the update file (used to verify the update).
*/
bytes file_hash = 6;

/**
* The consensus time at which the maintenance window should begin
* The consensus time at which the maintenance window should begin.
*/
Timestamp start_time = 7;

/**
* The type of network freeze or upgrade operation to perform.
*/
FreezeType freeze_type = 8;
}
70 changes: 70 additions & 0 deletions services/freeze_type.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
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;

/**
* The type of network freeze or upgrade operation to be performed. This type dictates which
* fields are required.
*/
enum FreezeType {
/**
* An (invalid) default value for this enum, to ensure the client explicitly sets
* the intended type of freeze transaction.
*/
UNKNOWN_FREEZE_TYPE = 0;

/**
* Freezes the network at the specified time. The start_time field must be provided and
* must reference a future time. Any values specified for the update_file and file_hash
* fields will be ignored. This transaction does not perform any network changes or
* upgrades and requires manual intervention to restart the network.
*/
FREEZE_ONLY = 1;

/**
* A non-freezing operation that initiates network wide preparation in advance of a
* scheduled freeze upgrade. The update_file and file_hash fields must be provided and
* valid. The start_time field may be omitted and any value present will be ignored.
*/
PREPARE_UPGRADE = 2;

/**
* Freezes the network at the specified time and performs the previously prepared
* automatic upgrade across the entire network.
*/
FREEZE_UPGRADE = 3;

/**
* Aborts a pending network freeze operation.
*/
FREEZE_ABORT = 4;

/**
* Performs an immediate upgrade on auxilary services and containers providing
* telemetry/metrics. Does not impact network operations.
*/
TELEMETRY_UPGRADE = 5;
}
89 changes: 87 additions & 2 deletions services/response_code.proto
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ enum ResponseCodeEnum {
INVALID_TRANSACTION_START = 5;

/**
* valid transaction duration is a positive non zero number that does not exceed 120 seconds
* The given transactionValidDuration was either non-positive, or greater than the maximum
* valid duration of 180 secs.
*
*/
INVALID_TRANSACTION_DURATION = 6;

Expand Down Expand Up @@ -1005,7 +1007,90 @@ enum ResponseCodeEnum {
EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT = 263;

/**
* Cannot set the number of automatic associations for an account more than the maximum allowed token associations <tt>tokens.maxPerAccount</tt>
* Cannot set the number of automatic associations for an account more than the maximum allowed
* token associations <tt>tokens.maxPerAccount</tt>.
*/
REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT = 264;

/**
* Token is paused. This Token cannot be a part of any kind of Transaction until unpaused.
*/
TOKEN_IS_PAUSED = 265;

/**
* Pause key is not set on token
*/
TOKEN_HAS_NO_PAUSE_KEY = 266;

/**
* The provided pause key was invalid
*/
INVALID_PAUSE_KEY = 267;

/**
* The update file in a freeze transaction body must exist.
*/
FREEZE_UPDATE_FILE_DOES_NOT_EXIST = 268;

/**
* The hash of the update file in a freeze transaction body must match the in-memory hash.
*/
FREEZE_UPDATE_FILE_HASH_DOES_NOT_MATCH = 269;

/**
* A FREEZE_UPGRADE transaction was handled with no previous update prepared.
*/
NO_UPGRADE_HAS_BEEN_PREPARED = 270;

/**
* A FREEZE_ABORT transaction was handled with no scheduled freeze.
*/
NO_FREEZE_IS_SCHEDULED = 271;

/**
* The update file hash when handling a FREEZE_UPGRADE transaction differs from the file
* hash at the time of handling the PREPARE_UPGRADE transaction.
*/
UPDATE_FILE_HASH_CHANGED_SINCE_PREPARE_UPGRADE = 272;

/**
* The given freeze start time was in the (consensus) past.
*/
FREEZE_START_TIME_MUST_BE_FUTURE = 273;

/**
* The prepared update file cannot be updated or appended until either the upgrade has
* been completed, or a FREEZE_ABORT has been handled.
*/
PREPARED_UPDATE_FILE_IS_IMMUTABLE = 274;

/**
* Once a freeze is scheduled, it must be aborted before any other type of freeze can
* can be performed.
*/
FREEZE_ALREADY_SCHEDULED = 275;

/**
* If an NMT upgrade has been prepared, the following operation must be a FREEZE_UPGRADE.
* (To issue a FREEZE_ONLY, submit a FREEZE_ABORT first.)
*/
FREEZE_UPGRADE_IN_PROGRESS = 276;

/**
* If an NMT upgrade has been prepared, the subsequent FREEZE_UPGRADE transaction must
* confirm the id of the file to be used in the upgrade.
*/
UPDATE_FILE_ID_DOES_NOT_MATCH_PREPARED = 277;

/**
* If an NMT upgrade has been prepared, the subsequent FREEZE_UPGRADE transaction must
* confirm the hash of the file to be used in the upgrade.
*/
UPDATE_FILE_HASH_DOES_NOT_MATCH_PREPARED = 278;

/**
* Consensus throttle did not allow execution of this transaction. System is throttled at
* consensus level.
*/
CONSENSUS_GAS_EXHAUSTED = 279;
}
12 changes: 12 additions & 0 deletions services/schedulable_transaction_body.proto
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ import "token_burn.proto";
import "token_wipe_account.proto";
import "token_associate.proto";
import "token_dissociate.proto";
import "token_pause.proto";
import "token_unpause.proto";

import "schedule_delete.proto";

Expand Down Expand Up @@ -239,6 +241,16 @@ message SchedulableTransactionBody {
*/
TokenDissociateTransactionBody tokenDissociate = 33;

/**
* Pauses the Token
*/
TokenPauseTransactionBody token_pause = 35;

/**
* Unpauses the Token
*/
TokenUnpauseTransactionBody token_unpause = 36;

/**
* Marks a schedule in the network's action queue as deleted, preventing it from executing
*/
Expand Down
6 changes: 6 additions & 0 deletions services/token_create.proto
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,10 @@ message TokenCreateTransactionBody {
* The custom fees to be assessed during a CryptoTransfer that transfers units of this token
*/
repeated CustomFee custom_fees = 21;

/**
* The Key which can pause and unpause the Token.
* If Empty the token pause status defaults to PauseNotApplicable, otherwise Unpaused.
*/
Key pause_key = 22;
}
10 changes: 10 additions & 0 deletions services/token_get_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,16 @@ message TokenInfo {
* The custom fees to be assessed during a CryptoTransfer that transfers units of this token
*/
repeated CustomFee custom_fees = 23;

/**
* The Key which can pause and unpause the Token.
*/
Key pause_key = 24;

/**
* Specifies whether the token is paused or not. PauseNotApplicable is returned if pauseKey is not set.
*/
TokenPauseStatus pause_status = 25;
}

/**
Expand Down

0 comments on commit d98061a

Please sign in to comment.