From 22d6126f6107d17e540bac732027faa7750a5ecc Mon Sep 17 00:00:00 2001 From: Joseph Sinclair Date: Fri, 26 Apr 2024 17:11:59 -0700 Subject: [PATCH] Update specification text for address book service * Updated specification/API comments * Consolidated review changes * Adjusted wording for consistency and clarity * Adjusted formatting for consistency * Updated query.proto with package changes * Corrected gossip certificate encoding * Adjusted gossip endpoint to state that networks may or may not require those endpoints to have or not have a DNS entry. * Further clarified that DNS vs. Address is network-specific. * Matched updated wording based on recent discussions * Removed references to status in state Node message. * Removed status enum as requested. * Added deleted flag to match recent updates. Signed-off-by: Joseph Sinclair --- .gitignore | 1 + services/address_book_service.proto | 149 +- services/basic_types.proto | 124 +- services/node_create.proto | 116 +- services/node_delete.proto | 36 +- services/node_get_info.proto | 153 +- services/node_update.proto | 119 +- services/query.proto | 26 +- services/response.proto | 8 +- services/response_code.proto | 2848 ++++++++++--------- services/schedulable_transaction_body.proto | 16 +- services/state/addressbook/node.proto | 128 +- services/token_update_nfts.proto | 16 +- services/transaction_body.proto | 517 ++-- services/transaction_receipt.proto | 123 +- 15 files changed, 2372 insertions(+), 2008 deletions(-) diff --git a/.gitignore b/.gitignore index a47c2ff0..bbde7b23 100644 --- a/.gitignore +++ b/.gitignore @@ -78,4 +78,5 @@ secring.* ### Custom items .idea *.sw* +*.iml diff --git a/services/address_book_service.proto b/services/address_book_service.proto index 7bfac96a..10c66c73 100644 --- a/services/address_book_service.proto +++ b/services/address_book_service.proto @@ -1,10 +1,8 @@ syntax = "proto3"; -package proto; +package com.hedera.hapi.node.addressbook; /* - * Hedera Network Services Protobuf - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -29,37 +27,140 @@ import "transaction_response.proto"; import "transaction.proto"; /** - * Transactions for the AddressBook Service, those HAPI APIs facilitate changes to the nodes used across the Hedera network. - * All those transactions needs to be signed by the Hedera Council. Steps needed below: - * 1. The node operator creates and signs the transaction with their key (the key on the node operator account) - * 2. The node operator hands this transaction to Alex, who then gives it to the council to sign - * 3. When signed and submitted, the server will verify that account 2 keys have signed, and the keys on the operator account have signed. - * Hedera council should have ability to make all edits in addition to add/remove nodes + * The Address Book service provides the ability for Hedera network node + * administrators to add, update, and remove consensus nodes. This addition, + * update, or removal of a consensus node requires governing council approval, + * but each node operator may update their own operational attributes without + * additional approval, reducing overhead for routine operations. + * + * Most operations are `privileged operations` and require governing council + * approval. + * + * ### For a node creation transaction. + * - The node operator SHALL create a `createNode` transaction. + * - The node operator SHALL sign this transaction with the active `key` for + * the account to be assigned as the "node account". + * - The node operator MUST deliver the signed transaction to the Hedera + * council representative. + * - The Hedera council representative SHALL arrange for council members to + * review and sign the transaction. + * - Once sufficient council members have signed the transaction, the + * Hedera council representative SHALL submit the transaction to the + * network. + * - Upon receipt of a valid and signed node creation transaction the network + * software SHALL + * - Validate the threshold signature for the Hedera governing council + * - Validate the signature of the active `key` for the account to be + * assigned as the "node account". + * - Create the new node in state, this new node SHALL NOT be active in the + * network at this time. + * - When executing the next `freeze` transaction with `freeze_type` set to + * `PREPARE_UPGRADE`, update network configuration and bring the + * new node to an active status within the network. The node to be added + * SHALL be active in the network following this upgrade. + * + * ### For a node deletion transaction. + * - The node operator or Hedera council representative SHALL create a + * `deleteNode` transaction. + * - If the node operator creates the transaction + * - The node operator MUST sign this transaction with the active `key` + * for the account assigned as the "node account". + * - The node operator SHALL deliver the signed transaction to the Hedera + * council representative. + * - The Hedera council representative SHALL arrange for council members to + * review and sign the transaction. + * - Once sufficient council members have signed the transaction, the + * Hedera council representative SHALL submit the transaction to the + * network. + * - Upon receipt of a valid and signed node deletion transaction the network + * software SHALL + * - Validate the threshold signature for the Hedera governing council + * - Remove the existing node from network state. The node SHALL still + * be active in the network at this time. + * - When executing the next `freeze` transaction with `freeze_type` set to + * `PREPARE_UPGRADE`, update network configuration and remove the + * node to be deleted from the network. The node to be deleted SHALL NOT + * be active in the network following this upgrade. + * + * ### For a node update transaction. + * - The node operator or Hedera council representative SHALL create an + * `updateNode` transaction. + * - If the node operator creates the transaction + * - The node operator MUST sign this transaction with the active `key` + * for the account assigned as the current "node account". + * - If the transaction changes the value of the "node account" the + * node operator MUST _also_ sign this transaction with the active `key` + * for the account to be assigned as the new "node account". + * - The node operator SHALL submit the transaction to the + * network. Hedera council approval SHALL NOT be sought for this + * transaction + * - If the Hedera council representative creates the transaction + * - The Hedera council representative SHALL arrange for council members + * to review and sign the transaction. + * - Once sufficient council members have signed the transaction, the + * Hedera council representative SHALL submit the transaction to the + * network. + * - Upon receipt of a valid and signed node update transaction the network + * software SHALL + * - If the transaction is signed by the Hedera governing council + * - Validate the threshold signature for the Hedera governing council + * - If the transaction is signed by the active `key` for the node account + * - Validate the signature of the active `key` for the account assigned + * as the "node account". + * - If the transaction modifies the value of the "node account", + * - Validate the signature of the _new_ `key` for the account to be + * assigned as the new "node account". + * - Modify the node information held in network state with the changes + * requested in the update transaction. The node changes SHALL NOT be + * applied to network configuration, and SHALL NOT affect network + * operation at this time. + * - When executing the next `freeze` transaction with `freeze_type` set to + * `PREPARE_UPGRADE`, update network configuration according to the + * modified information in network state. The requested changes SHALL + * affect network operation following this upgrade. */ service AddressBookService { /** - * Prepare to add a new node to the network. - * When a valid council member initiates a HAPI transaction to add a new node, - * then the network should acknowledge the transaction and update the network’s Address Book within 24 hours. - * The added node will not be active until the network is upgraded. - */ - rpc createNode (Transaction) returns (TransactionResponse); + * A transaction to create a new consensus node in the network. + * address book. + *

+ * This transaction, once complete, SHALL add a new consensus node to the + * network state.
+ * The new consensus node SHALL remain in state, but SHALL NOT participate + * in network consensus until the network updates the network configuration. + *

