chore(stdlib)!: Change stdlib methods to accept slices#2050
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 |
jfecher
left a comment
There was a problem hiding this comment.
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 fmton default settings.