Closed
Description
openedon Nov 4, 2022
Summary of Bug
Trying to retrieve the bank supply via a REST endpoint for a previous block height and the endpoint returns a panic
Version
"node_info": {
.....
"network": "cosmoshub-4",
"version": "v0.34.21",
.....
}
},
"application_version": {
"name": "gaia",
"server_name": "gaiad",
"version": "v7.1.0",
"commit": "5db8fcc9a229730f5115bed82d0f85b6db7184b4",
Steps to Reproduce
Query the /cosmos/bank/v1beta1/supply
endpoint for a past height (12702000
), the server latest height at the time of the query is (12569986
)
curl --location --request GET 'https://cosmos-lcd.quickapi.com:443/cosmos/bank/v1beta1/supply?pagination.limit=10000' \
--header 'x-cosmos-block-height: 12702000'
This returns an error:
{
"code": 2,
"message": "runtime error: invalid memory address or nil pointer dereference: panic",
"details": []
}
I'm assuming that the server is pruned and that specified height in the --header
is not available anymore. If I query for a past height that is very close to the latest height then it works.
Maybe a better error message could be returned if that's the case ? Maybe even with a field saying what is the earliest available height that could be queried for?
Thanks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels