-
Notifications
You must be signed in to change notification settings - Fork 118
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
Ensure safe Uint64/32 instanciations, with new Unsafe.fromField() #1438
Conversation
Awesome! |
not needed, sha256 is a low-level gadget and has to reach beyond the safe abstraction of a UInt32 |
Ok, then I can safely use the FieldVar value of the Field (or the new |
Hey @julio4 this is really valuable work that we'd love to include in a release soon. Any way we can help land this? |
Hello! I planned to work on it this week. But I think it should be ready, I would just need some help to run pipelines and build locally. I followed the local dev env setup but I encountered some issues. |
@julio4 sure, try to run the following steps. does it fail somewhere?
|
Thank you! But I already followed the README-dev and it fail at the main ts build:
Do you know what node version is used? |
@julio4 the command line output you show isn't a failure. It's a warning, which does not point to an actual problem |
you can also see in the CI tests that the build works fine, but something about |
Oh yes, I didn't noticed but all builds are working. The error comes from |
@julio4 it seems that every construction of uints is failing. So if the account update file is hard to parse, I recommend to just create a trivial test or run the integer test with |
@julio4 thanks so much for doing most of this heavy change! I pushed the last remaining fixes, it's ready to go! |
Thank you for fixing the issue. I tried to dig a little bit on it and didn't found what was causing the error. |
Related to #1286
Wanted to explore the o1js repository and tried to tackle this issue.
Field
toFieldVar
in constructorsField
fromfrom()
functionsUnsafe.fromField()
The
sha256
gadget still rely on a lots of integers directly from field, so this may be a follow up issue as well.