-
Notifications
You must be signed in to change notification settings - Fork 43
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(MemcpyEnterScope): enters a new scope for the memory copy operaton with a specified length #372
feat(MemcpyEnterScope): enters a new scope for the memory copy operaton with a specified length #372
Conversation
…ion with a specified length
Thank you for you contribution! If you resolve the the len as Felt and load it to the scope, you can try and write some unit tests, which check the insides of the scope. Write on Telegram if you have any problems 😁 |
Thank you for all the help! I will work on the unit tests. |
unit test added for the hint :) |
One nitpick left, other than that, looks good to me. Good job! 😎 |
Okey, you need to lint is as well using |
Oh sure, fixed |
I think everything is fixed now guys, thank you very much! Let me know if any issues. |
LGTM ! waiting for final review @rodrigo-pino @chee-chyuan @MaksymMalicki @har777 and we're good to go :) |
@Alvarodb will compare the result of your hint with the result produced by the python VM today to be 100% sure and then we're good ! |
@Alvarodb i just tested your hint. Well, there is not much to test actually. The I used this cairo file that i ran on the python VM :
I added a new hint When i run this main function, i get I also tested for fun with many other values, small or big, everything works well without surprise. |
@rodrigo-pino @cicr99 @MaksymMalicki @har777 ready for a 2nd approval ! |
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.
It looks great in general but there is the problem I pointed out in the comment. I see you wrote on top of the VMEnterScope
hint, they are very similar but they are different ones, so you'll need to add memcpyEnterScope
as a separate one.
See here an example where VMEnterScope
is being used https://github.com/starkware-libs/cairo-lang/blob/efa9648f57568aad8f8a13fbf027d2de7c63c2c0/src/starkware/cairo/common/squash_dict.cairo#L28
I've added memcpyEnterScope as a separate function, keeping the original implementation of VMEnterScope intact so this should be ok now. Thanks for the feedback! |
LGTM @cicr99 |
lgtm! |
resolves #250