-
Notifications
You must be signed in to change notification settings - Fork 50
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
Feat DivModNSafeDivPlusOne
hint (ec hint)
#551
Feat DivModNSafeDivPlusOne
hint (ec hint)
#551
Conversation
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.
@danielcdz just went through your PR quickly. It looks good, indeed all variables are *big.Int
in scope, assigned in DivModNPackedDivmodV1
hint .
can you also add in cairo_zero_hint_tests folder a copy of this file ?
you can run it with make integration
command, which will check whether runnning this program with our vm and python one produces the same memory and trace files or not.
Hey @TAdev0, when I run |
Mmh don't know. Can you use Cairo compile and Cairo run without issue? Maybe Python version ? Did you follow the read me to install everything properly |
I found what the issue was, I forgot to activate the python venv where I have installed the cairo 0 compiler dependencies |
@TAdev0 Now I have this error: |
Can you successfully run all other integration tests ? If no , it's a setup issue |
@TAdev0 Here is a better view to the results: |
OOOh thats perfect!! this is because we also miss this hint :
but your hint works |
@danielcdz can you also work on this hint and add it to this PR? so that the integration test : will work entirely |
@TAdev0 for sure! |
@TAdev0 All the integration tests are passing now! |
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.
great work overall @danielcdz !!!
Just left a few minor comments and then we merge !
@danielcdz can you resolve conflicts before final review? |
You still need to add value variable in scope. Here it works because as we saw there are 2 hints in a row but the first one is only used to import N and actually adds value variable in scope, it's second one that is actually tested (the one you implemented). Yours should add value in scope as well (and overwrite the previous one in the test) What I meant in dm is that you should create a copy of the variable you assign to res , and assign it to value |
@danielcdz you can simply use new(big.Int) and BigInt method to make a local copy instead of doing the computation 2 times |
Summary
Closes #527
Closes #532