|
| 1 | +/** |
| 2 | + * # Address Book Service API |
| 3 | + * GRPC service definitions for the Hedera Address Book Service (HABS). |
| 4 | + * |
| 5 | + * ### Keywords |
| 6 | + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", |
| 7 | + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this |
| 8 | + * document are to be interpreted as described in |
| 9 | + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in |
| 10 | + * [RFC8174](https://www.ietf.org/rfc/rfc8174). |
| 11 | + */ |
| 12 | +syntax = "proto3"; |
| 13 | + |
| 14 | +package proto; |
| 15 | + |
| 16 | +/* |
| 17 | + * Copyright (C) 2024 Hedera Hashgraph, LLC |
| 18 | + * |
| 19 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 20 | + * you may not use this file except in compliance with the License. |
| 21 | + * You may obtain a copy of the License at |
| 22 | + * |
| 23 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 24 | + * |
| 25 | + * Unless required by applicable law or agreed to in writing, software |
| 26 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 27 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 28 | + * See the License for the specific language governing permissions and |
| 29 | + * limitations under the License. |
| 30 | + */ |
| 31 | + |
| 32 | +option java_package = "com.hederahashgraph.service.proto.java"; |
| 33 | +// <<<pbj.java_package = "com.hedera.hapi.node.addressbook">>> This comment is special code for setting PBJ Compiler java package |
| 34 | + |
| 35 | +import "transaction_response.proto"; |
| 36 | +import "transaction.proto"; |
| 37 | + |
| 38 | +/** |
| 39 | + * The Address Book service provides the ability for Hedera network node |
| 40 | + * administrators to add, update, and remove consensus nodes. This addition, |
| 41 | + * update, or removal of a consensus node requires governing council approval, |
| 42 | + * but each node operator may update their own operational attributes without |
| 43 | + * additional approval, reducing overhead for routine operations. |
| 44 | + * |
| 45 | + * Most operations are `privileged operations` and require governing council |
| 46 | + * approval. |
| 47 | + * |
| 48 | + * ### For a node creation transaction. |
| 49 | + * - The node operator SHALL create a `createNode` transaction. |
| 50 | + * - The node operator MUST sign this transaction with the `Key` |
| 51 | + * set as the `admin_key` for the new `Node`. |
| 52 | + * - The node operator SHALL deliver the signed transaction to the Hedera |
| 53 | + * council representative. |
| 54 | + * - The Hedera council representative SHALL arrange for council members to |
| 55 | + * review and sign the transaction. |
| 56 | + * - Once sufficient council members have signed the transaction, the |
| 57 | + * Hedera council representative SHALL submit the transaction to the |
| 58 | + * network. |
| 59 | + * - Upon receipt of a valid and signed node creation transaction the network |
| 60 | + * software SHALL |
| 61 | + * - Validate the threshold signature for the Hedera governing council |
| 62 | + * - Validate the signature of the `Key` provided as the new `admin_key` |
| 63 | + * for the `Node`. |
| 64 | + * - Create the new node in state, this new node SHALL NOT be active in the |
| 65 | + * network at this time. |
| 66 | + * - When executing the next `freeze` transaction with `freeze_type` set to |
| 67 | + * `PREPARE_UPGRADE`, update network configuration and bring the |
| 68 | + * new node to an active status within the network. The node to be added |
| 69 | + * SHALL be active in the network following this upgrade. |
| 70 | + * |
| 71 | + * ### For a node deletion transaction. |
| 72 | + * - The node operator or Hedera council representative SHALL create a |
| 73 | + * `deleteNode` transaction. |
| 74 | + * - If the node operator creates the transaction |
| 75 | + * - The node operator MUST sign this transaction with the `Key` |
| 76 | + * set as the `admin_key` for the existing `Node`. |
| 77 | + * - The node operator SHALL deliver the signed transaction to the Hedera |
| 78 | + * council representative. |
| 79 | + * - The Hedera council representative SHALL arrange for council members to |
| 80 | + * review and sign the transaction. |
| 81 | + * - Once sufficient council members have signed the transaction, the |
| 82 | + * Hedera council representative SHALL submit the transaction to the |
| 83 | + * network. |
| 84 | + * - Upon receipt of a valid and signed node deletion transaction the network |
| 85 | + * software SHALL |
| 86 | + * - Validate the signature for the Hedera governing council |
| 87 | + * - Remove the existing node from network state. The node SHALL still |
| 88 | + * be active in the network at this time. |
| 89 | + * - When executing the next `freeze` transaction with `freeze_type` set to |
| 90 | + * `PREPARE_UPGRADE`, update network configuration and remove the |
| 91 | + * node to be deleted from the network. The node to be deleted SHALL NOT |
| 92 | + * be active in the network following this upgrade. |
| 93 | + * |
| 94 | + * ### For a node update transaction. |
| 95 | + * - The node operator SHALL create an `updateNode` transaction. |
| 96 | + * - The node operator MUST sign this transaction with the active `key` |
| 97 | + * assigned as the `admin_key`. |
| 98 | + * - The node operator SHALL submit the transaction to the |
| 99 | + * network. Hedera council approval SHALL NOT be sought for this |
| 100 | + * transaction |
| 101 | + * - Upon receipt of a valid and signed node update transaction the network |
| 102 | + * software SHALL |
| 103 | + * - If the transaction modifies the value of the "node account", |
| 104 | + * - Validate the signature of the active `key` for the account |
| 105 | + * assigned as the _current_ "node account". |
| 106 | + * - Validate the signature of the active `key` for the account to be |
| 107 | + * assigned as the _new_ "node account". |
| 108 | + * - Modify the node information held in network state with the changes |
| 109 | + * requested in the update transaction. The node changes SHALL NOT be |
| 110 | + * applied to network configuration, and SHALL NOT affect network |
| 111 | + * operation at this time. |
| 112 | + * - When executing the next `freeze` transaction with `freeze_type` set to |
| 113 | + * `PREPARE_UPGRADE`, update network configuration according to the |
| 114 | + * modified information in network state. The requested changes SHALL |
| 115 | + * affect network operation following this upgrade. |
| 116 | + */ |
| 117 | +service AddressBookService { |
| 118 | + /** |
| 119 | + * A transaction to create a new consensus node in the network |
| 120 | + * address book. |
| 121 | + * <p> |
| 122 | + * This transaction, once complete, SHALL add a new consensus node to the |
| 123 | + * network state.<br/> |
| 124 | + * The new consensus node SHALL remain in state, but SHALL NOT participate |
| 125 | + * in network consensus until the network updates the network configuration. |
| 126 | + * <p> |
| 127 | + * Hedera governing council authorization is REQUIRED for this transaction. |
| 128 | + */ |
| 129 | + rpc createNode (proto.Transaction) returns (proto.TransactionResponse); |
| 130 | + |
| 131 | + /** |
| 132 | + * A transaction to remove a consensus node from the network address |
| 133 | + * book. |
| 134 | + * <p> |
| 135 | + * This transaction, once complete, SHALL remove the identified consensus |
| 136 | + * node from the network state. |
| 137 | + * <p> |
| 138 | + * Hedera governing council authorization is REQUIRED for this transaction. |
| 139 | + */ |
| 140 | + rpc deleteNode (proto.Transaction) returns (proto.TransactionResponse); |
| 141 | + |
| 142 | + /** |
| 143 | + * A transaction to update an existing consensus node from the network |
| 144 | + * address book. |
| 145 | + * <p> |
| 146 | + * This transaction, once complete, SHALL modify the identified consensus |
| 147 | + * node state as requested. |
| 148 | + * <p> |
| 149 | + * This transaction is authorized by the node operator |
| 150 | + */ |
| 151 | + rpc updateNode (proto.Transaction) returns (proto.TransactionResponse); |
| 152 | +} |
0 commit comments