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
In order to implement a new feature for Hermes, we need to retrieve a grpc_address. It looks like get_chain_config() could provide a grpc address but currently does not. Is there currently a way to retrieve a grpc address ?
@AlianBenabdallah thanks for your question. Currently the client will only attempt to retrieve a healthy gRPC endpoint from the registry when a query is attempted
It sounds like you need to endpoint ahead of time for your own purposes. There are two options that I can immediately think of:
You can use any of the grpc endoint retrieval methods that exist on the client located in ocular::chain::client::grpc, as they are public methods.
// Gets every gRPC endpoint defined for a chainlet grpc = client.get_all_grpc_endpoints().await?;// Attempts to get only the "healthy" endpointslet grpc = client.get_grpc_endpoints().await?;// Return a single, healthy endpoint. This uses the other two methods internally.let grpc = client.get_random_grpc_endpoint().await?;
A warning though that we have seen inconsistent results with the health check, it apparently needs to be more robust. Sometimes even though a client connection can be established, queries may fail.
If that option isn't adequate or user-friendly, please suggest your desired API and we can make it happen quickly. This can be as simple as setting a grpc endpoint in the config in the location you suggested, no problem.
The client construction and endpoint management are key features that I feel could improve a lot. I value your feedback! Please let me know what you like and don't like as you use it.
No description provided.
The text was updated successfully, but these errors were encountered: