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

Add high score alert #122

Merged
merged 4 commits into from
Oct 15, 2024
Merged

Add high score alert #122

merged 4 commits into from
Oct 15, 2024

Conversation

harisang
Copy link
Contributor

@harisang harisang commented Oct 12, 2024

This PR adds a very simple alerts that checks if the winning score for auctions that made it onchain is larger than some threshold. Very large scores might be an indication of bogus native prices so this is one way to detect those cases.

I realized that currently the tests, as they are set up, will pass if the wrapper function returns True. But this doesn't really check the logic the test implements, so in order to properly see logs and behavior, one needs to run the tests as follows. E.g:

python -m pytest --log-cli-level=DEBUG tests/e2e/high_score_test.py

@harisang harisang requested a review from fhenneke October 12, 2024 07:16
Copy link
Contributor

@fhenneke fhenneke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me.

Do you want to add it to the main loop? Or just have it available for local testing?

In the short term, it would be easy to add a test on Dune. Midterm, we should have a dedicated monitoring repo where we can just easily add a flow to prefect.

@harisang
Copy link
Contributor Author

Oh good point, forgot to add it in the main loop. Will add it for now as it will make things faster, but it's a good point that we could also use dune for that at some point.

@harisang harisang merged commit 7677080 into main Oct 15, 2024
2 checks passed
@harisang harisang deleted the add_high_score_alert branch October 15, 2024 11:25
@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants