Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Dynamic Address Book Phase 2 protobufs changes #344

Merged
merged 74 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
8f63739
Initial draft of PBJ types for token state (#263)
Neeharika-Sompalli Apr 12, 2023
618854f
file proto (#267)
povolev15 Apr 14, 2023
7bbf1d5
Change allowance maps on `Account` PBJ Object (#269)
Neeharika-Sompalli Apr 18, 2023
f6aadf0
fix some comments on file proto (#268)
povolev15 May 1, 2023
d336767
Add missing fields in Account (#270)
Neeharika-Sompalli May 8, 2023
ad7d2c0
Add the TransactionRecordEntry type for the record cache.
rbair23 May 23, 2023
4a6c9ff
Add payer account ID
rbair23 May 24, 2023
f471f22
Merge branch 'main' into add-pbj-types-for-state
Neeharika-Sompalli May 31, 2023
c858be6
Include `ContractService` state types (#273)
tinker-michaelj Jun 1, 2023
96774e9
Added state for blocks and running hashes (#276)
jasperpotts Jun 1, 2023
2bbbee4
Add `StakingNodeInfo` for MerkleStakingInfo (#277)
Neeharika-Sompalli Jun 8, 2023
5bcd7e8
add schedule proto (#280)
povolev15 Jun 16, 2023
0adaa8b
Fixing incorrect case for Timestamp. (#282)
jsync-swirlds Jun 16, 2023
413f7cd
Adding missed import statement. (#283)
jsync-swirlds Jun 16, 2023
faee2f6
Fix package name for state/schedule (#284)
jsync-swirlds Jun 20, 2023
3568673
change topic number to topicID (#286)
povolev15 Jun 21, 2023
70ca376
Update file.proto to use FileID type instead of long for file identif…
kimbor Jun 22, 2023
c524a89
Adjusting the state Schedule message to improve implementation. (#288)
jsync-swirlds Jun 27, 2023
280f440
Change nft owner and spender identifier from long to AccountID (#289)
kimbor Jun 28, 2023
89b75cb
Update common.proto, token.proto, token-relation.protp and classes th…
iwsimon Jun 30, 2023
e1b59db
Use NftID instead of UniqueTokenId (#292)
kimbor Jul 8, 2023
095591b
changed auto_renew_account_number to auto_renew_account_id in topic.p…
iwsimon Jul 10, 2023
2554e80
Add Staking Reward related fields from `MerkleNetworkContext` (#295)
Neeharika-Sompalli Jul 14, 2023
7051729
use snake case throughout protobufs (#294)
iwsimon Jul 17, 2023
003ff39
Update Schedule state protobuf to add a wait_for_expiry flag. (#297)
jsync-swirlds Jul 17, 2023
0bb5c4b
update account ids (#291)
kimbor Jul 20, 2023
91a53b3
Add Protobuf messages for primitive values and a list of Schedules. (…
jsync-swirlds Aug 3, 2023
b22750f
Fix the "java_package" (#302)
Neeharika-Sompalli Aug 14, 2023
813199c
protobuf cleanup (#298)
kimbor Aug 16, 2023
c222122
Merge branch 'main' into add-pbj-types-for-state
tinker-michaelj Sep 7, 2023
a213031
Add TransactionGetFastRecord to HederaFunctionality (#303)
kimbor Sep 13, 2023
fb10d6d
Revert `NftID#tokenId` to `NftID#tokenID` (#306)
tinker-michaelj Sep 15, 2023
2dff325
Add throttle and congestion types (#304)
MiroslavGatsanoga Sep 26, 2023
472e834
Dynamic address book HAPI change
iwsimon Nov 9, 2023
18d18f6
Dynamic address book HAPI change
iwsimon Nov 9, 2023
92529cb
Merge remote-tracking branch 'origin/9796-DAB-change' into 9796-DAB-c…
iwsimon Nov 9, 2023
8ec085f
update change
iwsimon Nov 10, 2023
d3c7074
update to CamelCase.
iwsimon Nov 13, 2023
b976b4c
Revert "update to CamelCase."
iwsimon Nov 13, 2023
3e249b6
updated names and types by review comments.
iwsimon Nov 13, 2023
c25f687
updated with mandatory/optional fields in create node
iwsimon Nov 14, 2023
96522e6
updated transaction_receipt.proto with added node_id
iwsimon Nov 14, 2023
63391c8
updated with discussions from Dynamic Address Book Record Stream Requ…
iwsimon Nov 14, 2023
720e395
Added to schedulable_transaction_body.proto
iwsimon Nov 14, 2023
40a4bf0
more updates
iwsimon Nov 14, 2023
9861f33
Add migration properties to BlockInfo (#310)
mhess-swl Nov 14, 2023
d9f0bdb
Update with review comments.
iwsimon Nov 15, 2023
102b30a
Update with review comments.
iwsimon Nov 16, 2023
b66fb9f
Merge branch 'add-pbj-types-for-state' into 9796-DAB-change
iwsimon Nov 16, 2023
a7f4f89
Updated according to Mark's confirmation posted on #dynamic-addressbo…
iwsimon Nov 17, 2023
f5d4e61
Commented out status field.
iwsimon Nov 28, 2023
1d84c13
Updated
iwsimon Nov 28, 2023
4149e83
Updates
iwsimon Nov 28, 2023
ba09e89
Updated with HIP draft changes.
iwsimon Jan 5, 2024
b2f0bdc
Updated with HIP draft changes.
iwsimon Jan 12, 2024
1554ded
Merge branch 'main' into 9796-DAB-change
iwsimon Apr 16, 2024
bed3481
Updated with latest HIP and merged with main branch.
iwsimon Apr 16, 2024
7530d96
format.
iwsimon Apr 16, 2024
652b27f
updated node state with latest HIP.
iwsimon Apr 18, 2024
51fe810
added getNodeInfo query
iwsimon Apr 22, 2024
9687dff
update with reviews
iwsimon Apr 23, 2024
e677176
updated with review comments
iwsimon Apr 23, 2024
347091e
Merge branch 'main' into 9796-DAB-change
iwsimon Apr 23, 2024
c5dbd35
updated with review comments
iwsimon Apr 23, 2024
e8a5b6d
Updated.
iwsimon Apr 23, 2024
eba17e1
Updated.
iwsimon Apr 23, 2024
fc8c158
Updated with review comments.
iwsimon Apr 24, 2024
a1ea341
Updated from DAB p2 & PFX meeting today
iwsimon Apr 24, 2024
dc5a1a0
Added more response codes.
iwsimon Apr 25, 2024
dd5787e
Updated.
iwsimon Apr 25, 2024
c3b1d13
Updated with review comments.
iwsimon Apr 25, 2024
17d234f
Corrected an accident change during the call.
iwsimon Apr 25, 2024
89e0eae
Changed pbj.java_package to com.hedera.hapi.node.addressbook and Node…
iwsimon Apr 26, 2024
f7b2e43
Updated with reviews.
iwsimon Apr 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions services/address_book_service.proto
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);
}
36 changes: 29 additions & 7 deletions services/basic_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ message Key {
* contractID key, which also requires the code in the active message frame belong to the
* the contract with the given id.)
*/
ContractID delegatable_contract_id = 8;
ContractID delegatable_contract_id = 8;
}
}

Expand Down Expand Up @@ -1188,9 +1188,24 @@ enum HederaFunctionality {
TransactionGetFastRecord = 87;

/**
* Update the metadata of one or more NFT's of a specific token type.
*/
* Update the metadata of one or more NFT's of a specific token type.
*/
TokenUpdateNfts = 88;

/**
* Create a node
*/
NodeCreate = 89;

/**
* Update a node
*/
NodeUpdate = 90;

/**
* Delete a node
*/
NodeDelete = 91;
}

/**
Expand Down Expand Up @@ -1268,7 +1283,7 @@ message TransactionFeeSchedule {
/**
* Resource price coefficients
*/
FeeData feeData = 2 [deprecated=true];
FeeData feeData = 2 [deprecated = true];

/**
* Resource price coefficients. Supports subtype price definition.
Expand Down Expand Up @@ -1353,6 +1368,13 @@ message ServiceEndpoint {
* The port of the node
*/
int32 port = 2;

/**
* A node domain name
* This MUST be the fully qualified domain name of the node.
* This value MUST NOT be more than 253 characters.
*/
string domain_name = 3;
}

/**
Expand All @@ -1370,18 +1392,18 @@ message NodeAddress {
* The IP address of the Node with separator & octets encoded in UTF-8. Usage is deprecated,
* ServiceEndpoint is preferred to retrieve a node's list of IP addresses and ports
*/
bytes ipAddress = 1 [deprecated=true];
bytes ipAddress = 1 [deprecated = true];

/**
* The port number of the grpc server for the node. Usage is deprecated, ServiceEndpoint is
* preferred to retrieve a node's list of IP addresses and ports
*/
int32 portno = 2 [deprecated=true];
int32 portno = 2 [deprecated = true];

/**
* Usage is deprecated, nodeAccountId is preferred to retrieve a node's account ID
*/
bytes memo = 3 [deprecated=true];
bytes memo = 3 [deprecated = true];

/**
* The node's X509 RSA public key used to sign stream files (e.g., record stream
Expand Down
88 changes: 88 additions & 0 deletions services/node_create.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
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 {
steven-sheehy marked this conversation as resolved.
Show resolved Hide resolved

/**
* 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.
jsync-swirlds marked this conversation as resolved.
Show resolved Hide resolved
*/
string description = 2;

/**
* Ip address and port, mandatory field. Fully qualified domain name is
* not allowed here. 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.
jsync-swirlds marked this conversation as resolved.
Show resolved Hide resolved
*/
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.
jsync-swirlds marked this conversation as resolved.
Show resolved Hide resolved
*/
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.
jsync-swirlds marked this conversation as resolved.
Show resolved Hide resolved
*/
bytes grpc_certificate_hash = 6;
}
44 changes: 44 additions & 0 deletions services/node_delete.proto
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;
}
Loading