+ * Hedera governing council authorization is REQUIRED for this transaction. + */ + rpc createNode (proto.Transaction) returns (proto.TransactionResponse); /** - * Prepare to delete the node to the network. - * The deleted node will not be deleted until the network is upgraded. - * Such a deleted node can never be reused. + * A transaction to remove a consensus node from the network address + * book. + *

+ * This transaction, once complete, SHALL remove the identified consensus + * node from the network state. + *

+ * Hedera governing council authorization is REQUIRED for this transaction. */ - rpc deleteNode (Transaction) returns (TransactionResponse); + rpc deleteNode (proto.Transaction) returns (proto.TransactionResponse); /** - * Prepare to update the node to the network. - * The node will not be updated until the network is upgraded. + * A transaction to update an existing consensus node from the network + * address book. + *

+ * This transaction, once complete, SHALL modify the identified consensus + * node state as requested. + *

+ * This transaction MAY be authorized by either the node operator OR the + * Hedera governing council. */ - rpc updateNode (Transaction) returns (TransactionResponse); + rpc updateNode (proto.Transaction) returns (proto.TransactionResponse); /** - * Retrieves the node information by node Id. + * A transaction to query the current state of a consensus node in the + * network address book state. + *

+ * Hedera governing council authorization is REQUIRED for this transaction. */ - rpc getNodeInfo (Query) returns (Response); + rpc getNodeInfo (proto.Query) returns (proto.Response); } diff --git a/services/basic_types.proto b/services/basic_types.proto index 5e0a3761..757295bf 100644 --- a/services/basic_types.proto +++ b/services/basic_types.proto @@ -67,7 +67,7 @@ message RealmID { } /** - * The ID for an a cryptocurrency account + * The ID for an a cryptocurrency account */ message AccountID { /** @@ -130,7 +130,7 @@ message NftID { } /** - * The ID for a file + * The ID for a file */ message FileID { /** @@ -150,7 +150,7 @@ message FileID { } /** - * The ID for a smart contract instance + * The ID for a smart contract instance */ message ContractID { /** @@ -170,21 +170,21 @@ message ContractID { int64 contractNum = 3; /** - * The 20-byte EVM address of the contract to call. - * + * The 20-byte EVM address of the contract to call. + * * Every contract has an EVM address determined by its shard.realm.num id. * This address is as follows: *

    *
  1. The first 4 bytes are the big-endian representation of the shard.
  2. *
  3. The next 8 bytes are the big-endian representation of the realm.
  4. *
  5. The final 8 bytes are the big-endian representation of the number.
  6. - *
- * - * Contracts created via CREATE2 have an additional, primary address that is - * derived from the EIP-1014 - * specification, and does not have a simple relation to a shard.realm.num id. - * - * (Please do note that CREATE2 contracts can also be referenced by the three-part + * + * + * Contracts created via CREATE2 have an additional, primary address that is + * derived from the EIP-1014 + * specification, and does not have a simple relation to a shard.realm.num id. + * + * (Please do note that CREATE2 contracts can also be referenced by the three-part * EVM address described above.) */ bytes evm_address = 4; @@ -225,13 +225,13 @@ message TransactionID { bool scheduled = 3; /** - * The identifier for an internal transaction that was spawned as part - * of handling a user transaction. (These internal transactions share the + * The identifier for an internal transaction that was spawned as part + * of handling a user transaction. (These internal transactions share the * transactionValidStart and accountID of the user transaction, so a * nonce is necessary to give them a unique TransactionID.) - * - * An example is when a "parent" ContractCreate or ContractCall transaction - * calls one or more HTS precompiled contracts; each of the "child" + * + * An example is when a "parent" ContractCreate or ContractCall transaction + * calls one or more HTS precompiled contracts; each of the "child" * transactions spawned for a precompile has a id with a different nonce. */ int32 nonce = 4; @@ -426,19 +426,19 @@ enum TokenType { } /** - * Allows a set of resource prices to be scoped to a certain type of a HAPI operation. - * + * Allows a set of resource prices to be scoped to a certain type of a HAPI operation. + * * For example, the resource prices for a TokenMint operation are different between minting fungible * and non-fungible tokens. This enum allows us to "mark" a set of prices as applying to one or the * other. - * + * * Similarly, the resource prices for a basic TokenCreate without a custom fee schedule yield a * total price of $1. The resource prices for a TokenCreate with a custom fee schedule are different * and yield a total base price of $2. */ enum SubType { /** - * The resource prices have no special scope + * The resource prices have no special scope */ DEFAULT = 0; @@ -567,15 +567,15 @@ enum TokenPauseStatus { * A Key can be a public key from either the Ed25519 or ECDSA(secp256k1) signature schemes, where * in the ECDSA(secp256k1) case we require the 33-byte compressed form of the public key. We call * these public keys primitive keys. - * - * If an account has primitive key associated to it, then the corresponding private key must sign - * any transaction to transfer cryptocurrency out of it. * - * A Key can also be the ID of a smart contract instance, which is then authorized to perform any - * precompiled contract action that requires this key to sign. + * If an account has primitive key associated to it, then the corresponding private key must sign + * any transaction to transfer cryptocurrency out of it. * - * Note that when a Key is a smart contract ID, it doesn't mean the contract with that ID - * will actually create a cryptographic signature. It only means that when the contract calls a + * A Key can also be the ID of a smart contract instance, which is then authorized to perform any + * precompiled contract action that requires this key to sign. + * + * Note that when a Key is a smart contract ID, it doesn't mean the contract with that ID + * will actually create a cryptographic signature. It only means that when the contract calls a * precompiled contract, the resulting "child transaction" will be authorized to perform any action * controlled by the Key. * @@ -639,10 +639,10 @@ message Key { */ bytes ECDSA_secp256k1 = 7; - /** + /** * A smart contract that, if the recipient of the active message frame, should be treated - * as having signed. (Note this does not mean the code being executed in the frame - * will belong to the given contract, since it could be running another contract's code via + * as having signed. (Note this does not mean the code being executed in the frame + * will belong to the given contract, since it could be running another contract's code via * delegatecall. So setting this key is a more permissive version of setting the * contractID key, which also requires the code in the active message frame belong to the * the contract with the given id.) @@ -683,7 +683,7 @@ message KeyList { } /** - * This message is DEPRECATED and UNUSABLE with network nodes. It is retained + * This message is DEPRECATED and UNUSABLE with network nodes. It is retained * here only for historical reasons. * * Please use the SignaturePair and SignatureMap messages. @@ -726,7 +726,7 @@ message Signature { } /** - * This message is DEPRECATED and UNUSABLE with network nodes. It is retained + * This message is DEPRECATED and UNUSABLE with network nodes. It is retained * here only for historical reasons. * * Please use the SignaturePair and SignatureMap messages. @@ -742,7 +742,7 @@ message ThresholdSignature { } /** - * This message is DEPRECATED and UNUSABLE with network nodes. It is retained + * This message is DEPRECATED and UNUSABLE with network nodes. It is retained * here only for historical reasons. * * Please use the SignaturePair and SignatureMap messages. @@ -759,15 +759,15 @@ message SignatureList { /** * The client may use any number of bytes from zero to the whole length of the public key for * pubKeyPrefix. If zero bytes are used, then it must be that only one primitive key is required - * to sign the linked transaction; it will surely resolve to INVALID_SIGNATURE otherwise. - * - * IMPORTANT: In the special case that a signature is being provided for a key used to - * authorize a precompiled contract, the pubKeyPrefix must contain the entire public - * key! That is, if the key is a Ed25519 key, the pubKeyPrefix should be 32 bytes - * long. If the key is a ECDSA(secp256k1) key, the pubKeyPrefix should be 33 bytes long, - * since we require the compressed form of the public key. - * - * Only Ed25519 and ECDSA(secp256k1) keys and hence signatures are currently supported. + * to sign the linked transaction; it will surely resolve to INVALID_SIGNATURE otherwise. + * + * IMPORTANT: In the special case that a signature is being provided for a key used to + * authorize a precompiled contract, the pubKeyPrefix must contain the entire public + * key! That is, if the key is a Ed25519 key, the pubKeyPrefix should be 32 bytes + * long. If the key is a ECDSA(secp256k1) key, the pubKeyPrefix should be 33 bytes long, + * since we require the compressed form of the public key. + * + * Only Ed25519 and ECDSA(secp256k1) keys and hence signatures are currently supported. */ message SignaturePair { /** @@ -1359,24 +1359,30 @@ message CurrentAndNextFeeSchedule { } /** - * Contains the IP address and the port representing a service endpoint of a Node in a network. Used - * to reach the Hedera API and submit transactions to the network. + * Contains the IP address and the port representing a service endpoint of + * a Node in a network. Used to reach the Hedera API and submit transactions + * to the network. + * + * When the `domain_name` field is set, the `ipAddressV4` field + * MUST NOT be set.
+ * When the `ipAddressV4` field is set, the `domain_name` field + * MUST NOT be set. */ message ServiceEndpoint { /** - * The 32-bit IPv4 address of the node encoded in left to right order (e.g. 127.0.0.1 has 127 - * as its first byte) + * The 4-byte IPv4 address of the endpoint encoded in left to right order + * (e.g. 127.0.0.1 has bytes [127, 0, 0, 1]) */ bytes ipAddressV4 = 1; /** - * The port of the node + * The port of the service endpoint */ int32 port = 2; /** - * A node domain name - * This MUST be the fully qualified domain name of the node. + * A node domain name.
+ * This MUST be the fully qualified domain(DNS) name of the node.
* This value MUST NOT be more than 253 characters. * domain_name and ipAddressV4 are mutually exclusive. * When the `domain_name` field is set, the `ipAddressV4` field MUST NOT be set.
@@ -1388,9 +1394,9 @@ message ServiceEndpoint { /** * The data about a node, including its service endpoints and the Hedera account to be paid for * services provided by the node (that is, queries answered and transactions submitted.) - * - * If the serviceEndpoint list is not set, or empty, then the endpoint given by the - * (deprecated) ipAddress and portno fields should be used. + * + * If the `serviceEndpoint` list is not set, or empty, then the endpoint given by the + * (deprecated) `ipAddress` and `portno` fields should be used. * * All fields are populated in the 0.0.102 address book file while only fields that start with # are * populated in the 0.0.101 address book file. @@ -1414,9 +1420,9 @@ message NodeAddress { bytes memo = 3 [deprecated = true]; /** - * 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. + * 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; @@ -1431,9 +1437,9 @@ message NodeAddress { AccountID nodeAccountId = 6; /** - * # 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 + * # 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; diff --git a/services/node_create.proto b/services/node_create.proto index f83f6a9c..4423d177 100644 --- a/services/node_create.proto +++ b/services/node_create.proto @@ -1,10 +1,8 @@ syntax = "proto3"; -package proto; +package com.hedera.hapi.node.addressbook; /* - * Hedera Network Services Protobuf - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,72 +25,104 @@ option java_multiple_files = true; import "basic_types.proto"; /** - * A transaction body to add a new node to the network. - * After the node is created, the node_id for it is in the receipt. + * A transaction body to add a new consensus node to the network address book. * * This transaction body SHALL be considered a "privileged transaction". * - * This message supports a transaction to create a new node in the network. - * The transaction, once complete, enables a new consensus node + * This message supports a transaction to create a new node in the network + * address book. The transaction, once complete, enables a new consensus node * to join the network, and requires governing council authorization. * - * A `NodeCreateTransactionBody` MUST be signed by the governing council.
- * The newly created node information will be used to generate config.txt and - * a-pulbic-NodeAlias.pem file per each node during phase 2,
- * not active until next freeze upgrade. + * - A `NodeCreateTransactionBody` MUST be signed by the governing council. + * - The newly created node information SHALL be added to the network address + * book information in the network state. + * - The new entry SHALL be created in "state" but SHALL NOT participate in + * network consensus and SHALL NOT be present in network "configuration" + * until the next "upgrade" transaction (as noted below). + * - All new address book entries SHALL be added to the active network + * configuration during the next `freeze` transaction with the field + * `freeze_type` set to `PREPARE_UPGRADE`. + * + * ### Record Stream Effects + * Upon completion the newly assigned `node_id` SHALL be in the transaction + * receipt. */ message NodeCreateTransactionBody { - /** - * Node account id, mandatory field, ALIAS is not allowed, only ACCOUNT_NUM. - * If account_id does not exist, it will reject the transaction. - * Multiple nodes can have the same account_id. + * A Node account identifier. + *

+ * This account identifier MUST be in the "account number" form.
+ * This account identifier MUST NOT use the alias field.
+ * If the identified account does not exist, this transaction SHALL fail.
+ * Multiple nodes MAY share the same node account.
+ * This field is REQUIRED. */ - AccountID account_id = 1; + proto.AccountID account_id = 1; /** - * Description of the node with UTF-8 encoding up to 100 bytes, optional field. + * A short description of the node. + *

+ * This value, if set, MUST NOT exceed 100 bytes when encoded as UTF-8.
+ * This field is OPTIONAL. */ string description = 2; /** - * Maximum number of these endpoints is 10. - * The first in the list is used as the Internal IP address in config.txt, - * the second in the list is used as the External IP address in config.txt, - * the rest of IP addresses are ignored for DAB phase 2. - * a flag, NodesConfig.gossipFqdnRestricted, boolean. - * If it's true, FQDN, Fully qualified domain name is not allowed in gossip_endpoint , only IP is allowed; - * if it's false, FQDN and IP is allowed in gossip_endpoint. - * - * If the network configuration value `gossipFqdnRestricted` is set, then all - * endpoints in this list MUST supply only IP address.
- * If the network configuration value `fqdnRestricted` is _not_ set, then - * endpoints in this list MAY supply either IP address or FQDN, but MUST - * NOT supply both for the same endpoint. + * A list of service endpoints for gossip. + *

+ * These endpoints SHALL represent the published endpoints to which other + * consensus nodes may _gossip_ transactions.
+ * These endpoints MUST specify a port.
+ * This list MUST NOT be empty.
+ * This list MUST NOT contain more than `10` entries.
+ * The first two entries in this list SHALL be the endpoints published to + * all consensus nodes.
+ * All other entries SHALL be reserved for future use. + *

+ * Each network may have additional requirements for these endpoints. + * A client MUST check network-specific documentation for those + * details.
+ * If the network configuration value `gossipFqdnRestricted` is set, then + * all endpoints in this list MUST supply only IP address.
+ * If the network configuration value `gossipFqdnRestricted` is _not_ set, + * then endpoints in this list MAY supply either IP address or FQDN, but + * MUST NOT supply both values for the same endpoint. */ - repeated ServiceEndpoint gossip_endpoint = 3; + repeated proto.ServiceEndpoint gossip_endpoint = 3; /** - * A node's grpc service IP addresses and ports, IP:Port is mandatory, - * fully qualified domain name is optional. Maximum number of these endpoints is 8. + * A list of service endpoints for gRPC calls. + *

+ * These endpoints SHALL represent the published gRPC endpoints to which + * clients may submit transactions.
+ * These endpoints MUST specify a port.
* Endpoints in this list MAY supply either IP address or FQDN, but MUST - * NOT supply both values for the same endpoint. + * NOT supply both values for the same endpoint.
+ * This list MUST NOT be empty.
+ * This list MUST NOT contain more than `8` entries. */ - repeated ServiceEndpoint service_endpoint = 4; + repeated proto.ServiceEndpoint service_endpoint = 4; /** - * The node's X509 certificate used to sign stream files (e.g., record stream - * files). Precisely, this field is the DER encoding of gossip X509 certificate. - * This is a mandatory field. + * A certificate used to sign gossip events. + *

+ * This value MUST be a certificate of a type permitted for gossip + * signatures.
+ * This value MUST be the DER encoding of the certificate presented.
+ * This field is REQUIRED and MUST NOT be empty. */ bytes gossip_ca_certificate = 5; /** - * 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.node x509 certificate hash, optional field. + * A hash of the node gRPC TLS certificate. + *

+ * This value MAY be used to verify the certificate presented by the node + * during TLS negotiation for gRPC.
+ * This value MUST be a SHA-384 hash.
+ * The TLS certificate to be hashed MUST first be in PEM format and MUST be + * encoded with UTF-8 NFKD encoding to a stream of bytes provided to + * the hash algorithm.
+ * This field is OPTIONAL. */ bytes grpc_certificate_hash = 6; } diff --git a/services/node_delete.proto b/services/node_delete.proto index b9f92a2d..1a229fc2 100644 --- a/services/node_delete.proto +++ b/services/node_delete.proto @@ -1,10 +1,8 @@ syntax = "proto3"; -package proto; +package com.hedera.hapi.node.addressbook; /* - * Hedera Network Services Protobuf - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,21 +22,31 @@ option java_package = "com.hederahashgraph.api.proto.java"; // <<>> This comment is special code for setting PBJ Compiler java package option java_multiple_files = true; -import "basic_types.proto"; - /** - * Delete the given node. After deletion, it will be marked as deleted. - * But information about it will continue to exist for a year. - * For phase 2, this marks the node to be deleted in the merkle tree and will be used to write config.txt and - * a-pulbic-NodeAlias.pem file per each node during prepare freeze. - * The deleted node will not be deleted until the network is upgraded. - * Such a deleted node can never be reused. - * The council has to sign this transaction. This is a privileged transaction. + * A transaction body to delete a node from the network address book. + * + * This transaction body SHALL be considered a "privileged transaction". + * + * - A `NodeDeleteTransactionBody` MUST be signed by the governing council. + * - Upon success, the address book entry SHALL enter a "pending delete" + * state. + * - All address book entries pending deletion SHALL be removed from the + * active network configuration during the next `freeze` transaction with + * the field `freeze_type` set to `PREPARE_UPGRADE`.
+ * - A deleted address book node SHALL be removed entirely from network state. + * - A deleted address book node identifier SHALL NOT be reused. + * + * ### Record Stream Effects + * Upon completion the "deleted" `node_id` SHALL be in the transaction + * receipt. */ message NodeDeleteTransactionBody { /** - * The unique id of the node to be deleted. If invalid node is specified, transaction will - * result in INVALID_NODE_ID. + * A consensus node identifier in the network state. + *

+ * The node identified MUST exist in the network address book.
+ * The node identified MUST NOT be deleted.
+ * This value is REQUIRED. */ uint64 node_id = 1; } diff --git a/services/node_get_info.proto b/services/node_get_info.proto index e1d0cddf..a6c5217f 100644 --- a/services/node_get_info.proto +++ b/services/node_get_info.proto @@ -1,10 +1,8 @@ syntax = "proto3"; -package proto; +package com.hedera.hapi.node.addressbook; /* - * Hedera Network Services Protobuf - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -29,81 +27,164 @@ import "query_header.proto"; import "response_header.proto"; /** - * Gets information about Node instance. This needs super use privileges to succeed or should be a node operator. + * A transaction body for a `getNodeInfo ` node information query request. + * + * This transaction body SHALL be considered a "privileged transaction". + * + * - A `NodeGetInfoQuery` MUST be signed by the governing council. + * - This query requests details for a single consensus node entry in the + * network state. + * - The node identifier `node_id` is REQUIRED, and identifies the node for + * which details are requested. + * + * > Note + * >> Requiring governing council signature for a query like this seems quite + * >> unusual. Further detail for _why_ only the governing council is permitted + * >> to query this information would be helpful (particularly as the block + * >> stream and mirror node make it trivial to obtain the same information). */ message NodeGetInfoQuery { /** - * Standard information sent with every query operation.
+ * Standard information sent with every query operation. + *

* This includes the signed payment and what kind of response is requested * (cost, state proof, both, or neither). */ - QueryHeader header = 1; + proto.QueryHeader header = 1; /** - * A node identifier for which information is requested.
+ * A consensus node identifier for which information is requested. + *

* If the identified node is not valid, this request SHALL fail with - * a response code `INVALID_NODE_ID`. + * a response code `INVALID_NODE_ID`.
+ * If the identified node is not present in the network state, + * this request SHALL fail with a response code `INVALID_NODE_ID`. */ uint64 node_id = 2; } /** - * A query response describing the current state of a node + * A query response describing the current state of a consensus node entry in + * the network state. */ message NodeInfo { /** - * A numeric node identifier.
- * This value identifies this node within the network address book. + * A consensus node identifier in the network state. + *

+ * This value identifies this node within the network address book.
+ * This value is REQUIRED. */ uint64 node_id = 1; /** - * The account is charged for transactions submitted by the node that fail due diligence + * An account identifier. + *

+ * This account MUST be owned by the entity responsible for the node.
+ * This account SHALL be charged transaction fees for any transactions that + * are submitted to the network by this node and fail due diligence checks.
+ * This value is REQUIRED. */ - AccountID account_id = 2; + proto.AccountID account_id = 2; /** - * A description of the node with UTF-8 encoding up to 100 bytes + * A short description of the consensus node. + *

+ * This value, if present, MUST NOT exceed 100 bytes when encoded as UTF-8. */ string description = 3; /** - * A node's Gossip Endpoints, ip address and port + * A list of service endpoints for gossip. + *

+ * These endpoints SHALL represent the published endpoints to which other + * consensus nodes may _gossip_ transactions.
+ * These endpoints SHOULD NOT specify both address and DNS name.
+ * This list SHALL NOT be empty.
+ * This list SHALL NOT contain more than `10` entries.
+ * The first two entries in this list SHALL be the endpoints published to + * all consensus nodes.
+ * All other entries SHALL be reserved for future use. + *

+ * Each network may have additional requirements for these endpoints. + * A client MUST check network-specific documentation for those + * details.
+ *

Example
+ * Hedera Mainnet _requires_ that address be specified, and does not + * permit DNS name (FQDN) to be specified.
+ * Mainnet also requires that the first entry be an "internal" IP + * address and the second entry be an "external" IP address. + *
+ *
+ * Solo, however, _requires_ DNS name (FQDN) but also permits + * address. + *
*/ - repeated ServiceEndpoint gossip_endpoint = 4; + repeated proto.ServiceEndpoint gossip_endpoint = 4; /** - * A node's service Endpoints, ip address or FQDN and port + * A list of service endpoints for gRPC calls. + *

+ * These endpoints SHALL represent the published endpoints to which clients + * may submit transactions.
+ * These endpoints SHOULD specify address and port.
+ * These endpoints MAY specify a DNS name.
+ * These endpoints SHOULD NOT specify both address and DNS name.
+ * This list SHALL NOT be empty.
+ * This list SHALL NOT contain more than `8` entries. + *

+ * Each network may have additional requirements for these endpoints. + * A client MUST check network-specific documentation for those + * details. */ - repeated ServiceEndpoint service_endpoint = 5; + repeated proto.ServiceEndpoint service_endpoint = 5; /** - * The node's X509 certificate used to sign stream files (e.g., record stream - * files). Precisely, this field is the DER encoding of gossip X509 certificate. - * files). + * A certificate used to sign gossip events. + *

+ * This value SHALL be a certificate of a type permitted for gossip + * signatures.
+ * This value SHALL be the DER encoding of the certificate presented.
+ * This field is REQUIRED and MUST NOT be empty. */ bytes gossip_ca_certificate = 6; /** - * node x509 certificate hash. 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. + * A hash of the node gRPC TLS certificate. + *

+ * This value MAY be used to verify the certificate presented by the node + * during TLS negotiation for gRPC.
+ * This value MUST be a SHA-384 hash.
+ * The TLS certificate to be hashed SHALL first be in PEM format and SHALL + * be encoded with UTF-8 NFKD encoding to a stream of bytes provided to + * the hash algorithm.
+ * This field is OPTIONAL. */ bytes grpc_certificate_hash = 7; /** - * The consensus weight of this node in the network. + * A consensus weight. + *

+ * Each node SHALL have a weight in consensus calculations.
+ * The consensus weight of a node SHALL be calculated based on the amount + * of HBAR staked to that node.
+ * Consensus SHALL be calculated based on agreement of greater than `2/3` + * of the total `weight` value of all nodes on the network. */ uint64 weight = 8; /** - * Whether the node has been deleted + * A flag indicating this node was removed from the network. + *

+ * This flag SHALL NOT be set unless a `deleteNode` transaction previously + * succeeded identifying that node.
+ * If this flag is set, the associated node SHALL NOT participate in the + * network. */ bool deleted = 10; /** - * A ledger ID.
+ * A ledger ID. + *

* This identifies the network that responded to this query. * The specific values are documented in [HIP-198] * (https://hips.hedera.com/hip/hip-198). @@ -112,18 +193,22 @@ message NodeInfo { } /** - * Response when the client sends the node NodeGetInfoQuery + * Response body for a `getNodeInfo` node information query. */ message NodeGetInfoResponse { /** - * The standard response information for queries.
- * This includes the values requested in the `QueryHeader`; - * cost, state proof, both, or neither. + * The standard response information for queries. + *

+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). */ - ResponseHeader header = 1; + proto.ResponseHeader header = 1; /** - * The information requested about this node instance + * The requested detail information. + *

+ * This message SHALL contain the full detail for the node identified in the + * query request. */ NodeInfo nodeInfo = 2; } diff --git a/services/node_update.proto b/services/node_update.proto index aa38a46d..9eb18828 100644 --- a/services/node_update.proto +++ b/services/node_update.proto @@ -1,10 +1,8 @@ syntax = "proto3"; -package proto; +package com.hedera.hapi.node.addressbook; /* - * Hedera Network Services Protobuf - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -28,47 +26,126 @@ import "google/protobuf/wrappers.proto"; import "basic_types.proto"; /** - * Modify the attribute of a node. If a field is not set in the transaction body, the - * corresponding node attribute will be unchanged. - * For phase 2, this marks node to be updated in the merkle tree and will be used to write config.txt and - * a-pulbic-NodeAlias.pem file per each node during prepare freeze. - * The node will not be updated until the network is upgraded. - * Original node account ID has to sign the transaction. + * Transaction body to modify address book node attributes. + * + * - This transaction SHALL enable the node operator, as identified by the + * node account, to modify operational attributes of the node. + * - This transaction MUST be signed by the active `key` for the current node + * account or by the Hedera governing council. + * - This transaction SHALL NOT change any field that is not set (is null) in + * this transaction body. + * - This SHALL create a pending update to the node, but the change SHALL NOT + * be immediately applied to the active configuration. + * - All pending node updates SHALL be applied to the active network + * configuration during the next `freeze` transaction with the field + * `freeze_type` set to `PREPARE_UPGRADE`. + * + * ### Record Stream Effects + * Upon completion the `node_id` for the updated entry SHALL be in the + * transaction receipt. */ message NodeUpdateTransactionBody { - /** - * The unique id of the Node to be updated. This must refer to an existing, non-deleted node. + * A consensus node identifier in the network state. + *

+ * The node identified MUST exist in the network address book.
+ * The node identified MUST NOT be deleted.
+ * This value is REQUIRED. */ uint64 node_id = 1; /** - * If set, the new node account_id. + * An account identifier. + *

+ * If set, this SHALL replace the node account identifier.
+ * If set, this transaction MUST be signed by the active `key` for _both_ + * the current node account _and_ the identified new node account. */ - AccountID account_id = 2; + proto.AccountID account_id = 2; /** - * If set, the new description to be associated with the node. + * A short description of the node. + *

+ * This value, if set, MUST NOT exceed 100 bytes when encoded as UTF-8.
+ * If set, this value SHALL replace the previous value. */ google.protobuf.StringValue description = 3; /** - * If set, the new ip address and port. + * A list of service endpoints for gossip. + *

+ * If set, this list MUST meet the following requirements. + *


+ * These endpoints SHALL represent the published endpoints to which other + * consensus nodes may _gossip_ transactions.
+ * These endpoints SHOULD NOT specify both address and DNS name.
+ * This list MUST NOT be empty.
+ * This list MUST NOT contain more than `10` entries.
+ * The first two entries in this list SHALL be the endpoints published to + * all consensus nodes.
+ * All other entries SHALL be reserved for future use. + *

+ * Each network may have additional requirements for these endpoints. + * A client MUST check network-specific documentation for those + * details.
+ *

Example
+ * Hedera Mainnet _requires_ that address be specified, and does not + * permit DNS name (FQDN) to be specified.
+ * Mainnet also requires that the first entry be an "internal" IP + * address and the second entry be an "external" IP address. + *
+ *
+ * Solo, however, _requires_ DNS name (FQDN) but also permits + * address. + *
+ *

+ * If set, the new list SHALL replace the existing list. */ - repeated ServiceEndpoint gossip_endpoint = 4; + repeated proto.ServiceEndpoint gossip_endpoint = 4; /** - * If set, replace the current list of service_endpoints. + * A list of service endpoints for gRPC calls. + *

+ * If set, this list MUST meet the following requirements. + *


+ * These endpoints SHALL represent the published endpoints to which clients + * may submit transactions.
+ * These endpoints SHOULD specify address and port.
+ * These endpoints MAY specify a DNS name.
+ * These endpoints SHOULD NOT specify both address and DNS name.
+ * This list MUST NOT be empty.
+ * This list MUST NOT contain more than `8` entries. + *

+ * Each network may have additional requirements for these endpoints. + * A client MUST check network-specific documentation for those + * details. + *

+ * If set, the new list SHALL replace the existing list. */ - repeated ServiceEndpoint service_endpoint = 5; + repeated proto.ServiceEndpoint service_endpoint = 5; /** - * If set, the new X509 certificate of the gossip node. + * A certificate used to sign gossip events. + *

+ * This value MUST be a certificate of a type permitted for gossip + * signatures.
+ * This value MUST be the DER encoding of the certificate presented. + *

+ * If set, the new value SHALL replace the existing bytes value. */ google.protobuf.BytesValue gossip_ca_certificate = 6; /** - * If set, the new grpc x509 certificate hash. + * A hash of the node gRPC TLS certificate. + *

+ * This value MAY be used to verify the certificate presented by the node + * during TLS negotiation for gRPC.
+ * This value MUST be a SHA-384 hash.
+ * The TLS certificate to be hashed MUST first be in PEM format and MUST be + * encoded with UTF-8 NFKD encoding to a stream of bytes provided to + * the hash algorithm.
+ *

+ * If set, the new value SHALL replace the existing hash value. */ google.protobuf.BytesValue grpc_certificate_hash = 7; -} \ No newline at end of file +} diff --git a/services/query.proto b/services/query.proto index 710cbfae..b3634fd3 100644 --- a/services/query.proto +++ b/services/query.proto @@ -2,12 +2,9 @@ syntax = "proto3"; package proto; -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ +/* + * Copyright (C) 2018-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 @@ -19,7 +16,6 @@ package proto; * 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"; @@ -161,19 +157,16 @@ message Query { */ NetworkGetVersionInfoQuery networkGetVersionInfo = 51; - /** * Get all information about a token */ TokenGetInfoQuery tokenGetInfo = 52; - /** * Get all information about a scheduled entity */ ScheduleGetInfoQuery scheduleGetInfo = 53; - /** * Get a list of NFTs associated with the account */ @@ -200,8 +193,17 @@ message Query { GetAccountDetailsQuery accountDetails = 58; /** - * Get all information about a node + * Request detail information for a consensus node within the network + * address book. + *

+ * This query is a privileged action that requires signature from the + * Hedera governing council.
+ * The response, when successful, SHALL contain the full information + * currently available, including current status, for the single + * consensus node identifier provided.
+ * The node queried MAY be active, inactive, deleted, or pending a + * change at the next network upgrade. */ - NodeGetInfoQuery nodeGetInfo = 59; + com.hedera.hapi.node.addressbook.NodeGetInfoQuery nodeGetInfo = 59; } } diff --git a/services/response.proto b/services/response.proto index ec8eda76..34e44405 100644 --- a/services/response.proto +++ b/services/response.proto @@ -194,8 +194,12 @@ message Response { GetAccountDetailsResponse accountDetails = 158; /** - * Get all information about a node + * A response to a query of the current state of a consensus node + * in the network address book state. + *

+ * Hedera governing council authorization is REQUIRED for + * this transaction. */ - NodeGetInfoResponse nodeGetInfo = 159; + com.hedera.hapi.node.addressbook.NodeGetInfoResponse nodeGetInfo = 159; } } diff --git a/services/response_code.proto b/services/response_code.proto index fa473ceb..a94abc17 100644 --- a/services/response_code.proto +++ b/services/response_code.proto @@ -2,12 +2,9 @@ syntax = "proto3"; package proto; -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ +/* + * Copyright (C) 2018-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 @@ -19,7 +16,6 @@ package proto; * 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"; @@ -30,1413 +26,1437 @@ option java_multiple_files = true; * UNDOCUMENTED */ enum ResponseCodeEnum { - /** - * The transaction passed the precheck validations. - */ - OK = 0; - - /** - * For any error not handled by specific error codes listed below. - */ - INVALID_TRANSACTION = 1; - - /** - * Payer account does not exist. - */ - PAYER_ACCOUNT_NOT_FOUND = 2; - - /** - * Node Account provided does not match the node account of the node the transaction was submitted - * to. - */ - INVALID_NODE_ACCOUNT = 3; - - /** - * Pre-Check error when TransactionValidStart + transactionValidDuration is less than current - * consensus time. - */ - TRANSACTION_EXPIRED = 4; - - /** - * Transaction start time is greater than current consensus time - */ - INVALID_TRANSACTION_START = 5; - - /** - * The given transactionValidDuration was either non-positive, or greater than the maximum - * valid duration of 180 secs. - * - */ - INVALID_TRANSACTION_DURATION = 6; - - /** - * The transaction signature is not valid - */ - INVALID_SIGNATURE = 7; - - /** - * Transaction memo size exceeded 100 bytes - */ - MEMO_TOO_LONG = 8; - - /** - * The fee provided in the transaction is insufficient for this type of transaction - */ - INSUFFICIENT_TX_FEE = 9; - - /** - * The payer account has insufficient cryptocurrency to pay the transaction fee - */ - INSUFFICIENT_PAYER_BALANCE = 10; - - /** - * This transaction ID is a duplicate of one that was submitted to this node or reached consensus - * in the last 180 seconds (receipt period) - */ - DUPLICATE_TRANSACTION = 11; - - /** - * If API is throttled out - */ - BUSY = 12; - - /** - * The API is not currently supported - */ - NOT_SUPPORTED = 13; - - /** - * The file id is invalid or does not exist - */ - INVALID_FILE_ID = 14; - - /** - * The account id is invalid or does not exist - */ - INVALID_ACCOUNT_ID = 15; - - /** - * The contract id is invalid or does not exist - */ - INVALID_CONTRACT_ID = 16; - - /** - * Transaction id is not valid - */ - INVALID_TRANSACTION_ID = 17; - - /** - * Receipt for given transaction id does not exist - */ - RECEIPT_NOT_FOUND = 18; - - /** - * Record for given transaction id does not exist - */ - RECORD_NOT_FOUND = 19; - - /** - * The solidity id is invalid or entity with this solidity id does not exist - */ - INVALID_SOLIDITY_ID = 20; - - /** - * The responding node has submitted the transaction to the network. Its final status is still - * unknown. - */ - UNKNOWN = 21; - - /** - * The transaction succeeded - */ - SUCCESS = 22; - - /** - * There was a system error and the transaction failed because of invalid request parameters. - */ - FAIL_INVALID = 23; - - /** - * There was a system error while performing fee calculation, reserved for future. - */ - FAIL_FEE = 24; - - /** - * There was a system error while performing balance checks, reserved for future. - */ - FAIL_BALANCE = 25; - - /** - * Key not provided in the transaction body - */ - KEY_REQUIRED = 26; - - /** - * Unsupported algorithm/encoding used for keys in the transaction - */ - BAD_ENCODING = 27; - - /** - * When the account balance is not sufficient for the transfer - */ - INSUFFICIENT_ACCOUNT_BALANCE = 28; - - /** - * During an update transaction when the system is not able to find the Users Solidity address - */ - INVALID_SOLIDITY_ADDRESS = 29; - - /** - * Not enough gas was supplied to execute transaction - */ - INSUFFICIENT_GAS = 30; - - /** - * contract byte code size is over the limit - */ - CONTRACT_SIZE_LIMIT_EXCEEDED = 31; - - /** - * local execution (query) is requested for a function which changes state - */ - LOCAL_CALL_MODIFICATION_EXCEPTION = 32; - - /** - * Contract REVERT OPCODE executed - */ - CONTRACT_REVERT_EXECUTED = 33; - - /** - * For any contract execution related error not handled by specific error codes listed above. - */ - CONTRACT_EXECUTION_EXCEPTION = 34; - - /** - * In Query validation, account with +ve(amount) value should be Receiving node account, the - * receiver account should be only one account in the list - */ - INVALID_RECEIVING_NODE_ACCOUNT = 35; - - /** - * Header is missing in Query request - */ - MISSING_QUERY_HEADER = 36; - - /** - * The update of the account failed - */ - ACCOUNT_UPDATE_FAILED = 37; - - /** - * Provided key encoding was not supported by the system - */ - INVALID_KEY_ENCODING = 38; - - /** - * null solidity address - */ - NULL_SOLIDITY_ADDRESS = 39; - - /** - * update of the contract failed - */ - CONTRACT_UPDATE_FAILED = 40; - - /** - * the query header is invalid - */ - INVALID_QUERY_HEADER = 41; - - /** - * Invalid fee submitted - */ - INVALID_FEE_SUBMITTED = 42; - - /** - * Payer signature is invalid - */ - INVALID_PAYER_SIGNATURE = 43; - - /** - * The keys were not provided in the request. - */ - KEY_NOT_PROVIDED = 44; - - /** - * Expiration time provided in the transaction was invalid. - */ - INVALID_EXPIRATION_TIME = 45; - - /** - * WriteAccess Control Keys are not provided for the file - */ - NO_WACL_KEY = 46; - - /** - * The contents of file are provided as empty. - */ - FILE_CONTENT_EMPTY = 47; - - /** - * The crypto transfer credit and debit do not sum equal to 0 - */ - INVALID_ACCOUNT_AMOUNTS = 48; - - /** - * Transaction body provided is empty - */ - EMPTY_TRANSACTION_BODY = 49; - - /** - * Invalid transaction body provided - */ - INVALID_TRANSACTION_BODY = 50; - - /** - * the type of key (base ed25519 key, KeyList, or ThresholdKey) does not match the type of - * signature (base ed25519 signature, SignatureList, or ThresholdKeySignature) - */ - INVALID_SIGNATURE_TYPE_MISMATCHING_KEY = 51; - - /** - * the number of key (KeyList, or ThresholdKey) does not match that of signature (SignatureList, - * or ThresholdKeySignature). e.g. if a keyList has 3 base keys, then the corresponding - * signatureList should also have 3 base signatures. - */ - INVALID_SIGNATURE_COUNT_MISMATCHING_KEY = 52; - - /** - * the livehash body is empty - */ - EMPTY_LIVE_HASH_BODY = 53; - - /** - * the livehash data is missing - */ - EMPTY_LIVE_HASH = 54; - - /** - * the keys for a livehash are missing - */ - EMPTY_LIVE_HASH_KEYS = 55; - - /** - * the livehash data is not the output of a SHA-384 digest - */ - INVALID_LIVE_HASH_SIZE = 56; - - /** - * the query body is empty - */ - EMPTY_QUERY_BODY = 57; - - /** - * the crypto livehash query is empty - */ - EMPTY_LIVE_HASH_QUERY = 58; - - /** - * the livehash is not present - */ - LIVE_HASH_NOT_FOUND = 59; - - /** - * the account id passed has not yet been created. - */ - ACCOUNT_ID_DOES_NOT_EXIST = 60; - - /** - * the livehash already exists for a given account - */ - LIVE_HASH_ALREADY_EXISTS = 61; - - /** - * File WACL keys are invalid - */ - INVALID_FILE_WACL = 62; - - /** - * Serialization failure - */ - SERIALIZATION_FAILED = 63; - - /** - * The size of the Transaction is greater than transactionMaxBytes - */ - TRANSACTION_OVERSIZE = 64; - - /** - * The Transaction has more than 50 levels - */ - TRANSACTION_TOO_MANY_LAYERS = 65; - - /** - * Contract is marked as deleted - */ - CONTRACT_DELETED = 66; - - /** - * the platform node is either disconnected or lagging behind. - */ - PLATFORM_NOT_ACTIVE = 67; - - /** - * one public key matches more than one prefixes on the signature map - */ - KEY_PREFIX_MISMATCH = 68; - - /** - * transaction not created by platform due to large backlog - */ - PLATFORM_TRANSACTION_NOT_CREATED = 69; - - /** - * auto renewal period is not a positive number of seconds - */ - INVALID_RENEWAL_PERIOD = 70; - - /** - * the response code when a smart contract id is passed for a crypto API request - */ - INVALID_PAYER_ACCOUNT_ID = 71; - - /** - * the account has been marked as deleted - */ - ACCOUNT_DELETED = 72; - - /** - * the file has been marked as deleted - */ - FILE_DELETED = 73; - - /** - * same accounts repeated in the transfer account list - */ - ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS = 74; - - /** - * attempting to set negative balance value for crypto account - */ - SETTING_NEGATIVE_ACCOUNT_BALANCE = 75; - - /** - * when deleting smart contract that has crypto balance either transfer account or transfer smart - * contract is required - */ - OBTAINER_REQUIRED = 76; - - /** - * when deleting smart contract that has crypto balance you can not use the same contract id as - * transferContractId as the one being deleted - */ - OBTAINER_SAME_CONTRACT_ID = 77; - - /** - * transferAccountId or transferContractId specified for contract delete does not exist - */ - OBTAINER_DOES_NOT_EXIST = 78; - - /** - * attempting to modify (update or delete a immutable smart contract, i.e. one created without a - * admin key) - */ - MODIFYING_IMMUTABLE_CONTRACT = 79; - - /** - * Unexpected exception thrown by file system functions - */ - FILE_SYSTEM_EXCEPTION = 80; - - /** - * the duration is not a subset of [MINIMUM_AUTORENEW_DURATION,MAXIMUM_AUTORENEW_DURATION] - */ - AUTORENEW_DURATION_NOT_IN_RANGE = 81; - - /** - * Decoding the smart contract binary to a byte array failed. Check that the input is a valid hex - * string. - */ - ERROR_DECODING_BYTESTRING = 82; - - /** - * File to create a smart contract was of length zero - */ - CONTRACT_FILE_EMPTY = 83; - - /** - * Bytecode for smart contract is of length zero - */ - CONTRACT_BYTECODE_EMPTY = 84; - - /** - * Attempt to set negative initial balance - */ - INVALID_INITIAL_BALANCE = 85; - - /** - * [Deprecated]. attempt to set negative receive record threshold - */ - INVALID_RECEIVE_RECORD_THRESHOLD = 86 [deprecated = true]; - - /** - * [Deprecated]. attempt to set negative send record threshold - */ - INVALID_SEND_RECORD_THRESHOLD = 87 [deprecated = true]; - - /** - * Special Account Operations should be performed by only Genesis account, return this code if it - * is not Genesis Account - */ - ACCOUNT_IS_NOT_GENESIS_ACCOUNT = 88; - - /** - * The fee payer account doesn't have permission to submit such Transaction - */ - PAYER_ACCOUNT_UNAUTHORIZED = 89; - - /** - * FreezeTransactionBody is invalid - */ - INVALID_FREEZE_TRANSACTION_BODY = 90; - - /** - * FreezeTransactionBody does not exist - */ - FREEZE_TRANSACTION_BODY_NOT_FOUND = 91; - - /** - * Exceeded the number of accounts (both from and to) allowed for crypto transfer list - */ - TRANSFER_LIST_SIZE_LIMIT_EXCEEDED = 92; - - /** - * Smart contract result size greater than specified maxResultSize - */ - RESULT_SIZE_LIMIT_EXCEEDED = 93; - - /** - * The payer account is not a special account(account 0.0.55) - */ - NOT_SPECIAL_ACCOUNT = 94; - - /** - * Negative gas was offered in smart contract call - */ - CONTRACT_NEGATIVE_GAS = 95; - - /** - * Negative value / initial balance was specified in a smart contract call / create - */ - CONTRACT_NEGATIVE_VALUE = 96; - - /** - * Failed to update fee file - */ - INVALID_FEE_FILE = 97; - - /** - * Failed to update exchange rate file - */ - INVALID_EXCHANGE_RATE_FILE = 98; - - /** - * Payment tendered for contract local call cannot cover both the fee and the gas - */ - INSUFFICIENT_LOCAL_CALL_GAS = 99; - - /** - * Entities with Entity ID below 1000 are not allowed to be deleted - */ - ENTITY_NOT_ALLOWED_TO_DELETE = 100; - - /** - * Violating one of these rules: 1) treasury account can update all entities below 0.0.1000, 2) - * account 0.0.50 can update all entities from 0.0.51 - 0.0.80, 3) Network Function Master Account - * A/c 0.0.50 - Update all Network Function accounts & perform all the Network Functions listed - * below, 4) Network Function Accounts: i) A/c 0.0.55 - Update Address Book files (0.0.101/102), - * ii) A/c 0.0.56 - Update Fee schedule (0.0.111), iii) A/c 0.0.57 - Update Exchange Rate - * (0.0.112). - */ - AUTHORIZATION_FAILED = 101; - - /** - * Fee Schedule Proto uploaded but not valid (append or update is required) - */ - FILE_UPLOADED_PROTO_INVALID = 102; - - /** - * Fee Schedule Proto uploaded but not valid (append or update is required) - */ - FILE_UPLOADED_PROTO_NOT_SAVED_TO_DISK = 103; - - /** - * Fee Schedule Proto File Part uploaded - */ - FEE_SCHEDULE_FILE_PART_UPLOADED = 104; - - /** - * The change on Exchange Rate exceeds Exchange_Rate_Allowed_Percentage - */ - EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED = 105; - - /** - * Contract permanent storage exceeded the currently allowable limit - */ - MAX_CONTRACT_STORAGE_EXCEEDED = 106; - - /** - * Transfer Account should not be same as Account to be deleted - */ - TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT = 107; - - TOTAL_LEDGER_BALANCE_INVALID = 108; - /** - * The expiration date/time on a smart contract may not be reduced - */ - EXPIRATION_REDUCTION_NOT_ALLOWED = 110; - - /** - * Gas exceeded currently allowable gas limit per transaction - */ - MAX_GAS_LIMIT_EXCEEDED = 111; - - /** - * File size exceeded the currently allowable limit - */ - MAX_FILE_SIZE_EXCEEDED = 112; - - /** - * When a valid signature is not provided for operations on account with receiverSigRequired=true - */ - RECEIVER_SIG_REQUIRED = 113; - - /** - * The Topic ID specified is not in the system. - */ - INVALID_TOPIC_ID = 150; - - /** - * A provided admin key was invalid. Verify the bytes for an Ed25519 public key are exactly 32 bytes; and the bytes for a compressed ECDSA(secp256k1) key are exactly 33 bytes, with the first byte either 0x02 or 0x03.. - */ - INVALID_ADMIN_KEY = 155; - - /** - * A provided submit key was invalid. - */ - INVALID_SUBMIT_KEY = 156; - - /** - * An attempted operation was not authorized (ie - a deleteTopic for a topic with no adminKey). - */ - UNAUTHORIZED = 157; - - /** - * A ConsensusService message is empty. - */ - INVALID_TOPIC_MESSAGE = 158; - - /** - * The autoRenewAccount specified is not a valid, active account. - */ - INVALID_AUTORENEW_ACCOUNT = 159; - - /** - * An adminKey was not specified on the topic, so there must not be an autoRenewAccount. - */ - AUTORENEW_ACCOUNT_NOT_ALLOWED = 160; - - /** - * The topic has expired, was not automatically renewed, and is in a 7 day grace period before the - * topic will be deleted unrecoverably. This error response code will not be returned until - * autoRenew functionality is supported by HAPI. - */ - TOPIC_EXPIRED = 162; - - INVALID_CHUNK_NUMBER = 163; // chunk number must be from 1 to total (chunks) inclusive. - INVALID_CHUNK_TRANSACTION_ID = 164; // For every chunk, the payer account that is part of initialTransactionID must match the Payer Account of this transaction. The entire initialTransactionID should match the transactionID of the first chunk, but this is not checked or enforced by Hedera except when the chunk number is 1. - ACCOUNT_FROZEN_FOR_TOKEN = 165; // Account is frozen and cannot transact with the token - TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED = 166; // An involved account already has more than tokens.maxPerAccount associations with non-deleted tokens. - INVALID_TOKEN_ID = 167; // The token is invalid or does not exist - INVALID_TOKEN_DECIMALS = 168; // Invalid token decimals - INVALID_TOKEN_INITIAL_SUPPLY = 169; // Invalid token initial supply - INVALID_TREASURY_ACCOUNT_FOR_TOKEN = 170; // Treasury Account does not exist or is deleted - INVALID_TOKEN_SYMBOL = 171; // Token Symbol is not UTF-8 capitalized alphabetical string - TOKEN_HAS_NO_FREEZE_KEY = 172; // Freeze key is not set on token - TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN = 173; // Amounts in transfer list are not net zero - MISSING_TOKEN_SYMBOL = 174; // A token symbol was not provided - TOKEN_SYMBOL_TOO_LONG = 175; // The provided token symbol was too long - ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN = 176; // KYC must be granted and account does not have KYC granted - TOKEN_HAS_NO_KYC_KEY = 177; // KYC key is not set on token - INSUFFICIENT_TOKEN_BALANCE = 178; // Token balance is not sufficient for the transaction - TOKEN_WAS_DELETED = 179; // Token transactions cannot be executed on deleted token - TOKEN_HAS_NO_SUPPLY_KEY = 180; // Supply key is not set on token - TOKEN_HAS_NO_WIPE_KEY = 181; // Wipe key is not set on token - INVALID_TOKEN_MINT_AMOUNT = 182; // The requested token mint amount would cause an invalid total supply - INVALID_TOKEN_BURN_AMOUNT = 183; // The requested token burn amount would cause an invalid total supply - TOKEN_NOT_ASSOCIATED_TO_ACCOUNT = 184; // A required token-account relationship is missing - CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT = 185; // The target of a wipe operation was the token treasury account - INVALID_KYC_KEY = 186; // The provided KYC key was invalid. - INVALID_WIPE_KEY = 187; // The provided wipe key was invalid. - INVALID_FREEZE_KEY = 188; // The provided freeze key was invalid. - INVALID_SUPPLY_KEY = 189; // The provided supply key was invalid. - MISSING_TOKEN_NAME = 190; // Token Name is not provided - TOKEN_NAME_TOO_LONG = 191; // Token Name is too long - INVALID_WIPING_AMOUNT = 192; // The provided wipe amount must not be negative, zero or bigger than the token holder balance - TOKEN_IS_IMMUTABLE = 193; // Token does not have Admin key set, thus update/delete transactions cannot be performed - TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT = 194; // An associateToken operation specified a token already associated to the account - TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES = 195; // An attempted operation is invalid until all token balances for the target account are zero - ACCOUNT_IS_TREASURY = 196; // An attempted operation is invalid because the account is a treasury - TOKEN_ID_REPEATED_IN_TOKEN_LIST = 197; // Same TokenIDs present in the token list - TOKEN_TRANSFER_LIST_SIZE_LIMIT_EXCEEDED = 198; // Exceeded the number of token transfers (both from and to) allowed for token transfer list - EMPTY_TOKEN_TRANSFER_BODY = 199; // TokenTransfersTransactionBody has no TokenTransferList - EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS = 200; // TokenTransfersTransactionBody has a TokenTransferList with no AccountAmounts - - /** - * The Scheduled entity does not exist; or has now expired, been deleted, or been executed - */ - INVALID_SCHEDULE_ID = 201; - - /** - * The Scheduled entity cannot be modified. Admin key not set - */ - SCHEDULE_IS_IMMUTABLE = 202; - - /** - * The provided Scheduled Payer does not exist - */ - INVALID_SCHEDULE_PAYER_ID = 203; - - /** - * The Schedule Create Transaction TransactionID account does not exist - */ - INVALID_SCHEDULE_ACCOUNT_ID = 204; - - /** - * The provided sig map did not contain any new valid signatures from required signers of the scheduled transaction - */ - NO_NEW_VALID_SIGNATURES = 205; - - /** - * The required signers for a scheduled transaction cannot be resolved, for example because they do not exist or have been deleted - */ - UNRESOLVABLE_REQUIRED_SIGNERS = 206; - - /** - * Only whitelisted transaction types may be scheduled - */ - SCHEDULED_TRANSACTION_NOT_IN_WHITELIST = 207; - - /** - * At least one of the signatures in the provided sig map did not represent a valid signature for any required signer - */ - SOME_SIGNATURES_WERE_INVALID = 208; - - /** - * The scheduled field in the TransactionID may not be set to true - */ - TRANSACTION_ID_FIELD_NOT_ALLOWED = 209; - - /** - * A schedule already exists with the same identifying fields of an attempted ScheduleCreate (that is, all fields other than scheduledPayerAccountID) - */ - IDENTICAL_SCHEDULE_ALREADY_CREATED = 210; - - /** - * A string field in the transaction has a UTF-8 encoding with the prohibited zero byte - */ - INVALID_ZERO_BYTE_IN_STRING = 211; - - /** - * A schedule being signed or deleted has already been deleted - */ - SCHEDULE_ALREADY_DELETED = 212; - - /** - * A schedule being signed or deleted has already been executed - */ - SCHEDULE_ALREADY_EXECUTED = 213; - - /** - * ConsensusSubmitMessage request's message size is larger than allowed. - */ - MESSAGE_SIZE_TOO_LARGE = 214; - - /** - * An operation was assigned to more than one throttle group in a given bucket - */ - OPERATION_REPEATED_IN_BUCKET_GROUPS = 215; - - /** - * The capacity needed to satisfy all opsPerSec groups in a bucket overflowed a signed 8-byte integral type - */ - BUCKET_CAPACITY_OVERFLOW = 216; - - /** - * Given the network size in the address book, the node-level capacity for an operation would never be enough to accept a single request; usually means a bucket burstPeriod should be increased - */ - NODE_CAPACITY_NOT_SUFFICIENT_FOR_OPERATION = 217; - - /** - * A bucket was defined without any throttle groups - */ - BUCKET_HAS_NO_THROTTLE_GROUPS = 218; - - /** - * A throttle group was granted zero opsPerSec - */ - THROTTLE_GROUP_HAS_ZERO_OPS_PER_SEC = 219; - - /** - * The throttle definitions file was updated, but some supported operations were not assigned a bucket - */ - SUCCESS_BUT_MISSING_EXPECTED_OPERATION = 220; - - /** - * The new contents for the throttle definitions system file were not valid protobuf - */ - UNPARSEABLE_THROTTLE_DEFINITIONS = 221; - - /** - * The new throttle definitions system file were invalid, and no more specific error could be divined - */ - INVALID_THROTTLE_DEFINITIONS = 222; - - /** - * The transaction references an account which has passed its expiration without renewal funds available, and currently remains in the ledger only because of the grace period given to expired entities - */ - ACCOUNT_EXPIRED_AND_PENDING_REMOVAL = 223; - - /** - * Invalid token max supply - */ - INVALID_TOKEN_MAX_SUPPLY = 224; - - /** - * Invalid token nft serial number - */ - INVALID_TOKEN_NFT_SERIAL_NUMBER = 225; - - /** - * Invalid nft id - */ - INVALID_NFT_ID = 226; - - /** - * Nft metadata is too long - */ - METADATA_TOO_LONG = 227; - - /** - * Repeated operations count exceeds the limit - */ - BATCH_SIZE_LIMIT_EXCEEDED = 228; - - /** - * The range of data to be gathered is out of the set boundaries - */ - INVALID_QUERY_RANGE = 229; - - /** - * A custom fractional fee set a denominator of zero - */ - FRACTION_DIVIDES_BY_ZERO = 230; - - /** - * The transaction payer could not afford a custom fee - */ - INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE = 231 [deprecated = true]; - - /** - * More than 10 custom fees were specified - */ - CUSTOM_FEES_LIST_TOO_LONG = 232; - - /** - * Any of the feeCollector accounts for customFees is invalid - */ - INVALID_CUSTOM_FEE_COLLECTOR = 233; - - /** - * Any of the token Ids in customFees is invalid - */ - INVALID_TOKEN_ID_IN_CUSTOM_FEES = 234; - - /** - * Any of the token Ids in customFees are not associated to feeCollector - */ - TOKEN_NOT_ASSOCIATED_TO_FEE_COLLECTOR = 235; - - /** - * A token cannot have more units minted due to its configured supply ceiling - */ - TOKEN_MAX_SUPPLY_REACHED = 236; - - /** - * The transaction attempted to move an NFT serial number from an account other than its owner - */ - SENDER_DOES_NOT_OWN_NFT_SERIAL_NO = 237; - - /** - * A custom fee schedule entry did not specify either a fixed or fractional fee - */ - CUSTOM_FEE_NOT_FULLY_SPECIFIED = 238; - - /** - * Only positive fees may be assessed at this time - */ - CUSTOM_FEE_MUST_BE_POSITIVE = 239; - - /** - * Fee schedule key is not set on token - */ - TOKEN_HAS_NO_FEE_SCHEDULE_KEY = 240; - - /** - * A fractional custom fee exceeded the range of a 64-bit signed integer - */ - CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE = 241; - - /** - * A royalty cannot exceed the total fungible value exchanged for an NFT - */ - ROYALTY_FRACTION_CANNOT_EXCEED_ONE = 242; - - /** - * Each fractional custom fee must have its maximum_amount, if specified, at least its minimum_amount - */ - FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT = 243; - - /** - * A fee schedule update tried to clear the custom fees from a token whose fee schedule was already empty - */ - CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES = 244; - - /** - * Only tokens of type FUNGIBLE_COMMON can be used to as fee schedule denominations - */ - CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON = 245; - - /** - * Only tokens of type FUNGIBLE_COMMON can have fractional fees - */ - CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON = 246; - - /** - * The provided custom fee schedule key was invalid - */ - INVALID_CUSTOM_FEE_SCHEDULE_KEY = 247; - - /** - * The requested token mint metadata was invalid - */ - INVALID_TOKEN_MINT_METADATA = 248; - - /** - * The requested token burn metadata was invalid - */ - INVALID_TOKEN_BURN_METADATA = 249; - - /** - * The treasury for a unique token cannot be changed until it owns no NFTs - */ - CURRENT_TREASURY_STILL_OWNS_NFTS = 250; - - /** - * An account cannot be dissociated from a unique token if it owns NFTs for the token - */ - ACCOUNT_STILL_OWNS_NFTS = 251; - - /** - * A NFT can only be burned when owned by the unique token's treasury - */ - TREASURY_MUST_OWN_BURNED_NFT = 252; - - /** - * An account did not own the NFT to be wiped - */ - ACCOUNT_DOES_NOT_OWN_WIPED_NFT = 253; - - /** - * An AccountAmount token transfers list referenced a token type other than FUNGIBLE_COMMON - */ - ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON = 254; - - /** - * All the NFTs allowed in the current price regime have already been minted - */ - MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED = 255; - - /** - * The payer account has been marked as deleted - */ - PAYER_ACCOUNT_DELETED = 256; - - /** - * The reference chain of custom fees for a transferred token exceeded the maximum length of 2 - */ - CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH = 257; - - /** - * More than 20 balance adjustments were to satisfy a CryptoTransfer and its implied custom fee payments - */ - CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS = 258; - - /** - * The sender account in the token transfer transaction could not afford a custom fee - */ - INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE = 259; - - /** - * Currently no more than 4,294,967,295 NFTs may be minted for a given unique token type - */ - SERIAL_NUMBER_LIMIT_REACHED = 260; - - /** - * Only tokens of type NON_FUNGIBLE_UNIQUE can have royalty fees - */ - CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE = 261; - - /** - * The account has reached the limit on the automatic associations count. - */ - NO_REMAINING_AUTOMATIC_ASSOCIATIONS = 262; - - /** - * Already existing automatic associations are more than the new maximum automatic associations. - */ - EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT = 263; - - /** - * Cannot set the number of automatic associations for an account more than the maximum allowed - * token associations tokens.maxPerAccount. - */ - 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; - - /** - * A precompiled contract succeeded, but was later reverted. - */ - REVERTED_SUCCESS = 280; - - /** - * All contract storage allocated to the current price regime has been consumed. - */ - MAX_STORAGE_IN_PRICE_REGIME_HAS_BEEN_USED = 281; - - /** - * An alias used in a CryptoTransfer transaction is not the serialization of a primitive Key - * message--that is, a Key with a single Ed25519 or ECDSA(secp256k1) public key and no - * unknown protobuf fields. - */ - INVALID_ALIAS_KEY = 282; - - /** - * A fungible token transfer expected a different number of decimals than the involved - * type actually has. - */ - UNEXPECTED_TOKEN_DECIMALS = 283; - - /** - * [Deprecated] The proxy account id is invalid or does not exist. - */ - INVALID_PROXY_ACCOUNT_ID = 284 [deprecated = true]; - - /** - * The transfer account id in CryptoDelete transaction is invalid or does not exist. - */ - INVALID_TRANSFER_ACCOUNT_ID = 285; - - /** - * The fee collector account id in TokenFeeScheduleUpdate is invalid or does not exist. - */ - INVALID_FEE_COLLECTOR_ACCOUNT_ID = 286; - - /** - * The alias already set on an account cannot be updated using CryptoUpdate transaction. - */ - ALIAS_IS_IMMUTABLE = 287; - - /** - * An approved allowance specifies a spender account that is the same as the hbar/token - * owner account. - */ - SPENDER_ACCOUNT_SAME_AS_OWNER = 288; - - /** - * The establishment or adjustment of an approved allowance cause the token allowance - * to exceed the token maximum supply. - */ - AMOUNT_EXCEEDS_TOKEN_MAX_SUPPLY = 289; - - /** - * The specified amount for an approved allowance cannot be negative. - */ - NEGATIVE_ALLOWANCE_AMOUNT = 290; - - /** - * [Deprecated] The approveForAll flag cannot be set for a fungible token. - */ - CANNOT_APPROVE_FOR_ALL_FUNGIBLE_COMMON = 291 [deprecated = true]; - - /** - * The spender does not have an existing approved allowance with the hbar/token owner. - */ - SPENDER_DOES_NOT_HAVE_ALLOWANCE = 292; - - /** - * The transfer amount exceeds the current approved allowance for the spender account. - */ - AMOUNT_EXCEEDS_ALLOWANCE = 293; - - /** - * The payer account of an approveAllowances or adjustAllowance transaction is attempting - * to go beyond the maximum allowed number of allowances. - */ - MAX_ALLOWANCES_EXCEEDED = 294; - - /** - * No allowances have been specified in the approval transaction. - */ - EMPTY_ALLOWANCES = 295; - - /** - * [Deprecated] Spender is repeated more than once in Crypto or Token or NFT allowance lists in a single - * CryptoApproveAllowance transaction. - */ - SPENDER_ACCOUNT_REPEATED_IN_ALLOWANCES = 296 [deprecated = true]; - - /** - * [Deprecated] Serial numbers are repeated in nft allowance for a single spender account - */ - REPEATED_SERIAL_NUMS_IN_NFT_ALLOWANCES = 297 [deprecated = true]; - - /** - * Fungible common token used in NFT allowances - */ - FUNGIBLE_TOKEN_IN_NFT_ALLOWANCES = 298; - - /** - * Non fungible token used in fungible token allowances - */ - NFT_IN_FUNGIBLE_TOKEN_ALLOWANCES = 299; - - /** - * The account id specified as the owner is invalid or does not exist. - */ - INVALID_ALLOWANCE_OWNER_ID = 300; - - /** - * The account id specified as the spender is invalid or does not exist. - */ - INVALID_ALLOWANCE_SPENDER_ID = 301; - - /** - * [Deprecated] If the CryptoDeleteAllowance transaction has repeated crypto or token or Nft allowances to delete. - */ - REPEATED_ALLOWANCES_TO_DELETE = 302 [deprecated = true]; - - /** - * If the account Id specified as the delegating spender is invalid or does not exist. - */ - INVALID_DELEGATING_SPENDER = 303; - - /** - * The delegating Spender cannot grant approveForAll allowance on a NFT token type for another spender. - */ - DELEGATING_SPENDER_CANNOT_GRANT_APPROVE_FOR_ALL = 304; - - /** - * The delegating Spender cannot grant allowance on a NFT serial for another spender as it doesnt not have approveForAll - * granted on token-owner. - */ - DELEGATING_SPENDER_DOES_NOT_HAVE_APPROVE_FOR_ALL = 305; - - /** - * The scheduled transaction could not be created because it's expiration_time was too far in the future. - */ - SCHEDULE_EXPIRATION_TIME_TOO_FAR_IN_FUTURE = 306; - - /** - * The scheduled transaction could not be created because it's expiration_time was less than or equal to the consensus time. - */ - SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME = 307; - - /** - * The scheduled transaction could not be created because it would cause throttles to be violated on the specified expiration_time. - */ - SCHEDULE_FUTURE_THROTTLE_EXCEEDED = 308; - - /** - * The scheduled transaction could not be created because it would cause the gas limit to be violated on the specified expiration_time. - */ - SCHEDULE_FUTURE_GAS_LIMIT_EXCEEDED = 309; - - /** - * The ethereum transaction either failed parsing or failed signature validation, or some other EthereumTransaction error not covered by another response code. - */ - INVALID_ETHEREUM_TRANSACTION = 310; - - /** - * EthereumTransaction was signed against a chainId that this network does not support. - */ - WRONG_CHAIN_ID = 311; - - /** - * This transaction specified an ethereumNonce that is not the current ethereumNonce of the account. - */ - WRONG_NONCE = 312; - - /** - * The ethereum transaction specified an access list, which the network does not support. - */ - ACCESS_LIST_UNSUPPORTED = 313; - - /** - * A schedule being signed or deleted has passed it's expiration date and is pending execution if needed and then expiration. - */ - SCHEDULE_PENDING_EXPIRATION = 314; - - /** - * A selfdestruct or ContractDelete targeted a contract that is a token treasury. - */ - CONTRACT_IS_TOKEN_TREASURY = 315; - - /** - * A selfdestruct or ContractDelete targeted a contract with non-zero token balances. - */ - CONTRACT_HAS_NON_ZERO_TOKEN_BALANCES = 316; - - /** - * A contract referenced by a transaction is "detached"; that is, expired and lacking any - * hbar funds for auto-renewal payment---but still within its post-expiry grace period. - */ - CONTRACT_EXPIRED_AND_PENDING_REMOVAL = 317; - - /** - * A ContractUpdate requested removal of a contract's auto-renew account, but that contract has - * no auto-renew account. - */ - CONTRACT_HAS_NO_AUTO_RENEW_ACCOUNT = 318; - - /** - * A delete transaction submitted via HAPI set permanent_removal=true - */ - PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION = 319; - - /* - * A CryptoCreate or ContractCreate used the deprecated proxyAccountID field. - */ - PROXY_ACCOUNT_ID_FIELD_IS_DEPRECATED = 320; - - /** - * An account set the staked_account_id to itself in CryptoUpdate or ContractUpdate transactions. - */ - SELF_STAKING_IS_NOT_ALLOWED = 321; - - /** - * The staking account id or staking node id given is invalid or does not exist. - */ - INVALID_STAKING_ID = 322; - - /** - * Native staking, while implemented, has not yet enabled by the council. - */ - STAKING_NOT_ENABLED = 323; - - /** - * The range provided in UtilPrng transaction is negative. - */ - INVALID_PRNG_RANGE = 324; - - /** - * The maximum number of entities allowed in the current price regime have been created. - */ - MAX_ENTITIES_IN_PRICE_REGIME_HAVE_BEEN_CREATED = 325; - - /** - * The full prefix signature for precompile is not valid - */ - INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE = 326; - - /** - * The combined balances of a contract and its auto-renew account (if any) did not cover - * the rent charged for net new storage used in a transaction. - */ - INSUFFICIENT_BALANCES_FOR_STORAGE_RENT = 327; - - /** - * A contract transaction tried to use more than the allowed number of child records, via - * either system contract records or internal contract creations. - */ - MAX_CHILD_RECORDS_EXCEEDED = 328; - - /** - * The combined balances of a contract and its auto-renew account (if any) or balance of an account did not cover - * the auto-renewal fees in a transaction. - */ - INSUFFICIENT_BALANCES_FOR_RENEWAL_FEES = 329; - - /** - * A transaction's protobuf message includes unknown fields; could mean that a client - * expects not-yet-released functionality to be available. - */ - TRANSACTION_HAS_UNKNOWN_FIELDS = 330; - - /** - * The account cannot be modified. Account's key is not set - */ - ACCOUNT_IS_IMMUTABLE = 331; - - /** - * An alias that is assigned to an account or contract cannot be assigned to another account or contract. - */ - ALIAS_ALREADY_ASSIGNED = 332; - - /** - * A provided metadata key was invalid. Verification includes, for example, checking the size of Ed25519 and ECDSA(secp256k1) public keys. - */ - INVALID_METADATA_KEY = 333; - - /** - * Metadata key is not set on token - */ - TOKEN_HAS_NO_METADATA_KEY = 334; - - /** - * Token Metadata is not provided - */ - MISSING_TOKEN_METADATA = 335; - /** - * NFT serial numbers are missing in the TokenUpdateNftsTransactionBody - */ - MISSING_SERIAL_NUMBERS = 336; - - /** - * Admin key is not set on token - */ - TOKEN_HAS_NO_ADMIN_KEY = 337; - - /** - * The node has been marked as deleted - */ - NODE_DELETED = 338; - - /** - * A node is not found during update and delete node transaction - */ - INVALID_NODE_ID = 339; - - /** - * gossip_endpoint has a fully qualified domain name instead of ip - */ - INVALID_GOSSIP_ENDPOINT = 340; - - /** - * The node account_id is invalid - */ - INVALID_NODE_ACCOUNT_ID = 341; - - /** - * The node description is invalid - */ - INVALID_NODE_DESCRIPTION = 342; - - /** - * service_endpoint is invalid - */ - INVALID_SERVICE_ENDPOINT = 343; - - /** - * gossip_ca_certificate is invalid - */ - INVALID_GOSSIP_CAE_CERTIFICATE = 344; - - /** - * grpc_certificate_hash is invalid - */ - INVALID_GRPC_CERTIFICATE = 345; + /** + * The transaction passed the precheck validations. + */ + OK = 0; + + /** + * For any error not handled by specific error codes listed below. + */ + INVALID_TRANSACTION = 1; + + /** + * Payer account does not exist. + */ + PAYER_ACCOUNT_NOT_FOUND = 2; + + /** + * Node Account provided does not match the node account of the node the transaction was submitted + * to. + */ + INVALID_NODE_ACCOUNT = 3; + + /** + * Pre-Check error when TransactionValidStart + transactionValidDuration is less than current + * consensus time. + */ + TRANSACTION_EXPIRED = 4; + + /** + * Transaction start time is greater than current consensus time + */ + INVALID_TRANSACTION_START = 5; + + /** + * The given transactionValidDuration was either non-positive, or greater than the maximum + * valid duration of 180 secs. + * + */ + INVALID_TRANSACTION_DURATION = 6; + + /** + * The transaction signature is not valid + */ + INVALID_SIGNATURE = 7; + + /** + * Transaction memo size exceeded 100 bytes + */ + MEMO_TOO_LONG = 8; + + /** + * The fee provided in the transaction is insufficient for this type of transaction + */ + INSUFFICIENT_TX_FEE = 9; + + /** + * The payer account has insufficient cryptocurrency to pay the transaction fee + */ + INSUFFICIENT_PAYER_BALANCE = 10; + + /** + * This transaction ID is a duplicate of one that was submitted to this node or reached consensus + * in the last 180 seconds (receipt period) + */ + DUPLICATE_TRANSACTION = 11; + + /** + * If API is throttled out + */ + BUSY = 12; + + /** + * The API is not currently supported + */ + NOT_SUPPORTED = 13; + + /** + * The file id is invalid or does not exist + */ + INVALID_FILE_ID = 14; + + /** + * The account id is invalid or does not exist + */ + INVALID_ACCOUNT_ID = 15; + + /** + * The contract id is invalid or does not exist + */ + INVALID_CONTRACT_ID = 16; + + /** + * Transaction id is not valid + */ + INVALID_TRANSACTION_ID = 17; + + /** + * Receipt for given transaction id does not exist + */ + RECEIPT_NOT_FOUND = 18; + + /** + * Record for given transaction id does not exist + */ + RECORD_NOT_FOUND = 19; + + /** + * The solidity id is invalid or entity with this solidity id does not exist + */ + INVALID_SOLIDITY_ID = 20; + + /** + * The responding node has submitted the transaction to the network. Its final status is still + * unknown. + */ + UNKNOWN = 21; + + /** + * The transaction succeeded + */ + SUCCESS = 22; + + /** + * There was a system error and the transaction failed because of invalid request parameters. + */ + FAIL_INVALID = 23; + + /** + * There was a system error while performing fee calculation, reserved for future. + */ + FAIL_FEE = 24; + + /** + * There was a system error while performing balance checks, reserved for future. + */ + FAIL_BALANCE = 25; + + /** + * Key not provided in the transaction body + */ + KEY_REQUIRED = 26; + + /** + * Unsupported algorithm/encoding used for keys in the transaction + */ + BAD_ENCODING = 27; + + /** + * When the account balance is not sufficient for the transfer + */ + INSUFFICIENT_ACCOUNT_BALANCE = 28; + + /** + * During an update transaction when the system is not able to find the Users Solidity address + */ + INVALID_SOLIDITY_ADDRESS = 29; + + /** + * Not enough gas was supplied to execute transaction + */ + INSUFFICIENT_GAS = 30; + + /** + * contract byte code size is over the limit + */ + CONTRACT_SIZE_LIMIT_EXCEEDED = 31; + + /** + * local execution (query) is requested for a function which changes state + */ + LOCAL_CALL_MODIFICATION_EXCEPTION = 32; + + /** + * Contract REVERT OPCODE executed + */ + CONTRACT_REVERT_EXECUTED = 33; + + /** + * For any contract execution related error not handled by specific error codes listed above. + */ + CONTRACT_EXECUTION_EXCEPTION = 34; + + /** + * In Query validation, account with +ve(amount) value should be Receiving node account, the + * receiver account should be only one account in the list + */ + INVALID_RECEIVING_NODE_ACCOUNT = 35; + + /** + * Header is missing in Query request + */ + MISSING_QUERY_HEADER = 36; + + /** + * The update of the account failed + */ + ACCOUNT_UPDATE_FAILED = 37; + + /** + * Provided key encoding was not supported by the system + */ + INVALID_KEY_ENCODING = 38; + + /** + * null solidity address + */ + NULL_SOLIDITY_ADDRESS = 39; + + /** + * update of the contract failed + */ + CONTRACT_UPDATE_FAILED = 40; + + /** + * the query header is invalid + */ + INVALID_QUERY_HEADER = 41; + + /** + * Invalid fee submitted + */ + INVALID_FEE_SUBMITTED = 42; + + /** + * Payer signature is invalid + */ + INVALID_PAYER_SIGNATURE = 43; + + /** + * The keys were not provided in the request. + */ + KEY_NOT_PROVIDED = 44; + + /** + * Expiration time provided in the transaction was invalid. + */ + INVALID_EXPIRATION_TIME = 45; + + /** + * WriteAccess Control Keys are not provided for the file + */ + NO_WACL_KEY = 46; + + /** + * The contents of file are provided as empty. + */ + FILE_CONTENT_EMPTY = 47; + + /** + * The crypto transfer credit and debit do not sum equal to 0 + */ + INVALID_ACCOUNT_AMOUNTS = 48; + + /** + * Transaction body provided is empty + */ + EMPTY_TRANSACTION_BODY = 49; + + /** + * Invalid transaction body provided + */ + INVALID_TRANSACTION_BODY = 50; + + /** + * the type of key (base ed25519 key, KeyList, or ThresholdKey) does not match the type of + * signature (base ed25519 signature, SignatureList, or ThresholdKeySignature) + */ + INVALID_SIGNATURE_TYPE_MISMATCHING_KEY = 51; + + /** + * the number of key (KeyList, or ThresholdKey) does not match that of signature (SignatureList, + * or ThresholdKeySignature). e.g. if a keyList has 3 base keys, then the corresponding + * signatureList should also have 3 base signatures. + */ + INVALID_SIGNATURE_COUNT_MISMATCHING_KEY = 52; + + /** + * the livehash body is empty + */ + EMPTY_LIVE_HASH_BODY = 53; + + /** + * the livehash data is missing + */ + EMPTY_LIVE_HASH = 54; + + /** + * the keys for a livehash are missing + */ + EMPTY_LIVE_HASH_KEYS = 55; + + /** + * the livehash data is not the output of a SHA-384 digest + */ + INVALID_LIVE_HASH_SIZE = 56; + + /** + * the query body is empty + */ + EMPTY_QUERY_BODY = 57; + + /** + * the crypto livehash query is empty + */ + EMPTY_LIVE_HASH_QUERY = 58; + + /** + * the livehash is not present + */ + LIVE_HASH_NOT_FOUND = 59; + + /** + * the account id passed has not yet been created. + */ + ACCOUNT_ID_DOES_NOT_EXIST = 60; + + /** + * the livehash already exists for a given account + */ + LIVE_HASH_ALREADY_EXISTS = 61; + + /** + * File WACL keys are invalid + */ + INVALID_FILE_WACL = 62; + + /** + * Serialization failure + */ + SERIALIZATION_FAILED = 63; + + /** + * The size of the Transaction is greater than transactionMaxBytes + */ + TRANSACTION_OVERSIZE = 64; + + /** + * The Transaction has more than 50 levels + */ + TRANSACTION_TOO_MANY_LAYERS = 65; + + /** + * Contract is marked as deleted + */ + CONTRACT_DELETED = 66; + + /** + * the platform node is either disconnected or lagging behind. + */ + PLATFORM_NOT_ACTIVE = 67; + + /** + * one public key matches more than one prefixes on the signature map + */ + KEY_PREFIX_MISMATCH = 68; + + /** + * transaction not created by platform due to large backlog + */ + PLATFORM_TRANSACTION_NOT_CREATED = 69; + + /** + * auto renewal period is not a positive number of seconds + */ + INVALID_RENEWAL_PERIOD = 70; + + /** + * the response code when a smart contract id is passed for a crypto API request + */ + INVALID_PAYER_ACCOUNT_ID = 71; + + /** + * the account has been marked as deleted + */ + ACCOUNT_DELETED = 72; + + /** + * the file has been marked as deleted + */ + FILE_DELETED = 73; + + /** + * same accounts repeated in the transfer account list + */ + ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS = 74; + + /** + * attempting to set negative balance value for crypto account + */ + SETTING_NEGATIVE_ACCOUNT_BALANCE = 75; + + /** + * when deleting smart contract that has crypto balance either transfer account or transfer smart + * contract is required + */ + OBTAINER_REQUIRED = 76; + + /** + * when deleting smart contract that has crypto balance you can not use the same contract id as + * transferContractId as the one being deleted + */ + OBTAINER_SAME_CONTRACT_ID = 77; + + /** + * transferAccountId or transferContractId specified for contract delete does not exist + */ + OBTAINER_DOES_NOT_EXIST = 78; + + /** + * attempting to modify (update or delete a immutable smart contract, i.e. one created without a + * admin key) + */ + MODIFYING_IMMUTABLE_CONTRACT = 79; + + /** + * Unexpected exception thrown by file system functions + */ + FILE_SYSTEM_EXCEPTION = 80; + + /** + * the duration is not a subset of [MINIMUM_AUTORENEW_DURATION,MAXIMUM_AUTORENEW_DURATION] + */ + AUTORENEW_DURATION_NOT_IN_RANGE = 81; + + /** + * Decoding the smart contract binary to a byte array failed. Check that the input is a valid hex + * string. + */ + ERROR_DECODING_BYTESTRING = 82; + + /** + * File to create a smart contract was of length zero + */ + CONTRACT_FILE_EMPTY = 83; + + /** + * Bytecode for smart contract is of length zero + */ + CONTRACT_BYTECODE_EMPTY = 84; + + /** + * Attempt to set negative initial balance + */ + INVALID_INITIAL_BALANCE = 85; + + /** + * [Deprecated]. attempt to set negative receive record threshold + */ + INVALID_RECEIVE_RECORD_THRESHOLD = 86 [deprecated = true]; + + /** + * [Deprecated]. attempt to set negative send record threshold + */ + INVALID_SEND_RECORD_THRESHOLD = 87 [deprecated = true]; + + /** + * Special Account Operations should be performed by only Genesis account, return this code if it + * is not Genesis Account + */ + ACCOUNT_IS_NOT_GENESIS_ACCOUNT = 88; + + /** + * The fee payer account doesn't have permission to submit such Transaction + */ + PAYER_ACCOUNT_UNAUTHORIZED = 89; + + /** + * FreezeTransactionBody is invalid + */ + INVALID_FREEZE_TRANSACTION_BODY = 90; + + /** + * FreezeTransactionBody does not exist + */ + FREEZE_TRANSACTION_BODY_NOT_FOUND = 91; + + /** + * Exceeded the number of accounts (both from and to) allowed for crypto transfer list + */ + TRANSFER_LIST_SIZE_LIMIT_EXCEEDED = 92; + + /** + * Smart contract result size greater than specified maxResultSize + */ + RESULT_SIZE_LIMIT_EXCEEDED = 93; + + /** + * The payer account is not a special account(account 0.0.55) + */ + NOT_SPECIAL_ACCOUNT = 94; + + /** + * Negative gas was offered in smart contract call + */ + CONTRACT_NEGATIVE_GAS = 95; + + /** + * Negative value / initial balance was specified in a smart contract call / create + */ + CONTRACT_NEGATIVE_VALUE = 96; + + /** + * Failed to update fee file + */ + INVALID_FEE_FILE = 97; + + /** + * Failed to update exchange rate file + */ + INVALID_EXCHANGE_RATE_FILE = 98; + + /** + * Payment tendered for contract local call cannot cover both the fee and the gas + */ + INSUFFICIENT_LOCAL_CALL_GAS = 99; + + /** + * Entities with Entity ID below 1000 are not allowed to be deleted + */ + ENTITY_NOT_ALLOWED_TO_DELETE = 100; + + /** + * Violating one of these rules: 1) treasury account can update all entities below 0.0.1000, 2) + * account 0.0.50 can update all entities from 0.0.51 - 0.0.80, 3) Network Function Master Account + * A/c 0.0.50 - Update all Network Function accounts & perform all the Network Functions listed + * below, 4) Network Function Accounts: i) A/c 0.0.55 - Update Address Book files (0.0.101/102), + * ii) A/c 0.0.56 - Update Fee schedule (0.0.111), iii) A/c 0.0.57 - Update Exchange Rate + * (0.0.112). + */ + AUTHORIZATION_FAILED = 101; + + /** + * Fee Schedule Proto uploaded but not valid (append or update is required) + */ + FILE_UPLOADED_PROTO_INVALID = 102; + + /** + * Fee Schedule Proto uploaded but not valid (append or update is required) + */ + FILE_UPLOADED_PROTO_NOT_SAVED_TO_DISK = 103; + + /** + * Fee Schedule Proto File Part uploaded + */ + FEE_SCHEDULE_FILE_PART_UPLOADED = 104; + + /** + * The change on Exchange Rate exceeds Exchange_Rate_Allowed_Percentage + */ + EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED = 105; + + /** + * Contract permanent storage exceeded the currently allowable limit + */ + MAX_CONTRACT_STORAGE_EXCEEDED = 106; + + /** + * Transfer Account should not be same as Account to be deleted + */ + TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT = 107; + + TOTAL_LEDGER_BALANCE_INVALID = 108; + /** + * The expiration date/time on a smart contract may not be reduced + */ + EXPIRATION_REDUCTION_NOT_ALLOWED = 110; + + /** + * Gas exceeded currently allowable gas limit per transaction + */ + MAX_GAS_LIMIT_EXCEEDED = 111; + + /** + * File size exceeded the currently allowable limit + */ + MAX_FILE_SIZE_EXCEEDED = 112; + + /** + * When a valid signature is not provided for operations on account with receiverSigRequired=true + */ + RECEIVER_SIG_REQUIRED = 113; + + /** + * The Topic ID specified is not in the system. + */ + INVALID_TOPIC_ID = 150; + + /** + * A provided admin key was invalid. Verify the bytes for an Ed25519 public key are exactly 32 bytes; and the bytes for a compressed ECDSA(secp256k1) key are exactly 33 bytes, with the first byte either 0x02 or 0x03.. + */ + INVALID_ADMIN_KEY = 155; + + /** + * A provided submit key was invalid. + */ + INVALID_SUBMIT_KEY = 156; + + /** + * An attempted operation was not authorized (ie - a deleteTopic for a topic with no adminKey). + */ + UNAUTHORIZED = 157; + + /** + * A ConsensusService message is empty. + */ + INVALID_TOPIC_MESSAGE = 158; + + /** + * The autoRenewAccount specified is not a valid, active account. + */ + INVALID_AUTORENEW_ACCOUNT = 159; + + /** + * An adminKey was not specified on the topic, so there must not be an autoRenewAccount. + */ + AUTORENEW_ACCOUNT_NOT_ALLOWED = 160; + + /** + * The topic has expired, was not automatically renewed, and is in a 7 day grace period before the + * topic will be deleted unrecoverably. This error response code will not be returned until + * autoRenew functionality is supported by HAPI. + */ + TOPIC_EXPIRED = 162; + + INVALID_CHUNK_NUMBER = 163; // chunk number must be from 1 to total (chunks) inclusive. + INVALID_CHUNK_TRANSACTION_ID = 164; // For every chunk, the payer account that is part of initialTransactionID must match the Payer Account of this transaction. The entire initialTransactionID should match the transactionID of the first chunk, but this is not checked or enforced by Hedera except when the chunk number is 1. + ACCOUNT_FROZEN_FOR_TOKEN = 165; // Account is frozen and cannot transact with the token + TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED = 166; // An involved account already has more than tokens.maxPerAccount associations with non-deleted tokens. + INVALID_TOKEN_ID = 167; // The token is invalid or does not exist + INVALID_TOKEN_DECIMALS = 168; // Invalid token decimals + INVALID_TOKEN_INITIAL_SUPPLY = 169; // Invalid token initial supply + INVALID_TREASURY_ACCOUNT_FOR_TOKEN = 170; // Treasury Account does not exist or is deleted + INVALID_TOKEN_SYMBOL = 171; // Token Symbol is not UTF-8 capitalized alphabetical string + TOKEN_HAS_NO_FREEZE_KEY = 172; // Freeze key is not set on token + TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN = 173; // Amounts in transfer list are not net zero + MISSING_TOKEN_SYMBOL = 174; // A token symbol was not provided + TOKEN_SYMBOL_TOO_LONG = 175; // The provided token symbol was too long + ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN = 176; // KYC must be granted and account does not have KYC granted + TOKEN_HAS_NO_KYC_KEY = 177; // KYC key is not set on token + INSUFFICIENT_TOKEN_BALANCE = 178; // Token balance is not sufficient for the transaction + TOKEN_WAS_DELETED = 179; // Token transactions cannot be executed on deleted token + TOKEN_HAS_NO_SUPPLY_KEY = 180; // Supply key is not set on token + TOKEN_HAS_NO_WIPE_KEY = 181; // Wipe key is not set on token + INVALID_TOKEN_MINT_AMOUNT = 182; // The requested token mint amount would cause an invalid total supply + INVALID_TOKEN_BURN_AMOUNT = 183; // The requested token burn amount would cause an invalid total supply + TOKEN_NOT_ASSOCIATED_TO_ACCOUNT = 184; // A required token-account relationship is missing + CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT = 185; // The target of a wipe operation was the token treasury account + INVALID_KYC_KEY = 186; // The provided KYC key was invalid. + INVALID_WIPE_KEY = 187; // The provided wipe key was invalid. + INVALID_FREEZE_KEY = 188; // The provided freeze key was invalid. + INVALID_SUPPLY_KEY = 189; // The provided supply key was invalid. + MISSING_TOKEN_NAME = 190; // Token Name is not provided + TOKEN_NAME_TOO_LONG = 191; // Token Name is too long + INVALID_WIPING_AMOUNT = 192; // The provided wipe amount must not be negative, zero or bigger than the token holder balance + TOKEN_IS_IMMUTABLE = 193; // Token does not have Admin key set, thus update/delete transactions cannot be performed + TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT = 194; // An associateToken operation specified a token already associated to the account + TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES = 195; // An attempted operation is invalid until all token balances for the target account are zero + ACCOUNT_IS_TREASURY = 196; // An attempted operation is invalid because the account is a treasury + TOKEN_ID_REPEATED_IN_TOKEN_LIST = 197; // Same TokenIDs present in the token list + TOKEN_TRANSFER_LIST_SIZE_LIMIT_EXCEEDED = 198; // Exceeded the number of token transfers (both from and to) allowed for token transfer list + EMPTY_TOKEN_TRANSFER_BODY = 199; // TokenTransfersTransactionBody has no TokenTransferList + EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS = 200; // TokenTransfersTransactionBody has a TokenTransferList with no AccountAmounts + + /** + * The Scheduled entity does not exist; or has now expired, been deleted, or been executed + */ + INVALID_SCHEDULE_ID = 201; + + /** + * The Scheduled entity cannot be modified. Admin key not set + */ + SCHEDULE_IS_IMMUTABLE = 202; + + /** + * The provided Scheduled Payer does not exist + */ + INVALID_SCHEDULE_PAYER_ID = 203; + + /** + * The Schedule Create Transaction TransactionID account does not exist + */ + INVALID_SCHEDULE_ACCOUNT_ID = 204; + + /** + * The provided sig map did not contain any new valid signatures from required signers of the scheduled transaction + */ + NO_NEW_VALID_SIGNATURES = 205; + + /** + * The required signers for a scheduled transaction cannot be resolved, for example because they do not exist or have been deleted + */ + UNRESOLVABLE_REQUIRED_SIGNERS = 206; + + /** + * Only whitelisted transaction types may be scheduled + */ + SCHEDULED_TRANSACTION_NOT_IN_WHITELIST = 207; + + /** + * At least one of the signatures in the provided sig map did not represent a valid signature for any required signer + */ + SOME_SIGNATURES_WERE_INVALID = 208; + + /** + * The scheduled field in the TransactionID may not be set to true + */ + TRANSACTION_ID_FIELD_NOT_ALLOWED = 209; + + /** + * A schedule already exists with the same identifying fields of an attempted ScheduleCreate (that is, all fields other than scheduledPayerAccountID) + */ + IDENTICAL_SCHEDULE_ALREADY_CREATED = 210; + + /** + * A string field in the transaction has a UTF-8 encoding with the prohibited zero byte + */ + INVALID_ZERO_BYTE_IN_STRING = 211; + + /** + * A schedule being signed or deleted has already been deleted + */ + SCHEDULE_ALREADY_DELETED = 212; + + /** + * A schedule being signed or deleted has already been executed + */ + SCHEDULE_ALREADY_EXECUTED = 213; + + /** + * ConsensusSubmitMessage request's message size is larger than allowed. + */ + MESSAGE_SIZE_TOO_LARGE = 214; + + /** + * An operation was assigned to more than one throttle group in a given bucket + */ + OPERATION_REPEATED_IN_BUCKET_GROUPS = 215; + + /** + * The capacity needed to satisfy all opsPerSec groups in a bucket overflowed a signed 8-byte integral type + */ + BUCKET_CAPACITY_OVERFLOW = 216; + + /** + * Given the network size in the address book, the node-level capacity for an operation would never be enough to accept a single request; usually means a bucket burstPeriod should be increased + */ + NODE_CAPACITY_NOT_SUFFICIENT_FOR_OPERATION = 217; + + /** + * A bucket was defined without any throttle groups + */ + BUCKET_HAS_NO_THROTTLE_GROUPS = 218; + + /** + * A throttle group was granted zero opsPerSec + */ + THROTTLE_GROUP_HAS_ZERO_OPS_PER_SEC = 219; + + /** + * The throttle definitions file was updated, but some supported operations were not assigned a bucket + */ + SUCCESS_BUT_MISSING_EXPECTED_OPERATION = 220; + + /** + * The new contents for the throttle definitions system file were not valid protobuf + */ + UNPARSEABLE_THROTTLE_DEFINITIONS = 221; + + /** + * The new throttle definitions system file were invalid, and no more specific error could be divined + */ + INVALID_THROTTLE_DEFINITIONS = 222; + + /** + * The transaction references an account which has passed its expiration without renewal funds available, and currently remains in the ledger only because of the grace period given to expired entities + */ + ACCOUNT_EXPIRED_AND_PENDING_REMOVAL = 223; + + /** + * Invalid token max supply + */ + INVALID_TOKEN_MAX_SUPPLY = 224; + + /** + * Invalid token nft serial number + */ + INVALID_TOKEN_NFT_SERIAL_NUMBER = 225; + + /** + * Invalid nft id + */ + INVALID_NFT_ID = 226; + + /** + * Nft metadata is too long + */ + METADATA_TOO_LONG = 227; + + /** + * Repeated operations count exceeds the limit + */ + BATCH_SIZE_LIMIT_EXCEEDED = 228; + + /** + * The range of data to be gathered is out of the set boundaries + */ + INVALID_QUERY_RANGE = 229; + + /** + * A custom fractional fee set a denominator of zero + */ + FRACTION_DIVIDES_BY_ZERO = 230; + + /** + * The transaction payer could not afford a custom fee + */ + INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE = 231 [deprecated = true]; + + /** + * More than 10 custom fees were specified + */ + CUSTOM_FEES_LIST_TOO_LONG = 232; + + /** + * Any of the feeCollector accounts for customFees is invalid + */ + INVALID_CUSTOM_FEE_COLLECTOR = 233; + + /** + * Any of the token Ids in customFees is invalid + */ + INVALID_TOKEN_ID_IN_CUSTOM_FEES = 234; + + /** + * Any of the token Ids in customFees are not associated to feeCollector + */ + TOKEN_NOT_ASSOCIATED_TO_FEE_COLLECTOR = 235; + + /** + * A token cannot have more units minted due to its configured supply ceiling + */ + TOKEN_MAX_SUPPLY_REACHED = 236; + + /** + * The transaction attempted to move an NFT serial number from an account other than its owner + */ + SENDER_DOES_NOT_OWN_NFT_SERIAL_NO = 237; + + /** + * A custom fee schedule entry did not specify either a fixed or fractional fee + */ + CUSTOM_FEE_NOT_FULLY_SPECIFIED = 238; + + /** + * Only positive fees may be assessed at this time + */ + CUSTOM_FEE_MUST_BE_POSITIVE = 239; + + /** + * Fee schedule key is not set on token + */ + TOKEN_HAS_NO_FEE_SCHEDULE_KEY = 240; + + /** + * A fractional custom fee exceeded the range of a 64-bit signed integer + */ + CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE = 241; + + /** + * A royalty cannot exceed the total fungible value exchanged for an NFT + */ + ROYALTY_FRACTION_CANNOT_EXCEED_ONE = 242; + + /** + * Each fractional custom fee must have its maximum_amount, if specified, at least its minimum_amount + */ + FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT = 243; + + /** + * A fee schedule update tried to clear the custom fees from a token whose fee schedule was already empty + */ + CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES = 244; + + /** + * Only tokens of type FUNGIBLE_COMMON can be used to as fee schedule denominations + */ + CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON = 245; + + /** + * Only tokens of type FUNGIBLE_COMMON can have fractional fees + */ + CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON = 246; + + /** + * The provided custom fee schedule key was invalid + */ + INVALID_CUSTOM_FEE_SCHEDULE_KEY = 247; + + /** + * The requested token mint metadata was invalid + */ + INVALID_TOKEN_MINT_METADATA = 248; + + /** + * The requested token burn metadata was invalid + */ + INVALID_TOKEN_BURN_METADATA = 249; + + /** + * The treasury for a unique token cannot be changed until it owns no NFTs + */ + CURRENT_TREASURY_STILL_OWNS_NFTS = 250; + + /** + * An account cannot be dissociated from a unique token if it owns NFTs for the token + */ + ACCOUNT_STILL_OWNS_NFTS = 251; + + /** + * A NFT can only be burned when owned by the unique token's treasury + */ + TREASURY_MUST_OWN_BURNED_NFT = 252; + + /** + * An account did not own the NFT to be wiped + */ + ACCOUNT_DOES_NOT_OWN_WIPED_NFT = 253; + + /** + * An AccountAmount token transfers list referenced a token type other than FUNGIBLE_COMMON + */ + ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON = 254; + + /** + * All the NFTs allowed in the current price regime have already been minted + */ + MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED = 255; + + /** + * The payer account has been marked as deleted + */ + PAYER_ACCOUNT_DELETED = 256; + + /** + * The reference chain of custom fees for a transferred token exceeded the maximum length of 2 + */ + CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH = 257; + + /** + * More than 20 balance adjustments were to satisfy a CryptoTransfer and its implied custom fee payments + */ + CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS = 258; + + /** + * The sender account in the token transfer transaction could not afford a custom fee + */ + INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE = 259; + + /** + * Currently no more than 4,294,967,295 NFTs may be minted for a given unique token type + */ + SERIAL_NUMBER_LIMIT_REACHED = 260; + + /** + * Only tokens of type NON_FUNGIBLE_UNIQUE can have royalty fees + */ + CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE = 261; + + /** + * The account has reached the limit on the automatic associations count. + */ + NO_REMAINING_AUTOMATIC_ASSOCIATIONS = 262; + + /** + * Already existing automatic associations are more than the new maximum automatic associations. + */ + EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT = 263; + + /** + * Cannot set the number of automatic associations for an account more than the maximum allowed + * token associations tokens.maxPerAccount. + */ + 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; + + /** + * A precompiled contract succeeded, but was later reverted. + */ + REVERTED_SUCCESS = 280; + + /** + * All contract storage allocated to the current price regime has been consumed. + */ + MAX_STORAGE_IN_PRICE_REGIME_HAS_BEEN_USED = 281; + + /** + * An alias used in a CryptoTransfer transaction is not the serialization of a primitive Key + * message--that is, a Key with a single Ed25519 or ECDSA(secp256k1) public key and no + * unknown protobuf fields. + */ + INVALID_ALIAS_KEY = 282; + + /** + * A fungible token transfer expected a different number of decimals than the involved + * type actually has. + */ + UNEXPECTED_TOKEN_DECIMALS = 283; + + /** + * [Deprecated] The proxy account id is invalid or does not exist. + */ + INVALID_PROXY_ACCOUNT_ID = 284 [deprecated = true]; + + /** + * The transfer account id in CryptoDelete transaction is invalid or does not exist. + */ + INVALID_TRANSFER_ACCOUNT_ID = 285; + + /** + * The fee collector account id in TokenFeeScheduleUpdate is invalid or does not exist. + */ + INVALID_FEE_COLLECTOR_ACCOUNT_ID = 286; + + /** + * The alias already set on an account cannot be updated using CryptoUpdate transaction. + */ + ALIAS_IS_IMMUTABLE = 287; + + /** + * An approved allowance specifies a spender account that is the same as the hbar/token + * owner account. + */ + SPENDER_ACCOUNT_SAME_AS_OWNER = 288; + + /** + * The establishment or adjustment of an approved allowance cause the token allowance + * to exceed the token maximum supply. + */ + AMOUNT_EXCEEDS_TOKEN_MAX_SUPPLY = 289; + + /** + * The specified amount for an approved allowance cannot be negative. + */ + NEGATIVE_ALLOWANCE_AMOUNT = 290; + + /** + * [Deprecated] The approveForAll flag cannot be set for a fungible token. + */ + CANNOT_APPROVE_FOR_ALL_FUNGIBLE_COMMON = 291 [deprecated = true]; + + /** + * The spender does not have an existing approved allowance with the hbar/token owner. + */ + SPENDER_DOES_NOT_HAVE_ALLOWANCE = 292; + + /** + * The transfer amount exceeds the current approved allowance for the spender account. + */ + AMOUNT_EXCEEDS_ALLOWANCE = 293; + + /** + * The payer account of an approveAllowances or adjustAllowance transaction is attempting + * to go beyond the maximum allowed number of allowances. + */ + MAX_ALLOWANCES_EXCEEDED = 294; + + /** + * No allowances have been specified in the approval transaction. + */ + EMPTY_ALLOWANCES = 295; + + /** + * [Deprecated] Spender is repeated more than once in Crypto or Token or NFT allowance lists in a single + * CryptoApproveAllowance transaction. + */ + SPENDER_ACCOUNT_REPEATED_IN_ALLOWANCES = 296 [deprecated = true]; + + /** + * [Deprecated] Serial numbers are repeated in nft allowance for a single spender account + */ + REPEATED_SERIAL_NUMS_IN_NFT_ALLOWANCES = 297 [deprecated = true]; + + /** + * Fungible common token used in NFT allowances + */ + FUNGIBLE_TOKEN_IN_NFT_ALLOWANCES = 298; + + /** + * Non fungible token used in fungible token allowances + */ + NFT_IN_FUNGIBLE_TOKEN_ALLOWANCES = 299; + + /** + * The account id specified as the owner is invalid or does not exist. + */ + INVALID_ALLOWANCE_OWNER_ID = 300; + + /** + * The account id specified as the spender is invalid or does not exist. + */ + INVALID_ALLOWANCE_SPENDER_ID = 301; + + /** + * [Deprecated] If the CryptoDeleteAllowance transaction has repeated crypto or token or Nft allowances to delete. + */ + REPEATED_ALLOWANCES_TO_DELETE = 302 [deprecated = true]; + + /** + * If the account Id specified as the delegating spender is invalid or does not exist. + */ + INVALID_DELEGATING_SPENDER = 303; + + /** + * The delegating Spender cannot grant approveForAll allowance on a NFT token type for another spender. + */ + DELEGATING_SPENDER_CANNOT_GRANT_APPROVE_FOR_ALL = 304; + + /** + * The delegating Spender cannot grant allowance on a NFT serial for another spender as it doesnt not have approveForAll + * granted on token-owner. + */ + DELEGATING_SPENDER_DOES_NOT_HAVE_APPROVE_FOR_ALL = 305; + + /** + * The scheduled transaction could not be created because it's expiration_time was too far in the future. + */ + SCHEDULE_EXPIRATION_TIME_TOO_FAR_IN_FUTURE = 306; + + /** + * The scheduled transaction could not be created because it's expiration_time was less than or equal to the consensus time. + */ + SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME = 307; + + /** + * The scheduled transaction could not be created because it would cause throttles to be violated on the specified expiration_time. + */ + SCHEDULE_FUTURE_THROTTLE_EXCEEDED = 308; + + /** + * The scheduled transaction could not be created because it would cause the gas limit to be violated on the specified expiration_time. + */ + SCHEDULE_FUTURE_GAS_LIMIT_EXCEEDED = 309; + + /** + * The ethereum transaction either failed parsing or failed signature validation, or some other EthereumTransaction error not covered by another response code. + */ + INVALID_ETHEREUM_TRANSACTION = 310; + + /** + * EthereumTransaction was signed against a chainId that this network does not support. + */ + WRONG_CHAIN_ID = 311; + + /** + * This transaction specified an ethereumNonce that is not the current ethereumNonce of the account. + */ + WRONG_NONCE = 312; + + /** + * The ethereum transaction specified an access list, which the network does not support. + */ + ACCESS_LIST_UNSUPPORTED = 313; + + /** + * A schedule being signed or deleted has passed it's expiration date and is pending execution if needed and then expiration. + */ + SCHEDULE_PENDING_EXPIRATION = 314; + + /** + * A selfdestruct or ContractDelete targeted a contract that is a token treasury. + */ + CONTRACT_IS_TOKEN_TREASURY = 315; + + /** + * A selfdestruct or ContractDelete targeted a contract with non-zero token balances. + */ + CONTRACT_HAS_NON_ZERO_TOKEN_BALANCES = 316; + + /** + * A contract referenced by a transaction is "detached"; that is, expired and lacking any + * hbar funds for auto-renewal payment---but still within its post-expiry grace period. + */ + CONTRACT_EXPIRED_AND_PENDING_REMOVAL = 317; + + /** + * A ContractUpdate requested removal of a contract's auto-renew account, but that contract has + * no auto-renew account. + */ + CONTRACT_HAS_NO_AUTO_RENEW_ACCOUNT = 318; + + /** + * A delete transaction submitted via HAPI set permanent_removal=true + */ + PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION = 319; + + /* + * A CryptoCreate or ContractCreate used the deprecated proxyAccountID field. + */ + PROXY_ACCOUNT_ID_FIELD_IS_DEPRECATED = 320; + + /** + * An account set the staked_account_id to itself in CryptoUpdate or ContractUpdate transactions. + */ + SELF_STAKING_IS_NOT_ALLOWED = 321; + + /** + * The staking account id or staking node id given is invalid or does not exist. + */ + INVALID_STAKING_ID = 322; + + /** + * Native staking, while implemented, has not yet enabled by the council. + */ + STAKING_NOT_ENABLED = 323; + + /** + * The range provided in UtilPrng transaction is negative. + */ + INVALID_PRNG_RANGE = 324; + + /** + * The maximum number of entities allowed in the current price regime have been created. + */ + MAX_ENTITIES_IN_PRICE_REGIME_HAVE_BEEN_CREATED = 325; + + /** + * The full prefix signature for precompile is not valid + */ + INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE = 326; + + /** + * The combined balances of a contract and its auto-renew account (if any) did not cover + * the rent charged for net new storage used in a transaction. + */ + INSUFFICIENT_BALANCES_FOR_STORAGE_RENT = 327; + + /** + * A contract transaction tried to use more than the allowed number of child records, via + * either system contract records or internal contract creations. + */ + MAX_CHILD_RECORDS_EXCEEDED = 328; + + /** + * The combined balances of a contract and its auto-renew account (if any) or balance of an account did not cover + * the auto-renewal fees in a transaction. + */ + INSUFFICIENT_BALANCES_FOR_RENEWAL_FEES = 329; + + /** + * A transaction's protobuf message includes unknown fields; could mean that a client + * expects not-yet-released functionality to be available. + */ + TRANSACTION_HAS_UNKNOWN_FIELDS = 330; + + /** + * The account cannot be modified. Account's key is not set + */ + ACCOUNT_IS_IMMUTABLE = 331; + + /** + * An alias that is assigned to an account or contract cannot be assigned to another account or contract. + */ + ALIAS_ALREADY_ASSIGNED = 332; + + /** + * A provided metadata key was invalid. Verification includes, for example, checking the size of Ed25519 and ECDSA(secp256k1) public keys. + */ + INVALID_METADATA_KEY = 333; + + /** + * Metadata key is not set on token + */ + TOKEN_HAS_NO_METADATA_KEY = 334; + + /** + * Token Metadata is not provided + */ + MISSING_TOKEN_METADATA = 335; + /** + * NFT serial numbers are missing in the TokenUpdateNftsTransactionBody + */ + MISSING_SERIAL_NUMBERS = 336; + + /** + * Admin key is not set on token + */ + TOKEN_HAS_NO_ADMIN_KEY = 337; + + /** + * A transaction failed because the consensus node identified is + * deleted from the address book. + */ + NODE_DELETED = 338; + + /** + * A transaction failed because the consensus node identified is not valid or + * does not exist in state. + */ + INVALID_NODE_ID = 339; + + /** + * A transaction failed because one or more entries in the list of + * service endpoints for the `gossip_endpoint` field is invalid.
+ * The most common cause for this response is a service endpoint that has + * the domain name (DNS) set rather than address and port. + */ + INVALID_GOSSIP_ENDPOINT = 340; + + /** + * A transaction failed because the node account identifier provided + * does not exist or is not valid.
+ * One common source of this error is providing a node account identifier + * using the "alias" form rather than "numeric" form. + */ + INVALID_NODE_ACCOUNT_ID = 341; + + /** + * A transaction failed because the description field cannot be encoded + * as UTF-8 or is more than 100 bytes when encoded. + */ + INVALID_NODE_DESCRIPTION = 342; + + /** + * A transaction failed because one or more entries in the list of + * service endpoints for the `service_endpoint` field is invalid.
+ * The most common cause for this response is a service endpoint that has + * the domain name (DNS) set rather than address and port. + */ + INVALID_SERVICE_ENDPOINT = 343; + + /** + * A transaction failed because the TLS certificate provided for the + * node is missing or invalid.
+ * The certificate MUST be a TLS certificate of a type permitted for gossip + * signatures.
+ * The value presented MUST be a UTF-8 NFKD encoding of the TLS + * certificate.
+ * The certificate encoded MUST be in PEM format.
+ * The `gossip_ca_certificate` field is REQUIRED and MUST NOT be empty. + */ + INVALID_GOSSIP_CA_CERTIFICATE = 344; + + /** + * A transaction failed because the hash provided for the gRPC certificate + * is present but invalid.
+ * The `grpc_certificate_hash` MUST be a SHA-384 hash.
+ * The input hashed MUST be a UTF-8 NFKD encoding of the actual TLS + * certificate.
+ * The certificate to be encoded MUST be in PEM format. + */ + INVALID_GRPC_CERTIFICATE = 345; /** * The maximum automatic associations value is not valid.
diff --git a/services/schedulable_transaction_body.proto b/services/schedulable_transaction_body.proto index d20a340d..ff75238e 100644 --- a/services/schedulable_transaction_body.proto +++ b/services/schedulable_transaction_body.proto @@ -2,12 +2,9 @@ syntax = "proto3"; package proto; -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ +/* + * Copyright (C) 2018-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 @@ -19,7 +16,6 @@ package proto; * 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"; @@ -297,16 +293,16 @@ message SchedulableTransactionBody { /** * Transaction body for a scheduled transaction to create a new node. */ - NodeCreateTransactionBody nodeCreate = 42; + com.hedera.hapi.node.addressbook.NodeCreateTransactionBody nodeCreate = 42; /** * Transaction body for a scheduled transaction to modify an existing node. */ - NodeUpdateTransactionBody nodeUpdate = 43; + com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody nodeUpdate = 43; /** * Transaction body for a scheduled transaction to remove a node. */ - NodeDeleteTransactionBody nodeDelete = 44; + com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody nodeDelete = 44; } } diff --git a/services/state/addressbook/node.proto b/services/state/addressbook/node.proto index ca695927..2622047a 100644 --- a/services/state/addressbook/node.proto +++ b/services/state/addressbook/node.proto @@ -1,10 +1,8 @@ syntax = "proto3"; -package proto; +package com.hedera.hapi.node.state.addressbook; /* - * Hedera Network Services Protobuf - * * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,86 +25,116 @@ option java_package = "com.hederahashgraph.api.proto.java"; option java_multiple_files = true; /** - * Representation of a Node in the network Merkle tree + * A single address book node in the network state. + * + * Each node in the network address book SHALL represent a single actual + * consensus node that is eligible to participate in network consensus. * - * A Node is identified by a single uint64 number, which is unique among all nodes. + * Address book nodes SHALL NOT be _globally_ uniquely identified. A given node + * is only valid within a single realm and shard combination, so the identifier + * for a network node SHALL only be unique within a single realm and shard + * combination. */ message Node { /** - * The unique id of the Node. + * A consensus node identifier. + *

+ * Node identifiers SHALL be unique _within_ a shard and realm, + * but a node SHALL NOT, ever, serve multiple shards or realms, + * therefore the node identifier MAY be repeated _between_ shards and realms. */ uint64 node_id = 1; /** - * The account is charged for transactions submitted by the node that fail due diligence + * An account identifier. + *

+ * This account SHALL be owned by the entity responsible for the node.
+ * This account SHALL be charged transaction fees for any transactions that + * are submitted to the network by this node and fail due diligence checks. */ - AccountID account_id = 2; + proto.AccountID account_id = 2; /** - * A description of the node, with UTF-8 encoding up to 100 bytes + * A short description of the node. + *

+ * This value, if set, SHALL NOT exceed 100 bytes when encoded as UTF-8. */ string description = 3; /** - * Node Gossip Endpoints, ip address or FQDN and port + * A list of service endpoints for gossip. + *

+ * These endpoints SHALL represent the published endpoints to which other + * consensus nodes may _gossip_ transactions.
+ * If the network configuration value `gossipFqdnRestricted` is set, then + * all endpoints in this list SHALL supply only IP address.
+ * If the network configuration value `gossipFqdnRestricted` is _not_ set, + * then endpoints in this list MAY supply either IP address or FQDN, but + * SHALL NOT supply both values for the same endpoint.
+ * This list SHALL NOT be empty.
+ * This list SHALL NOT contain more than `10` entries.
+ * The first two entries in this list SHALL be the endpoints published to + * all consensus nodes.
+ * All other entries SHALL be reserved for future use. */ - repeated ServiceEndpoint gossip_endpoint = 4; + repeated proto.ServiceEndpoint gossip_endpoint = 4; /** - * A node's service Endpoints, ip address or FQDN and port + * A list of service endpoints for gRPC calls. + *

+ * These endpoints SHALL represent the published endpoints to which clients + * may submit transactions.
+ * These endpoints SHALL specify a port.
+ * Endpoints in this list MAY supply either IP address or FQDN, but SHALL + * NOT supply both values for the same endpoint.
+ * This list SHALL NOT be empty.
+ * This list SHALL NOT contain more than `8` entries. */ - repeated ServiceEndpoint service_endpoint = 5; + repeated proto.ServiceEndpoint service_endpoint = 5; /** - * The node's X509 certificate used to sign stream files (e.g., record stream - * files). Precisely, this field is the DER encoding of gossip X509 certificate. + * A certificate used to sign gossip events. + *

+ * This value SHALL be a certificate of a type permitted for gossip + * signatures.
+ * This value SHALL be the DER encoding of the certificate presented.
+ * This field is REQUIRED and MUST NOT be empty. */ bytes gossip_ca_certificate = 6; /** - * node x509 certificate hash. 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. + * A hash of the node gRPC certificate. + *

+ * This value MAY be used to verify the certificate presented by the node + * during TLS negotiation for gRPC.
+ * This value SHALL be a SHA-384 hash.
+ * The TLS certificate to be hashed SHALL first be in PEM format and SHALL + * be encoded with UTF-8 NFKD encoding to a stream of bytes provided to + * the hash algorithm.
+ * This field is OPTIONAL. */ bytes grpc_certificate_hash = 7; /** - * The consensus weight of this node in the network. + * A consensus weight. + *

+ * Each node SHALL have a weight in consensus calculations.
+ * The consensus weight of a node SHALL be calculated based on the amount + * of HBAR staked to that node.
+ * Consensus SHALL be calculated based on agreement of greater than `2/3` + * of the total `weight` value of all nodes on the network. */ uint64 weight = 8; /** - * Whether this node is deleted. + * A flag indicating this node is deleted. + *

+ * If this field is set, then this node SHALL NOT be included in the next + * update of the network address book.
+ * If this field is set, then this node SHALL be immutable and SHALL NOT + * be modified.
+ * If this field is set, then any `nodeUpdate` transaction to modify this + * node SHALL fail. */ bool deleted = 9; - - /** - * an enum to indicate the status of the node, not used in phase 2 - */ - //NodeStatus status = 10; - } - -enum NodeStatus { - /** - * node in this state is deleted - */ - DELETED = 0; - - /** - * node in this state is waiting to be added by consensus roster - */ - PENDING_ADDITION = 1; - - /** - * node in this state is waiting to be deleted by consensus roster - */ - PENDING_DELETION = 2; - - /** - * node in this state is active on the network and participating - * in network consensus. - */ - IN_CONSENSUS = 3; -} \ No newline at end of file diff --git a/services/token_update_nfts.proto b/services/token_update_nfts.proto index e09d05de..aa830265 100644 --- a/services/token_update_nfts.proto +++ b/services/token_update_nfts.proto @@ -2,12 +2,9 @@ syntax = "proto3"; package proto; -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2024 Hedera Hashgraph, LLC - * ​ +/* + * 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 @@ -19,7 +16,6 @@ package proto; * 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"; @@ -27,13 +23,11 @@ option java_package = "com.hederahashgraph.api.proto.java"; option java_multiple_files = true; import "basic_types.proto"; -import "duration.proto"; -import "timestamp.proto"; import "google/protobuf/wrappers.proto"; /** * At consensus, updates an already created Non Fungible Token to the given values. - * + * * If no value is given for a field, that field is left unchanged. * Only certain fields such as metadata can be updated. * @@ -58,4 +52,4 @@ message TokenUpdateNftsTransactionBody { * The new metadata of the NFT(s) */ google.protobuf.BytesValue metadata = 3; -} \ No newline at end of file +} diff --git a/services/transaction_body.proto b/services/transaction_body.proto index 99b139a3..2e82aa77 100644 --- a/services/transaction_body.proto +++ b/services/transaction_body.proto @@ -2,12 +2,9 @@ syntax = "proto3"; package proto; -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ +/* + * Copyright (C) 2018-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 @@ -19,7 +16,6 @@ package proto; * 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"; @@ -93,287 +89,296 @@ import "node_delete.proto"; * A single transaction. All transaction types are possible here. */ message TransactionBody { - /** - * The ID for this transaction, which includes the payer's account (the account paying the - * transaction fee). If two transactions have the same transactionID, they won't both have an - * effect - */ - TransactionID transactionID = 1; - - /** - * The account of the node that submits the client's transaction to the network - */ - AccountID nodeAccountID = 2; - - /** - * The maximum transaction fee the client is willing to pay - */ - uint64 transactionFee = 3; - - /** - * The transaction is invalid if consensusTimestamp > transactionID.transactionValidStart + - * transactionValidDuration - */ - Duration transactionValidDuration = 4; - - /** - * Should a record of this transaction be generated? (A receipt is always generated, but the - * record is optional) - */ - bool generateRecord = 5 [deprecated = true]; - - /** - * Any notes or descriptions that should be put into the record (max length 100) - */ - string memo = 6; - - /** - * The choices here are arranged by service in roughly lexicographical order. The field ordinals are non-sequential, and a result of the historical order of implementation. - */ - oneof data { /** - * Calls a function of a contract instance + * The ID for this transaction, which includes the payer's account (the account paying the + * transaction fee). If two transactions have the same transactionID, they won't both have an + * effect */ - ContractCallTransactionBody contractCall = 7; + TransactionID transactionID = 1; /** - * Creates a contract instance + * The account of the node that submits the client's transaction to the network */ - ContractCreateTransactionBody contractCreateInstance = 8; + AccountID nodeAccountID = 2; /** - * Updates a contract + * The maximum transaction fee the client is willing to pay */ - ContractUpdateTransactionBody contractUpdateInstance = 9; + uint64 transactionFee = 3; /** - * Delete contract and transfer remaining balance into specified account + * The transaction is invalid if consensusTimestamp > transactionID.transactionValidStart + + * transactionValidDuration */ - ContractDeleteTransactionBody contractDeleteInstance = 22; + Duration transactionValidDuration = 4; /** - * An Ethereum encoded transaction. + * Should a record of this transaction be generated? (A receipt is always generated, but the + * record is optional) */ - EthereumTransactionBody ethereumTransaction = 50; + bool generateRecord = 5 [deprecated = true]; /** - * Attach a new livehash to an account + * Any notes or descriptions that should be put into the record (max length 100) */ - CryptoAddLiveHashTransactionBody cryptoAddLiveHash = 10; + string memo = 6; /** - * Adds one or more approved allowances for spenders to transfer the paying account's hbar or tokens. + * The choices here are arranged by service in roughly lexicographical order. The field ordinals are non-sequential, and a result of the historical order of implementation. */ - CryptoApproveAllowanceTransactionBody cryptoApproveAllowance = 48; + oneof data { + /** + * Calls a function of a contract instance + */ + ContractCallTransactionBody contractCall = 7; - /** - * Deletes one or more of the specific approved NFT serial numbers on an owner account. - */ - CryptoDeleteAllowanceTransactionBody cryptoDeleteAllowance = 49; + /** + * Creates a contract instance + */ + ContractCreateTransactionBody contractCreateInstance = 8; - /** - * Create a new cryptocurrency account - */ - CryptoCreateTransactionBody cryptoCreateAccount = 11; + /** + * Updates a contract + */ + ContractUpdateTransactionBody contractUpdateInstance = 9; - /** - * Delete a cryptocurrency account (mark as deleted, and transfer hbars out) - */ - CryptoDeleteTransactionBody cryptoDelete = 12; + /** + * Attach a new livehash to an account + */ + CryptoAddLiveHashTransactionBody cryptoAddLiveHash = 10; - /** - * Remove a livehash from an account - */ - CryptoDeleteLiveHashTransactionBody cryptoDeleteLiveHash = 13; + /** + * Create a new cryptocurrency account + */ + CryptoCreateTransactionBody cryptoCreateAccount = 11; - /** - * Transfer amount between accounts - */ - CryptoTransferTransactionBody cryptoTransfer = 14; + /** + * Delete a cryptocurrency account (mark as deleted, and transfer hbars out) + */ + CryptoDeleteTransactionBody cryptoDelete = 12; - /** - * Modify information such as the expiration date for an account - */ - CryptoUpdateTransactionBody cryptoUpdateAccount = 15; + /** + * Remove a livehash from an account + */ + CryptoDeleteLiveHashTransactionBody cryptoDeleteLiveHash = 13; - /** - * Add bytes to the end of the contents of a file - */ - FileAppendTransactionBody fileAppend = 16; + /** + * Transfer amount between accounts + */ + CryptoTransferTransactionBody cryptoTransfer = 14; - /** - * Create a new file - */ - FileCreateTransactionBody fileCreate = 17; + /** + * Modify information such as the expiration date for an account + */ + CryptoUpdateTransactionBody cryptoUpdateAccount = 15; - /** - * Delete a file (remove contents and mark as deleted until it expires) - */ - FileDeleteTransactionBody fileDelete = 18; - - /** - * Modify information such as the expiration date for a file - */ - FileUpdateTransactionBody fileUpdate = 19; + /** + * Add bytes to the end of the contents of a file + */ + FileAppendTransactionBody fileAppend = 16; - /** - * Hedera administrative deletion of a file or smart contract - */ - SystemDeleteTransactionBody systemDelete = 20; + /** + * Create a new file + */ + FileCreateTransactionBody fileCreate = 17; - /** - * To undelete an entity deleted by SystemDelete - */ - SystemUndeleteTransactionBody systemUndelete = 21; + /** + * Delete a file (remove contents and mark as deleted until it expires) + */ + FileDeleteTransactionBody fileDelete = 18; - /** - * Freeze the nodes - */ - FreezeTransactionBody freeze = 23; + /** + * Modify information such as the expiration date for a file + */ + FileUpdateTransactionBody fileUpdate = 19; - /** - * Creates a topic - */ - ConsensusCreateTopicTransactionBody consensusCreateTopic = 24; - - /** - * Updates a topic - */ - ConsensusUpdateTopicTransactionBody consensusUpdateTopic = 25; - - /** - * Deletes a topic - */ - ConsensusDeleteTopicTransactionBody consensusDeleteTopic = 26; - - /** - * Submits message to a topic - */ - ConsensusSubmitMessageTransactionBody consensusSubmitMessage = 27; - - /** - * UNDOCUMENTED - */ - UncheckedSubmitBody uncheckedSubmit = 28; - - /** - * Creates a token instance - */ - TokenCreateTransactionBody tokenCreation = 29; - - /** - * Freezes account not to be able to transact with a token - */ - TokenFreezeAccountTransactionBody tokenFreeze = 31; - - /** - * Unfreezes account for a token - */ - TokenUnfreezeAccountTransactionBody tokenUnfreeze = 32; - - /** - * Grants KYC to an account for a token - */ - TokenGrantKycTransactionBody tokenGrantKyc = 33; - - /** - * Revokes KYC of an account for a token - */ - TokenRevokeKycTransactionBody tokenRevokeKyc = 34; + /** + * Hedera administrative deletion of a file or smart contract + */ + SystemDeleteTransactionBody systemDelete = 20; - /** - * Deletes a token instance - */ - TokenDeleteTransactionBody tokenDeletion = 35; - - /** - * Updates a token instance - */ - TokenUpdateTransactionBody tokenUpdate = 36; - - /** - * Mints new tokens to a token's treasury account - */ - TokenMintTransactionBody tokenMint = 37; - - /** - * Burns tokens from a token's treasury account - */ - TokenBurnTransactionBody tokenBurn = 38; - - /** - * Wipes amount of tokens from an account - */ - TokenWipeAccountTransactionBody tokenWipe = 39; - - /** - * Associate tokens to an account - */ - TokenAssociateTransactionBody tokenAssociate = 40; - - /** - * Dissociate tokens from an account - */ - TokenDissociateTransactionBody tokenDissociate = 41; - - /** - * Updates a token's custom fee schedule - */ - TokenFeeScheduleUpdateTransactionBody token_fee_schedule_update = 45; - - /** - * Pauses the Token - */ - TokenPauseTransactionBody token_pause = 46; - - /** - * Unpauses the Token - */ - TokenUnpauseTransactionBody token_unpause = 47; - - /** - * Creates a schedule in the network's action queue - */ - ScheduleCreateTransactionBody scheduleCreate = 42; - - /** - * Deletes a schedule from the network's action queue - */ - ScheduleDeleteTransactionBody scheduleDelete = 43; - - /** - * Adds one or more Ed25519 keys to the affirmed signers of a scheduled transaction - */ - ScheduleSignTransactionBody scheduleSign = 44; - - /** - * Updates the staking info at the end of staking period to indicate new staking period has started. - */ - NodeStakeUpdateTransactionBody node_stake_update = 51; - - /** - * Generates a pseudorandom number. - */ - UtilPrngTransactionBody util_prng = 52; - - /** - * Update the metadata of one or more NFT's of a specific token type. - */ - TokenUpdateNftsTransactionBody token_update_nfts = 53; - - /** - * A transaction body for a `createNode` request. - */ - NodeCreateTransactionBody nodeCreate = 54; - - /** - * A transaction body for an `updateNode` request. - */ - NodeUpdateTransactionBody nodeUpdate = 55; - - /** - * A transaction body for a `deleteNode` request. - */ - NodeDeleteTransactionBody nodeDelete = 56; - } + /** + * To undelete an entity deleted by SystemDelete + */ + SystemUndeleteTransactionBody systemUndelete = 21; + + /** + * Delete contract and transfer remaining balance into specified account + */ + ContractDeleteTransactionBody contractDeleteInstance = 22; + + /** + * Freeze the nodes + */ + FreezeTransactionBody freeze = 23; + + /** + * Creates a topic + */ + ConsensusCreateTopicTransactionBody consensusCreateTopic = 24; + + /** + * Updates a topic + */ + ConsensusUpdateTopicTransactionBody consensusUpdateTopic = 25; + + /** + * Deletes a topic + */ + ConsensusDeleteTopicTransactionBody consensusDeleteTopic = 26; + + /** + * Submits message to a topic + */ + ConsensusSubmitMessageTransactionBody consensusSubmitMessage = 27; + + /** + * UNDOCUMENTED + */ + UncheckedSubmitBody uncheckedSubmit = 28; + + /** + * Creates a token instance + */ + TokenCreateTransactionBody tokenCreation = 29; + + /** + * Freezes account not to be able to transact with a token + */ + TokenFreezeAccountTransactionBody tokenFreeze = 31; + + /** + * Unfreezes account for a token + */ + TokenUnfreezeAccountTransactionBody tokenUnfreeze = 32; + + /** + * Grants KYC to an account for a token + */ + TokenGrantKycTransactionBody tokenGrantKyc = 33; + + /** + * Revokes KYC of an account for a token + */ + TokenRevokeKycTransactionBody tokenRevokeKyc = 34; + + /** + * Deletes a token instance + */ + TokenDeleteTransactionBody tokenDeletion = 35; + + /** + * Updates a token instance + */ + TokenUpdateTransactionBody tokenUpdate = 36; + + /** + * Mints new tokens to a token's treasury account + */ + TokenMintTransactionBody tokenMint = 37; + + /** + * Burns tokens from a token's treasury account + */ + TokenBurnTransactionBody tokenBurn = 38; + + /** + * Wipes amount of tokens from an account + */ + TokenWipeAccountTransactionBody tokenWipe = 39; + + /** + * Associate tokens to an account + */ + TokenAssociateTransactionBody tokenAssociate = 40; + + /** + * Dissociate tokens from an account + */ + TokenDissociateTransactionBody tokenDissociate = 41; + + /** + * Creates a schedule in the network's action queue + */ + ScheduleCreateTransactionBody scheduleCreate = 42; + + /** + * Deletes a schedule from the network's action queue + */ + ScheduleDeleteTransactionBody scheduleDelete = 43; + + /** + * Adds one or more Ed25519 keys to the affirmed signers of a scheduled transaction + */ + ScheduleSignTransactionBody scheduleSign = 44; + + /** + * Updates a token's custom fee schedule + */ + TokenFeeScheduleUpdateTransactionBody token_fee_schedule_update = 45; + + /** + * Pauses the Token + */ + TokenPauseTransactionBody token_pause = 46; + + /** + * Unpauses the Token + */ + TokenUnpauseTransactionBody token_unpause = 47; + + /** + * Adds one or more approved allowances for spenders to transfer the paying account's hbar or tokens. + */ + CryptoApproveAllowanceTransactionBody cryptoApproveAllowance = 48; + + /** + * Deletes one or more of the specific approved NFT serial numbers on an owner account. + */ + CryptoDeleteAllowanceTransactionBody cryptoDeleteAllowance = 49; + + /** + * An Ethereum encoded transaction. + */ + EthereumTransactionBody ethereumTransaction = 50; + + /** + * Updates the staking info at the end of staking period to indicate new staking period has started. + */ + NodeStakeUpdateTransactionBody node_stake_update = 51; + + /** + * Generates a pseudorandom number. + */ + UtilPrngTransactionBody util_prng = 52; + + /** + * Update the metadata of one or more NFT's of a specific token type. + */ + TokenUpdateNftsTransactionBody token_update_nfts = 53; + + /** + * A transaction body for a `createNode` request. + *

+ * This transaction SHALL create a new consensus node record and add + * that record to the network address book. + */ + com.hedera.hapi.node.addressbook.NodeCreateTransactionBody nodeCreate = 54; + + /** + * A transaction body for an `updateNode` request. + *

+ * This transaction SHALL update an existing consensus node record in + * the network address book. + */ + com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody nodeUpdate = 55; + + /** + * A transaction body for a `deleteNode` request. + *

+ * This transaction SHALL remove an existing consensus node record from + * the network address book. + */ + com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody nodeDelete = 56; + } } diff --git a/services/transaction_receipt.proto b/services/transaction_receipt.proto index edf5693f..471c0bc1 100644 --- a/services/transaction_receipt.proto +++ b/services/transaction_receipt.proto @@ -2,12 +2,9 @@ syntax = "proto3"; package proto; -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ +/* + * Copyright (C) 2018-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 @@ -19,7 +16,6 @@ package proto; * 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"; @@ -32,7 +28,7 @@ import "exchange_rate.proto"; /** * The summary of a transaction's result so far. If the transaction has not reached consensus, this - * result will be necessarily incomplete. + * result will be necessarily incomplete. */ message TransactionReceipt { /** @@ -73,59 +69,65 @@ message TransactionReceipt { uint64 topicSequenceNumber = 7; /** - * In the receipt of a ConsensusSubmitMessage, the new running hash of the topic that received - * the message. This 48-byte field is the output of a particular SHA-384 digest whose input - * data are determined by the value of the topicRunningHashVersion below. The bytes of each - * uint64 or uint32 are to be in Big-Endian format. - * - * IF the topicRunningHashVersion is '0' or '1', then the input data to the SHA-384 digest are, + * In the receipt of a `ConsensusSubmitMessage`, the new running hash of the topic that + * received the message.
+ * This 48-byte field is the output of a SHA-384 digest with input data determined by the + * value of the `topicRunningHashVersion` field.
+ * All new transactions SHALL use `topicRunningHashVersion` `3`.
+ * The bytes of each uint64 or uint32 encoded for the hash input MUST be in Big-Endian format. + *

+ *


+ * If the `topicRunningHashVersion` is '0' or '1', then the input data to the SHA-384 digest are, * in order: - * --- - * 1. The previous running hash of the topic (48 bytes) - * 2. The topic's shard (8 bytes) - * 3. The topic's realm (8 bytes) - * 4. The topic's number (8 bytes) - * 5. The number of seconds since the epoch before the ConsensusSubmitMessage reached - * consensus (8 bytes) - * 6. The number of nanoseconds since 5. before the ConsensusSubmitMessage reached - * consensus (4 bytes) - * 7. The topicSequenceNumber from above (8 bytes) - * 8. The message bytes from the ConsensusSubmitMessage (variable). - * - * IF the topicRunningHashVersion is '2', then the input data to the SHA-384 digest are, in + *
    + *
  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 `topicSequenceNumber` (8 bytes)
  14. + *
  15. The message bytes from the `ConsensusSubmitMessage` (variable).
  16. + *
+ *
+ * If the `topicRunningHashVersion` is '2', then the input data to the SHA-384 digest are, in * order: - * --- - * 1. The previous running hash of the topic (48 bytes) - * 2. The topicRunningHashVersion below (8 bytes) - * 3. The topic's shard (8 bytes) - * 4. The topic's realm (8 bytes) - * 5. The topic's number (8 bytes) - * 6. The number of seconds since the epoch before the ConsensusSubmitMessage reached - * consensus (8 bytes) - * 7. The number of nanoseconds since 6. before the ConsensusSubmitMessage reached - * consensus (4 bytes) - * 8. The topicSequenceNumber from above (8 bytes) - * 9. The output of the SHA-384 digest of the message bytes from the - * consensusSubmitMessage (48 bytes) - * - * Otherwise, IF the topicRunningHashVersion is '3', then the input data to the SHA-384 digest + *
    + *
  1. The previous running hash of the topic (48 bytes)
  2. + *
  3. The `topicRunningHashVersion` (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 `topicSequenceNumber` (8 bytes)
  16. + *
  17. The output of a SHA-384 digest of the message bytes from the `ConsensusSubmitMessage` + * (48 bytes)
  18. + *
+ *
+ * If the `topicRunningHashVersion` is '3', then the input data to the SHA-384 digest * are, in order: - * --- - * 1. The previous running hash of the topic (48 bytes) - * 2. The topicRunningHashVersion below (8 bytes) - * 3. The payer account's shard (8 bytes) - * 4. The payer account's realm (8 bytes) - * 5. The payer account's number (8 bytes) - * 6. The topic's shard (8 bytes) - * 7. The topic's realm (8 bytes) - * 8. The topic's number (8 bytes) - * 9. The number of seconds since the epoch before the ConsensusSubmitMessage reached - * consensus (8 bytes) - * 10. The number of nanoseconds since 9. before the ConsensusSubmitMessage reached - * consensus (4 bytes) - * 11. The topicSequenceNumber from above (8 bytes) - * 12. The output of the SHA-384 digest of the message bytes from the - * consensusSubmitMessage (48 bytes) + *
    + *
  1. The previous running hash of the topic (48 bytes)
  2. + *
  3. The `topicRunningHashVersion` (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 `topicSequenceNumber` (8 bytes)
  22. + *
  23. The output of a SHA-384 digest of the message bytes from the `ConsensusSubmitMessage` + * (48 bytes)
  24. + *
*/ bytes topicRunningHash = 8; @@ -167,6 +169,11 @@ message TransactionReceipt { /** * In the receipt of a NodeCreate, NodeUpdate, NodeDelete, the id of the newly created node. + * An affected node identifier.
+ * This value SHALL be set following a `createNode` transaction.
+ * This value SHALL be set following a `updateNode` transaction.
+ * This value SHALL be set following a `deleteNode` transaction.
+ * This value SHALL NOT be set following any other transaction. */ uint64 node_id = 15; }