-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix Duplicated entries in AddressBook 0.0.101 #22
Conversation
… a new type NodeAddressNodeAddressAbbreviated to allow backward compatibility Signed-off-by: anighanta <anirudh.ghanta@hedera.com>
I have outstanding questions in the services ticket that I would like to see answered. |
|
Signed-off-by: anighanta <anirudh.ghanta@hedera.com>
Signed-off-by: anighanta <anirudh.ghanta@hedera.com>
Signed-off-by: anighanta <anirudh.ghanta@hedera.com>
…eviated to NodeAddressForClients and NodeAddressBookAbbreviated to AddressBookForClients
|
||
/* 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate on this more please; reading the comments I'm not entirely sure what nodeId
is; what are these key
's between full and abbreviated address books? Also, what is an abbreviated address book? I understand this field is a int64
and nodeAccountId
is an AccountID
, but what is the difference between these two fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Idea behind this change is that, as we have multiple IPs for each node, when we get the addressBook 0.0.101 of mainnet for example.. we get a list with repeated entries for each node. To resolve this we want to create a new abbreviated version of the addressBook which will have a repeated Endpoint
. So in future, when we get the addressbook we will get just enough information to connect to the network using this abbreviated message.
Note: this abbreviated message is AddressBookForClients
.
A nodeId is just a sequential identifier of a node and the nodeAccountID is the AccountID
associated with the node. Right now although they represent different things, their value is the same as in if nodeID is N
, its account id is 0.0.N
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if nodeID is N, its account id is 0.0.N
Correction: if nodeID is N, its account id is 0.0.(N + 2). Example: node 1 is 0.0.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just the case now, but won't always be the case. Nodes can change their account ID in the future to something else while the node ID has to stay the same. Neither will necessarily stay sequential in the future either. Thus clients shouldn't rely on the account ID and should use the node ID. Later we will need to update the stream bucket paths as well to use the node ID, for example.
Signed-off-by: anighanta <anirudh.ghanta@hedera.com>
Signed-off-by: anighanta <anirudh.ghanta@hedera.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Resolves issue: #21
Parent Issue : hashgraph/hedera-services#750
Signed-off-by: anighanta anirudh.ghanta@hedera.com