Skip to content

Improve Postgres debugging and test options #365

@mvanhalen

Description

@mvanhalen

Issues on Postgres tend to take to long to fix and sometimes to find. This is due to the fact that the sync takes longer and errors manifest themselves at new block heights at the end of the chain.

Although the test chain or custom chains can be used for certain things it´s kinda complex to setup and run. I think what is needed is a debug option at block level. Where you can specify a block height, fetch that block and test data and check if Postgres code can parse it without crashing.

Also a way to test new or specified transaction(s) before putting it into live would be good. Like testing a new transaction type to see if that can be parsed.

I know it will be hard to approach 100% test coverage. But I think these 2 things can speed up finding bugs, but also new development, because it´s easier to confirm if new code works. Now I´m just hesitant to add or change stuff, because of testing complexibitly

I guess adding some options to postgres_test.go would be best? And calling the existing functions from there? Not sure what is the best way to have/mock testdata. Maybe fetch the data from node.deso.org? Are there packages which are recommended for this?

Let me know your thoughts.

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