Skip to content

When using postgres indexer, TxResults for blocks where any transaction has an error code are not stored #9460

@pscott31

Description

@pscott31

Tendermint version 0.34.20

ABCI app vega

Environment:

  • OS ubuntu 20.04

What happened:
We're testing out switching to using the postgres indexer to facilitate building a block explorer. I noticed a bunch entries missing in the tx_results table, and in the log I see messages like

txindex/indexer_service.go:88 deduplicate batch {"height": 412}

Digging into it a little it seems that this is because txIdxr.Get(hash) is not implemented by the BackportTxIndexer that is used when the postgres indexer is enabled. I think it would not be too tricky to implement, and I'm happy to have a stab at that, but thought I had better check here first because I don't fully understand the purpose of DeduplicateBatch.

Also we've noticed that when enabling the postgres indexer tendermint cannot keep up with its peers and keeps going out of sync so I'm a bit loathe to add in more PG queries; I figure this sort of thing could possibly be solved with an ON CONFLICT DO xxx clause but I'm not sure if I could make that fit in nicely with the backend-agnostic framework you have.

What you expected to happen:

No errors in the log, all my TxResults in my postgres DB :)

Have you tried the latest version: yes/no

I haven't tried in 0.35.xx as we have had a bunch of issues with that and have had to revert back to 0.34 for now

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions