Skip to content

Commit

Permalink
Fix Duplicated entries in AddressBook 0.0.101 (#22)
Browse files Browse the repository at this point in the history
* add new type NodeEndpoint which is repeated in NodeAddress and create a new type NodeAddressNodeAddressAbbreviated to allow backward compatibility

Signed-off-by: anighanta <[email protected]>

* remove deprecated tags from NodeAbbrv

Signed-off-by: anighanta <[email protected]>

* Updated NodeAddress and ClientnodeAddress according to review comments

Signed-off-by: anighanta <[email protected]>

* typo fix

Signed-off-by: anighanta <[email protected]>

* undo renaming of NodeAddressAbbreviated

Signed-off-by: anighanta <[email protected]>

* Change protobuf names NodeAddressBook to AddressBook ,NodeAddressAbbreviated to  NodeAddressForClients and NodeAddressBookAbbreviated to AddressBookForClients

* update comments describing deprecated tag

Signed-off-by: anighanta <[email protected]>

* update comments describing deprecated tag on memo field

Signed-off-by: anighanta <[email protected]>

Co-authored-by: Neeharika-Sompalli <[email protected]>
  • Loading branch information
anighanta and Neeharika-Sompalli authored Mar 31, 2021
1 parent c4cc866 commit e438df2
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions services/BasicTypes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -340,24 +340,49 @@ message CurrentAndNextFeeSchedule {
FeeSchedule nextFeeSchedule = 2; // Contains next Fee Schedule
}

/* This contains the IP Address and the port representing an endpoint of a Node in a network */
message NodeEndpoint {
string ipAddress = 1; // The IP address of the node
string port = 2; // The port of the node
}

/*
The metadata for a Node – including IP Address, and the crypto account associated with the Node.
Note : This structure is intended to be used to parse 0.0.102, use NodeAddressForClients to parse 0.0.101.
Usage of NodeAddress to parse 0.0.101 is deprecated.
*/
message NodeAddress {
bytes ipAddress = 1; // The ip address of the Node with separator & octets
int32 portno = 2; // The port number of the grpc server for the node
bytes memo = 3; // The memo field of the node (usage to store account ID is deprecated)
bytes ipAddress = 1 [deprecated=true]; // The ip address of the Node with separator & octets. Usage is deprecated, NodeEndPoint is preferred to retrieve a node's list of IP addresses and ports
int32 portno = 2 [deprecated=true]; // The port number of the grpc server for the node. Usage is deprecated, NodeEndPoint is preferred to retrieve a node's list of IP addresses and ports
bytes memo = 3 [deprecated=true]; // Usage is deprecated, nodeAccountId is preferred to retrieve a node's account ID
string RSA_PubKey = 4; // The RSA public key of the node
int64 nodeId = 5; // A non-sequential identifier for the node
AccountID nodeAccountId = 6; // The account to be paid for queries and transactions sent to this node
bytes nodeCertHash = 7; // A hash of the X509 cert used for gRPC traffic to this node
repeated NodeEndpoint nodeEndpoint = 8; // A node's IP address and port
string description = 9; // A description of the node. Max 100 bytes.
int64 stake = 10; // The amount of tinybars staked to this node
}

/*
A list of nodes and their metadata.
A list of nodes and their metadata that contains all details of the nodes for the network
*/
message NodeAddressBook {
repeated NodeAddress nodeAddress = 1; // Contains multiple Node Address for the network
message AddressBook {
repeated NodeAddress nodeAddress = 1; // Metadata of nodes on the network
}

/* All the information required to connect to the network.*/
message NodeAddressForClients {
int64 nodeId = 5; // A non-sequential identifier for the node. This value is the key between the full and abbreviated address books
AccountID nodeAccountId = 6; // The account to be paid for queries and transactions sent to this node
bytes nodeCertHash = 7; // A hash of the X509 cert used for gRPC traffic to this node
repeated NodeEndpoint nodeEndpoint = 8; // A node's IP address and port
}

/* A List of all nodes and just their information needed to connect to the network.*/
message AddressBookForClients {
repeated NodeAddressForClients nodeAddressForClients = 1; // Contains minimal node details for the network
}

message SemanticVersion {
Expand Down

0 comments on commit e438df2

Please sign in to comment.