-
Notifications
You must be signed in to change notification settings - Fork 283
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
feat(AuthWit): Query if Authwit was valid in Aztec.nr #4822
Comments
As part of #4799 cancellations was added. So the functions were renamed and a now emitting nullifiers to actually "spend" the approvals.
For public, there is the option to lookup the value, but if you really want there will now be plenty of functions essentially doing the same but for If the main issue was reading when it was entirely off-chain then it seems like something we could address at in js? Was it all for your own account, or for someone elses? Essentially to figure out whether we need to call a function on it to check. If we can simulate properly, then it seems like it would be fairly easy to do? Simulate the call as if you had a different |
Also gonna add @spalladino since it was his suggestion from the dogfooding? |
@LHerskind our use case was for implementing multisig: we loop over the signers, and for each of them ask them if the current action We ended up solving it by adding a very hacky So, going back to your points, it seems that adding an unconstrained variant for Also, if we're going to keep the assertion within |
As expected, no one read the docs during the hacking at the offsite. We need rustdoc for noir asap so we can have proper inline docs. |
Fixes #4822. The current solution is pretty ugly (I think). The issues encountered is mainly that: - There are no context so we need to pass stuff that seems quite redundant (address of the contract itself and block number) - Fetching witness data with oracles explodes if you try to fetch something that does not exists. - The implementation here is a lookup from "outside" a transaction. The latter is the main trouble. It can be somewhat mitigated by having a function on the typescript side of things that try doing the lookup in its local storage first to not encounter that case, but then we need to be able to split the check so seems a bit meh to fix it that way. This means that the unconstrained cannot really be used nicely as what @spalladino did at the offsite, but mainly is an off-chain thing for the user who is unsure if something was approved and want to check it. I'm not really sure if I like to have the implementation this way where we are doing things in both ts and noir to get it somewhat working, but seems like the thing that is making it the easiest to get a query going fast.
From the offsite notes:
Difficult to “query” if something was valid
is_valid
returns IS_VALID_SELECTORThe text was updated successfully, but these errors were encountered: