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
When testing the new health-check command in Hermes, realised that the /consensus_params endpoint is not reliable when retrieving information for the latest height
Version
hermes 0.7.1+26087d57
Steps to Reproduce
Run the new hermes health-check against a Cosmos chain (tested with osmosis-1 and cosmoshub-4)
Getting error about JSON-RPC endpoint
hermes -c config.toml health-check
Sep 21 14:25:47.298 INFO [cosmoshub-4] performing health check...
Sep 21 14:25:47.552 WARN Hermes might be misconfigured for chain 'cosmoshub-4'
Sep 21 14:25:47.552 WARN Reason: semantic config validation failed for option `max_tx_size` chain 'cosmoshub-4', reason: `max_tx_size` = 2097152 is greater than 90% of the genesis block param `max_size` = 200000
Sep 21 14:25:47.552 WARN Some Hermes features may not work in this mode!
Sep 21 14:25:47.552 ERROR [cosmoshub-4] chain is unhealthy
Sep 21 14:25:47.555 INFO [osmosis-1] performing health check...
Sep 21 14:25:50.132 WARN Hermes might be misconfigured for chain 'osmosis-1'
Sep 21 14:25:50.132 WARN Reason: semantic config validation: failed to reach endpoint /consensus_params on the JSON-RPC interface of chain osmosis-1:http://osmosis.decentrox.com:26657/
Sep 21 14:25:50.132 WARN Some Hermes features may not work in this mode!
Sep 21 14:25:50.133 ERROR [osmosis-1] chain is unhealthy
Then checked the endpoint directly in the browser and get lots of erros when calling /consensus_params
{
"jsonrpc": "2.0",
"id": -1,
"error": {
"code": -32603,
"message": "Internal error",
"data": "could not find consensus params for height #1276406: value retrieved from db is empty"
}
}
But if I keep trying I get eventually a valid response
Same thing with Hermes, running several times eventually don't get the RPC endpoint error
hermes -c config.toml health-check
Sep 21 14:27:53.918 INFO [cosmoshub-4] performing health check...
Sep 21 14:27:54.199 WARN Hermes might be misconfigured for chain 'cosmoshub-4'
Sep 21 14:27:54.200 WARN Reason: semantic config validation failed for option `max_tx_size` chain 'cosmoshub-4', reason: `max_tx_size` = 2097152 is greater than 90% of the genesis block param `max_size` = 200000
Sep 21 14:27:54.200 WARN Some Hermes features may not work in this mode!
Sep 21 14:27:54.200 ERROR [cosmoshub-4] chain is unhealthy
Sep 21 14:27:54.203 INFO [osmosis-1] performing health check...
Sep 21 14:27:56.181 INFO [osmosis-1] chain is healthy
Also, querying the /consensus_params?height=[HEIGHT] works fine
Acceptance Criteria
Since we are only calling this endpoint to get the max_bytes and the chances of this changing (only through governance) I'd suggest we change the logic instead of calling the lastest_consensus_params, we find the latest height and then query the specifying a height that is a few blocks behind the latest
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate milestone (priority) applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
romac
changed the title
Health-check fails because consensus_params endpoint is not reliable
Health-check fails because /consensus_params endpoint is not reliable
Sep 22, 2021
Crate
Summary of Bug
When testing the new
health-check
command in Hermes, realised that the/consensus_params
endpoint is not reliable when retrieving information for the latest heightVersion
hermes 0.7.1+26087d57
Steps to Reproduce
Run the new
hermes health-check
against a Cosmos chain (tested with osmosis-1 and cosmoshub-4)Getting error about JSON-RPC endpoint
Then checked the endpoint directly in the browser and get lots of erros when calling
/consensus_params
But if I keep trying I get eventually a valid response
Same thing with Hermes, running several times eventually don't get the RPC endpoint error
Also, querying the
/consensus_params?height=[HEIGHT]
works fineAcceptance Criteria
Since we are only calling this endpoint to get the max_bytes and the chances of this changing (only through governance) I'd suggest we change the logic instead of calling the lastest_consensus_params, we find the latest height and then query the specifying a height that is a few blocks behind the latest
For Admin Use
The text was updated successfully, but these errors were encountered: