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

Implement U256InvModN hint #631

Merged
merged 11 commits into from
Aug 21, 2024
Merged

Conversation

Sh0g0-1758
Copy link
Member

Fixes: #630

@Sh0g0-1758
Copy link
Member Author

Sh0g0-1758 commented Aug 16, 2024

I found the rust implementation to be over engineered, so I followed the python implementation which was very straightforward and is passing the tests. I think performance of both should be the same. But happy to hear your thoughts on it. The tests are done on the examples given here

Copy link
Contributor

@cicr99 cicr99 left a comment

Choose a reason for hiding this comment

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

Looks very good. I thought you could use the uint256 library for this instead of bigInt, but it's better this way, all the methods are already using bigInt anyway

pkg/hintrunner/core/hint_test.go Outdated Show resolved Hide resolved
pkg/hintrunner/core/hint_test.go Outdated Show resolved Hide resolved
pkg/hintrunner/core/hint_test.go Outdated Show resolved Hide resolved
pkg/hintrunner/core/hint_test.go Outdated Show resolved Hide resolved
pkg/hintrunner/core/hint_test.go Outdated Show resolved Hide resolved
pkg/hintrunner/core/hint_test.go Outdated Show resolved Hide resolved
@Sh0g0-1758 Sh0g0-1758 merged commit 6ebeffd into NethermindEth:main Aug 21, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

Feat : Implement U256InvModN hint
3 participants