-
Notifications
You must be signed in to change notification settings - Fork 225
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
chore(stdlib)!: Change stdlib methods to accept slices #2050
Conversation
Yeah Jake's probably the best to review this sensibly. |
Changing the Poseidon generics was leading to some issues during branch analysis. For now this PR just updates the hash functions to accept slices |
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.
I'm not sure about this change. It seems to be putting a band-aid over the real problem of to_le_bytes
and friends lying about their type signature. This may fix the linked bug but there are also several other bugs that are a result of the same issue in to_le_bytes
.
I think to properly fix it we need to fix to_le_bytes
to return an array of some maximum length, with any extra space filled up with zeroes. If we want to be wary of the Field size changing we can add an assert that the field size is smaller than whatever can fit in the maximum length we decide upon. We should just document that it will fail if the field size and value are too large.
Closing in favor of #2070 |
Description
Problem*
Resolves #1842
Summary*
Move from generic arrays syntax on methods to slices in the SSA
Documentation
This PR requires documentation updates when merged.
Additional Context
PR Checklist*
cargo fmt
on default settings.