-
Notifications
You must be signed in to change notification settings - Fork 24
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
Full Multi-query support onchain #321
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 12715993929Details
💛 - Coveralls |
b70f050
to
a02592c
Compare
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.
I haven't completed review of all the files. However, these feedback is what I have now.
contracts/interfaces/IVerifier.sol
Outdated
function getProofStatus( | ||
address sender, | ||
uint256 requestId | ||
) external view returns (ProofStatus memory); |
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.
We need to add getMultiRequestStatus()
, I think
contracts/verifiers/Verifier.sol
Outdated
* @param userID The user id of the user | ||
* @return status The status of the multiRequest. "True" if all requests are verified, "false" otherwise | ||
*/ | ||
function getMultiRequestStatus( |
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.
We don't need this method, and it doesn't even work properly anymore
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.
Removed
* @param name Name of the response field | ||
* @param value Value of the response field | ||
*/ | ||
struct ResponseField { |
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.
As we agreed, we don't need this struct in IAuthValidator
bytes calldata params, | ||
address sender, | ||
IState state | ||
) external returns (ResponseField[] memory); |
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.
Just return bool, as agreed
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.
We will return uint256 userID
as agreed.
contracts/verifiers/Verifier.sol
Outdated
// Whitelisted validators | ||
mapping(IRequestValidator => bool isApproved) _validatorWhitelist; |
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.
The whitelisted validators mapping seem not to me used. The other mapping in the ValidatorWhitelist contract seem to be used.
If that's true than it can be removed
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.
Removed
Implement multi-query support similar to existing requests now in Universal Verifier.
Query
) independently and in the same way we are managing Requests in ZKPVerifierBase now (setQuery, getQuery, …). Avoid ZKP and generalize methods in Requests. setRequest, getRequest, submitResponse, …address user
touint256 userID
to keep identifier of the user.userAddress
anduserID
. In this first version 1 userID will have only 1 address? Review best approach or if we have to keep an array of addresses.linkID
between the Requests and Auth of the sameQuery
.uint64
touint256
.Link to Tech Spec for changes: https://www.notion.so/privado-id/Multi-query-Tech-Spec-13d4f86a875180e68fc8e3fa5362805e