-
Notifications
You must be signed in to change notification settings - Fork 609
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
[CL:Test] Add sqrtPrice check to swaps_test #4201
Conversation
Are we able to tie in with this PR these exact values but also derived from the python script Roman created? Otherwise we are just taking the word of whatever what output as the result which could potentially be incorrect. |
Good call! Will review once @czarcas7ic 's points has been addressed |
@@ -2,30 +2,36 @@ | |||
import sympy as sp | |||
from common import * | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: all the python changes are from my prettifier. lmk if there's a specific preference and i'll reset them
65090b5
to
72d3e2d
Compare
Added wolfram calculation. Ready for rereview @czarcas7ic @mattverse! |
Please do not merge this before the swap issues we're working on with Adam are resolved to avoid test breakage for the large PRs with fixes |
Please lmk when the other PRs gets merged so that i can rebase and get this one ready! |
This is ready to be reviewed / merged once conflicts are resolved. I attempted rebasing but most tests ended up failing. I'm not going to push to avoid breaking something here |
459c853
to
404940b
Compare
@p0mvn resolved your comments. One extra thing to point out is the test comments are very misleading, we should definitely think about either removing them or adding new ones |
Agreed, that's why for fee tests I've been moving towards estimating things via Python. As we keep reviewing and refactoring swaps, I think we might want to do something similar for all other tests |
0267d54
to
26c4eb7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you @stackman27 and sorry for breaking your branch earlier
Closes: #3989
What is the purpose of the change
checks sqrtPrice for TestCalcAndSwapOutAmtGivenIn, TestCalcAndSwapInAmtGivenOut
Brief Changelog
n/a
Testing and Verifying
n/a
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? (yes / no)x/<module>/spec/
) / Osmosis docs repo / not documented)