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

Full Multi-query support onchain #321

Merged
merged 115 commits into from
Feb 4, 2025
Merged
Changes from 1 commit
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
bf71699
new universal verifier multi-query
daveroga Nov 26, 2024
74b24a1
Discussion results
AndriianChestnykh Nov 26, 2024
16a8b27
Discussion results 2
AndriianChestnykh Nov 26, 2024
f05104d
update universal verifier multi query
daveroga Nov 26, 2024
779513f
remove ZKP
daveroga Nov 26, 2024
8da12c7
add auth validators
daveroga Nov 26, 2024
ba75a5d
Broader discussion results
AndriianChestnykh Nov 26, 2024
ae9cec1
Add agreed universal verifier solution
AndriianChestnykh Nov 27, 2024
790a0e3
update universal verifier multi query with agreed design
daveroga Nov 28, 2024
1858dce
query status and submit response
daveroga Nov 28, 2024
4527834
get request type from 30 byte of the requestId
daveroga Nov 28, 2024
bb82ff3
add EthIdentityValidator
daveroga Nov 28, 2024
e66a160
updates from review
daveroga Nov 28, 2024
d416b9a
Discussion result
AndriianChestnykh Nov 29, 2024
a26861c
updates from discussion
daveroga Nov 29, 2024
0c2e792
check response field values from linked response fields
daveroga Nov 29, 2024
16f8b5a
fix some errors in compilation
daveroga Dec 2, 2024
4afb814
test universal verifier multi-query
daveroga Dec 3, 2024
8f55467
different validators for sig and authv2
daveroga Dec 3, 2024
657fa6c
check specific storage values
daveroga Dec 3, 2024
46d17ab
overrides solidity compiler optimizations for specific contract
daveroga Dec 3, 2024
1e7b877
remove some methods
daveroga Dec 3, 2024
2942cdf
fix solhint
daveroga Dec 3, 2024
a91c1e7
update from discussion
daveroga Dec 4, 2024
849e790
set group of requests and check linkID
daveroga Dec 5, 2024
a02592c
fix solhint
daveroga Dec 5, 2024
6b82ff0
updates from review
daveroga Dec 6, 2024
d35e4b4
fix cyclomatic-complexity
daveroga Dec 6, 2024
3811b9c
some fixes from review
daveroga Dec 9, 2024
4030067
updates from tech spec
daveroga Dec 9, 2024
6135f84
add auth validator stub and fix test
daveroga Dec 10, 2024
b860ab0
add changes for user authentication structs
daveroga Dec 10, 2024
fc7bc91
fix solhint
daveroga Dec 10, 2024
c3bb7e3
reestructure link between userID and address and mapping for authenti…
daveroga Dec 11, 2024
14d08fb
auth proofs different structure
daveroga Dec 11, 2024
3734eb5
add custom errors to UniversalVerifierMultiQuery
daveroga Dec 11, 2024
4c8e01d
add __gap in proofs storage for future updates and array of proofs fo…
daveroga Dec 12, 2024
24888ad
param names in returned structs from solidity
daveroga Dec 12, 2024
14ca44b
Initial verifier authentication (#323)
AndriianChestnykh Dec 17, 2024
636f590
updates for iteration 2
daveroga Dec 18, 2024
88ff859
fix test multi-query
daveroga Dec 19, 2024
fb2a5b4
update verifiers tests
daveroga Dec 20, 2024
faa2d0b
fix validators tests and solhint
daveroga Dec 20, 2024
a8c8653
updates merge from master
daveroga Dec 20, 2024
6336ad5
partial changes review
daveroga Dec 30, 2024
31aa30b
override _setRequest to avoid loops and fix solhint
daveroga Jan 7, 2025
a30dbfd
remove embedded zkp verifier
daveroga Jan 7, 2025
c6077eb
update Query to MultiRequest
daveroga Jan 8, 2025
d31f2ca
update submitResponse
daveroga Jan 8, 2025
7ad4411
fix solhint
daveroga Jan 8, 2025
7005a64
address centered model instead of userID and some fixes
daveroga Jan 8, 2025
85804dd
fix solhint and custom errors
daveroga Jan 9, 2025
1d49a4e
updates from review
daveroga Jan 9, 2025
4a9e988
check grouped requests 2 requests at least
daveroga Jan 9, 2025
81fdf83
fix error cyclomatic-complexity from solhint
daveroga Jan 9, 2025
034de2c
move _state in storage
daveroga Jan 10, 2025
10eb73d
check link responses with bool
daveroga Jan 10, 2025
ca1f04f
fix solhint
daveroga Jan 10, 2025
188bb13
remove history in proofs from requests
daveroga Jan 10, 2025
ffe4e6e
check nullifierSessionID on request creation
daveroga Jan 10, 2025
f607131
fix cyclomatic-complexity in solhint
daveroga Jan 10, 2025
848e609
check verifierID in requests for V3
daveroga Jan 13, 2025
4bac7da
add test for authv2 validator
daveroga Jan 14, 2025
1e9c474
Feature/pid 2720 implement linked multi query validator (#328)
AndriianChestnykh Jan 15, 2025
d510368
update tests with updated stub validator
daveroga Jan 15, 2025
296bb68
check requestId correctness
daveroga Jan 16, 2025
78610dd
add logic from skip tests in verifier test
daveroga Jan 16, 2025
1641d15
add auth validator stub set verify results method
daveroga Jan 16, 2025
9f33dec
idType for verifier and some updates to verifier test
daveroga Jan 16, 2025
faf0997
fix enumerable and check existence in proof response fields
daveroga Jan 16, 2025
d7c7281
fix requestId calculation
daveroga Jan 17, 2025
822c81c
remove specific multi-request test that now is included in verifier test
daveroga Jan 17, 2025
39d67f5
add test wrappers and tests for RequestDisableable, RequestOwnership …
daveroga Jan 17, 2025
e2109e6
increase coverage
daveroga Jan 17, 2025
886193c
updates from review
daveroga Jan 20, 2025
adfac38
reorganize universal verifier tests
daveroga Jan 20, 2025
70e5a5c
test all the events from universal verifier
daveroga Jan 20, 2025
001f603
add embedded verifier test
daveroga Jan 20, 2025
a80a773
some fixes and increase coverage
daveroga Jan 20, 2025
d952287
increase coverage
daveroga Jan 21, 2025
43e6e8f
Integration tests (#332)
AndriianChestnykh Jan 21, 2025
16de597
Fix lmk tests
AndriianChestnykh Jan 21, 2025
85ebc38
update multi-request integration test
daveroga Jan 23, 2025
c75baa6
check multi-request components exist
daveroga Jan 23, 2025
0e90b88
small general updates
daveroga Jan 23, 2025
45c5edc
fix solhint
daveroga Jan 23, 2025
b18c064
remove VerifierLib and move functionality to Verifier
daveroga Jan 23, 2025
109f3f8
fix solhint
daveroga Jan 24, 2025
1179c78
update missing unified addresses for validators
daveroga Jan 24, 2025
a64341a
add test to calculate create2 proxy addresses
daveroga Jan 24, 2025
bc22c56
update test script to check unified addresses for all the contracts
daveroga Jan 24, 2025
6ea8563
fix create2Calldata statelib
daveroga Jan 24, 2025
af3b57b
update unified address for some contracts
daveroga Jan 27, 2025
4458158
remove ICircuitValidator references
daveroga Jan 27, 2025
256d571
move getters for storage data back to the beginning
daveroga Jan 27, 2025
19da90c
resolve solhint warnings
daveroga Jan 28, 2025
f238b05
update from review comments
daveroga Jan 28, 2025
127c40c
update AuthV2Validator
daveroga Jan 28, 2025
374ea04
add function getResponseFields to verifier
daveroga Jan 28, 2025
f553fed
Remove unused tests and comments
AndriianChestnykh Jan 28, 2025
67bc7fe
updates from review
daveroga Jan 30, 2025
a817f35
update requestId calculation
daveroga Jan 30, 2025
569c6b6
fix solhint
daveroga Jan 30, 2025
5025be6
update RequestStatus for RequestProofStatus
daveroga Jan 31, 2025
de9d7a5
more updates from review
daveroga Jan 31, 2025
50960a8
more updates from review
daveroga Jan 31, 2025
6334aa3
change AuthType to AuthMethod
daveroga Jan 31, 2025
707a770
precalculate keccack256 of field names
daveroga Feb 1, 2025
7a5f833
Merge remote-tracking branch 'refs/remotes/origin/master' into PID-27…
AndriianChestnykh Feb 2, 2025
d46b262
solve solhint warning explicit type
daveroga Feb 3, 2025
ccd69f9
fix solhint warnings
daveroga Feb 3, 2025
0473eca
fix solhint warnings for custom errors
daveroga Feb 3, 2025
a52ebd1
fix circuitId for linkedMultiQuery10-beta.1
daveroga Feb 3, 2025
598272a
comment requestId calculation
daveroga Feb 3, 2025
a09e038
v3.0.0
daveroga Feb 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Broader discussion results
  • Loading branch information
AndriianChestnykh committed Nov 26, 2024
commit ba75a5d062f9ee405601380112ddd95bb38b7c55
30 changes: 23 additions & 7 deletions contracts/verifiers/UniversalVerifierMultiQuery.sol
Original file line number Diff line number Diff line change
@@ -56,22 +56,36 @@ contract UniversalVerifierMultiQuery is Ownable2StepUpgradeable {
string responseFieldName;
}

// submitMultiQueryResponse ???
// submitResponse
// getMultiQueryResult

// MultiQuery1 -> request 1
// -> request 2
// -> request 3

// MultiQuery2 -> request 4
// -> request 5
// -> request 2


/**
* @dev MultiQuery. Structure for request.
* @param multiQueryId Multi query id.
* @param requestIds Request ids for this multi query.
* @param linkedOutputParamsNames Output params to link from every request proof.
*/
struct MultiQuery {
struct Query {
uint256 multiQueryId;
uint256[] requestIds;
uint256[1, 2, 3, 4, 5] requestIds;
ResponseFieldFromRequest[][] linkedResponseFields; // is response fields linked between requests
}
// Example of linkedResponseFields:
// [
// [{linkID, 1}, {linkID, 2}, {linkID, 3}]
// [{userID, 1}, {userID, 2}, {userID, 3}],
// ]
// [
// [{linkID, 1}, {linkID, 2}]
// [{linkID, 2}, {linkID, 3}],
// [{issuerID, 2}, {issuer, 3}],
// ]

/// @custom:storage-location erc7201:iden3.storage.UniversalVerifierMultiQuery
struct UniversalVerifierMultiQueryStorage {
@@ -84,10 +98,12 @@ contract UniversalVerifierMultiQuery is Ownable2StepUpgradeable {
mapping(uint256 multiQueryId => MultiQuery) _multiQueries;
uint256[] _multiQueryIds;
// Information linked between users and their addresses
// TODO think about arrays for these two mappings
mapping(address userAddress => uint256 userID) _user_address_to_id;
mapping(uint256 userID => address userAddress) _id_to_user_address; // check address[] to allow multiple addresses for the same userID?

// Information about auth validators
// TODO remove this mapping and reuse _proofs;
mapping(uint256 authID => address authValidator) _auth_validators;
uint256[] _authIds;
}
Loading