Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pharr117 opened this issue Jul 23, 2024 · 0 comments
Open

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

pharr117 opened this issue Jul 23, 2024 · 0 comments
Assignees
Labels
bug Something isn't working grant OGP2024

Comments

@pharr117
Copy link
Collaborator

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

cosmos-tax-cli/cmd/index.go

Lines 332 to 340 in 6191481

txsEventResp, unpackError, err := rpc.GetTxsByBlockHeight(cl, newBlock.Height)
if err != nil {
if strings.Contains(err.Error(), "unable to resolve type URL") {
errTypeURL = true
} else {
config.Log.Errorf("Error getting transactions by block height (%v). Err: %v. Will reattempt", newBlock.Height, err)
return err
}
}

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:

cosmos-tax-cli/cmd/index.go

Lines 346 to 349 in 6191481

// There are two reasons this block would be hit
// 1) The node might have pruned history resulting in a failed lookup. Recheck to see if the block was supposed to have TX results.
// 2) The RPC endpoint (node we queried) doesn't recognize the type URL anymore, for an older type (e.g. on an archive node).
if errTypeURL || len(txsEventResp.Txs) == 0 {

@pharr117 pharr117 added bug Something isn't working grant OGP2024 labels Jul 23, 2024
@pharr117 pharr117 self-assigned this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working grant OGP2024
Projects
Status: Todo
Development

No branches or pull requests

1 participant