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

Improve Postgres debugging and test options #365

Open
mvanhalen opened this issue May 28, 2022 · 2 comments
Open

Improve Postgres debugging and test options #365

mvanhalen opened this issue May 28, 2022 · 2 comments

Comments

@mvanhalen
Copy link
Contributor

mvanhalen commented May 28, 2022

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.

@mvanhalen
Copy link
Contributor Author

@tijno @lazynina @diamondhands0 FYI

@tijno
Copy link
Contributor

tijno commented May 30, 2022

yep that would be nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants