-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add back Dynamic Address Book Phase 2 protobufs change (#361)
* added deleted in node.proto Signed-off-by: Iris Simon <[email protected]> * Added MAX_NODE_HAVE_BEEN_CREATED Signed-off-by: Iris Simon <[email protected]> * updated comments with latest FQDN meeting. Signed-off-by: Iris Simon <[email protected]> * added more response code Signed-off-by: Iris Simon <[email protected]> * added more response code Signed-off-by: Iris Simon <[email protected]> * Revert "feat: Back out protobuf-changes to dynamic address book for release 0.51 (#358)" This reverts commit 6096d43 Signed-off-by: Iris Simon <[email protected]> --------- Signed-off-by: Iris Simon <[email protected]>
- Loading branch information
Showing
13 changed files
with
678 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
syntax = "proto3"; | ||
|
||
package proto; | ||
|
||
/* | ||
* Hedera Network Services Protobuf | ||
* | ||
* 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
option java_package = "com.hederahashgraph.service.proto.java"; | ||
// <<<pbj.java_package = "com.hedera.hapi.node.addressbook">>> This comment is special code for setting PBJ Compiler java package | ||
|
||
import "query.proto"; | ||
import "response.proto"; | ||
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 | ||
*/ | ||
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); | ||
|
||
/** | ||
* 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. | ||
*/ | ||
rpc deleteNode (Transaction) returns (TransactionResponse); | ||
|
||
/** | ||
* Prepare to update the node to the network. | ||
* The node will not be updated until the network is upgraded. | ||
*/ | ||
rpc updateNode (Transaction) returns (TransactionResponse); | ||
|
||
/** | ||
* Retrieves the node information by node Id. | ||
*/ | ||
rpc getNodeInfo (Query) returns (Response); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
syntax = "proto3"; | ||
|
||
package proto; | ||
|
||
/* | ||
* Hedera Network Services Protobuf | ||
* | ||
* 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
option java_package = "com.hederahashgraph.api.proto.java"; | ||
// <<<pbj.java_package = "com.hedera.hapi.node.addressbook">>> This comment is special code for setting PBJ Compiler java package | ||
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. | ||
* | ||
* 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 | ||
* to join the network, and requires governing council authorization. | ||
* | ||
* A `NodeCreateTransactionBody` MUST be signed by the governing council.<br/> | ||
* The newly created node information will be used to generate config.txt and | ||
* a-pulbic-NodeAlias.pem file per each node during phase 2,<br> | ||
* not active until next freeze upgrade. | ||
*/ | ||
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. | ||
*/ | ||
AccountID account_id = 1; | ||
|
||
/** | ||
* Description of the node with UTF-8 encoding up to 100 bytes, optional field. | ||
*/ | ||
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.<br/> | ||
* 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. | ||
*/ | ||
repeated 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. | ||
* Endpoints in this list MAY supply either IP address or FQDN, but MUST | ||
* NOT supply both values for the same endpoint. | ||
*/ | ||
repeated 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. | ||
*/ | ||
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. | ||
*/ | ||
bytes grpc_certificate_hash = 6; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
syntax = "proto3"; | ||
|
||
package proto; | ||
|
||
/* | ||
* Hedera Network Services Protobuf | ||
* | ||
* 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
option java_package = "com.hederahashgraph.api.proto.java"; | ||
// <<<pbj.java_package = "com.hedera.hapi.node.addressbook">>> 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. | ||
*/ | ||
message NodeDeleteTransactionBody { | ||
/** | ||
* The unique id of the node to be deleted. If invalid node is specified, transaction will | ||
* result in INVALID_NODE_ID. | ||
*/ | ||
uint64 node_id = 1; | ||
} |
Oops, something went wrong.