-
Notifications
You must be signed in to change notification settings - Fork 149
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
AllocatedScalar refactor #566
Conversation
Now instead of mangling with `Variable`s, users will use `AllocatedScalar` instead which includes a reference to the Scalar a `Variable` references. - Make all pub fn's get and return `AllocatedScalar` in their signatures. Now the `Variable` type is something more internal to the crate and there should not be any uses for it outside of the crate internals.
Implements not only all the associated fns needed by `AllocatedScalar` consumers but also all the comodity trait implementations to be able to operate with them on a confy manner.
This includes: - arithmetic - range - logic - boolean - basic conditional selection & other utilities Now all the aformentioned modules and it's exported functions make use of `AllocatedScalar` and ask for it on their signatures to the lib consumers.
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.
This PR LGTM!
I've been through it with @EDGDrummond and it solves the problem of exposing the inner scalar for decomposition gadgets. Feel free to merge.
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.
Changes look good to me, will now allow us to remove reinforced concrete's decomposition functionality from plonk and add to RC repo
Add
AllocatedScalar
as part of PLONK's external APINow instead of mangling with
Variable
s, users will useAllocatedScalar
instead which includes a reference to theScalar a
Variable
references.AllocatedScalar
in theirsignatures.
Now the
Variable
type is something more internal to the crate andthere should not be any uses for it outside of the crate internals.
This is required in order to be able to externalized some gadgets added into this lib in
modularized_plookup
branch which should have never been included here and need this API change in order to be a thing outside of the lib itself.Resolves: #565