-
Notifications
You must be signed in to change notification settings - Fork 12
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: constrain ops only in constrained context #102
base: main
Are you sure you want to change the base?
fix: constrain ops only in constrained context #102
Conversation
I believe this will optimize execution inside AVM, right? |
Yep, anything that checks the result is correct is unnecessary in the unconstrained context. |
@TomAFrench review please. Review very carefully as IDK what i am doing |
We can do the same stuff in
|
a793732
to
abe33a0
Compare
abe33a0
to
707fe98
Compare
@TomAFrench i added |
Description
Problem*
Resolves #91
Summary*
Constrain ops via
evaluate_quadratic_expression
only in constrained context.Additional Context
@TomAFrench should
validate_gt::<_, MOD_BITS>(divisor, remainder);
fromfn udiv_mod
also be insideif !std::runtime::is_unconstrained()
?PR Checklist*
cargo fmt
on default settings.