You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on adding a feature to the SDKs that involves populating the SDKs consensus network by querying the mirror node for the address book. Basically would look like:
Client client;
client.setMirrorNetwork("127.0.0.1:5600");
client.populateConsensusNetworkFromAddressBook(); // Initializes the SDKs consensus node network
// Now able to execute transactions
...
This would allow Sphere use cases to not have to bother initializing their apps with the correct IPs and ports and instead and can just maintain an address book from which the apps can get the network information.
When testing this feature with hedera-local-node, it seemed the consensus node endpoint for itself was incorrect. Simply running this with the Java SDK, you can see the reported endpoint is incorrect:
Client client = ClientHelper.forLocalNetwork();
NodeAddressBook addressBook = new AddressBookQuery()
.setFileId(FileId.ADDRESS_BOOK)
.execute(client);
List<NodeAddress> addresses = addressBook.getNodeAddresses();
for (int i = 0; i < addresses.size(); ++i)
{
System.out.println(addresses.get(i).toString());
}
Running this with the C++ SDK as well confirms its not an SDK parsing issue:
Client client;
client.setMirrorNetwork({ "127.0.0.1:5600" });
client.setNetwork({
{"127.0.0.1:50211", AccountId::fromString("0.0.3")}
});
// Query for the address book using the client.
const NodeAddressBook nodeAddressBook = AddressBookQuery().setFileId(FileId::ADDRESS_BOOK).execute(client);
// Print off the received addresses contained in the address book.
for (const auto& nodeAddress : nodeAddressBook.getNodeAddresses())
{
std::cout << nodeAddress.toString() << std::endl;
}
I know the default IP and port used for hedera-local-node is "127.0.0.1:50211", so I would think it'd want to properly report its own endpoint.
Steps to reproduce
Run code above.
Observe incorrect endpoint.
Additional context
No response
Hedera network
other
Version
v2.31.0
Operating system
macOS
The text was updated successfully, but these errors were encountered:
rwalworth
changed the title
hedera-local-node IP and port in mirror node address book is incorrect
Consensus node IP and port in address book is incorrect
Oct 24, 2024
Description
I'm working on adding a feature to the SDKs that involves populating the SDKs consensus network by querying the mirror node for the address book. Basically would look like:
This would allow Sphere use cases to not have to bother initializing their apps with the correct IPs and ports and instead and can just maintain an address book from which the apps can get the network information.
When testing this feature with
hedera-local-node
, it seemed the consensus node endpoint for itself was incorrect. Simply running this with the Java SDK, you can see the reported endpoint is incorrect:Running this with the C++ SDK as well confirms its not an SDK parsing issue:
I know the default IP and port used for
hedera-local-node
is"127.0.0.1:50211"
, so I would think it'd want to properly report its own endpoint.Steps to reproduce
Additional context
No response
Hedera network
other
Version
v2.31.0
Operating system
macOS
The text was updated successfully, but these errors were encountered: