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

fix: don't U128::from_integer(u128) #10865

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Conversation

asterite
Copy link
Contributor

@asterite asterite commented Dec 18, 2024

In Noir we are removing the (private) built-ins as_field and from_field, which allowed casting any type to and from Field by truncating its bits. This uncovered two bugs where we were doing U128::from_integer(x) with x itself being a U128. That code won't compile anymore (and I think it was incorrect) so I'm doing those changes in this PR.

See noir-lang/noir#6845

Copy link
Contributor

Changes to public function bytecode sizes

Generated at commit: 80510e6ab96564eb54e7dea96e3dfef7835a69df, compared to commit: e867e87e4e5e4b140bf8ec3e5ee75abd24571bb1

🧾 Summary (100% most significant diffs)

Program Bytecode size in bytes (+/-) %
Lending::public_dispatch -47 ✅ -0.17%
Lending::get_position -66 ✅ -1.40%

Full diff report 👇
Program Bytecode size in bytes (+/-) %
Lending::public_dispatch 27,782 (-47) -0.17%
Lending::get_position 4,662 (-66) -1.40%

@asterite asterite requested a review from TomAFrench December 19, 2024 10:24
@TomAFrench TomAFrench merged commit 3d00d34 into master Dec 19, 2024
73 checks passed
@TomAFrench TomAFrench deleted the ab/do-not-u128-from-u128 branch December 19, 2024 10:30
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.

2 participants