bryanlabs / cosmos-tax-cli

An opensource cosmos tax tool!
https://defiantlabs.net
Apache License 2.0
25 stars 7 forks source link

Primary query failure due to IAVL error on some blocks #563

Open pharr117 opened 4 months ago

pharr117 commented 4 months ago

The primary RPC query request here is failing on some blocks:

https://github.com/DefiantLabs/cosmos-tax-cli/blob/61914814fc9d8ee7b5e2126ec8dee7f0063df82c/cmd/index.go#L332-L340

Error getting transactions by block height (17247332). Err: rpc error: code = InvalidArgument desc = failed to load state at height 17247332; version mismatch on immutable IAVL tree; version does not exist. Version has either been pruned, or is for a future block height

We may be able to fallback to the secondary query that uses the block result request and decodes in-app here:

https://github.com/DefiantLabs/cosmos-tax-cli/blob/61914814fc9d8ee7b5e2126ec8dee7f0063df82c/cmd/index.go#L346-L349