-
Notifications
You must be signed in to change notification settings - Fork 34
Refactor Validators #354
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
Merged
AndriianChestnykh
merged 3 commits into
v3
from
chore/reorg-validator-contracts-inheritance
Mar 24, 2025
Merged
Refactor Validators #354
AndriianChestnykh
merged 3 commits into
v3
from
chore/reorg-validator-contracts-inheritance
Mar 24, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull Request Test Coverage Report for Build 14023888269Details
💛 - Coveralls |
daveroga
approved these changes
Mar 24, 2025
AndriianChestnykh
added a commit
that referenced
this pull request
Apr 29, 2025
* new universal verifier multi-query * Discussion results * Discussion results 2 * update universal verifier multi query * remove ZKP * add auth validators * Broader discussion results * Add agreed universal verifier solution * update universal verifier multi query with agreed design * query status and submit response * get request type from 30 byte of the requestId * add EthIdentityValidator * updates from review * Discussion result * updates from discussion * check response field values from linked response fields * fix some errors in compilation * test universal verifier multi-query * different validators for sig and authv2 * check specific storage values * overrides solidity compiler optimizations for specific contract * remove some methods * fix solhint * update from discussion * set group of requests and check linkID * fix solhint * updates from review * fix cyclomatic-complexity * some fixes from review * updates from tech spec * add auth validator stub and fix test * add changes for user authentication structs * fix solhint * reestructure link between userID and address and mapping for authentication timestamp * auth proofs different structure * add custom errors to UniversalVerifierMultiQuery * add __gap in proofs storage for future updates and array of proofs for history * param names in returned structs from solidity * Initial verifier authentication (#323) Co-authored-by: daveroga <daveroga@gmail.com> * updates for iteration 2 * fix test multi-query * update verifiers tests * fix validators tests and solhint * partial changes review * override _setRequest to avoid loops and fix solhint * remove embedded zkp verifier * update Query to MultiRequest * update submitResponse * fix solhint * address centered model instead of userID and some fixes * fix solhint and custom errors * updates from review * check grouped requests 2 requests at least * fix error cyclomatic-complexity from solhint * move _state in storage * check link responses with bool * fix solhint * remove history in proofs from requests * check nullifierSessionID on request creation * fix cyclomatic-complexity in solhint * check verifierID in requests for V3 * add test for authv2 validator * Feature/pid 2720 implement linked multi query validator (#328) * WIP * WIP 2: LinkedMultiQueryValidator * Fix compilation * Fix compilation after merge * First working test * Fix after merge * New Verifier tests * fix ownable upgradeable like the other validator contracts * fix solhint compiler version >=0.7.0 <0.9.0 does not satisfy the >=0.8.4 semver requirement --------- Co-authored-by: daveroga <daveroga@gmail.com> * update tests with updated stub validator * check requestId correctness * add logic from skip tests in verifier test * add auth validator stub set verify results method * idType for verifier and some updates to verifier test * fix enumerable and check existence in proof response fields * fix requestId calculation * remove specific multi-request test that now is included in verifier test * add test wrappers and tests for RequestDisableable, RequestOwnership and validatorWhitelist * increase coverage * updates from review * reorganize universal verifier tests * test all the events from universal verifier * add embedded verifier test * some fixes and increase coverage * increase coverage * Integration tests (#332) * LinkedMultiQuery small fixes * Add more linked multi query tests * Improve Linked Multi Query tests * Scaffold verifier integration-test * WIP * Fix getValidatorVerification helpers method * Fix lmk10 groth16 wrapper in constants * Remove console from Verifier.sol * Fix lmk tests * update multi-request integration test * check multi-request components exist * small general updates * fix solhint * remove VerifierLib and move functionality to Verifier * fix solhint * update missing unified addresses for validators * add test to calculate create2 proxy addresses * update test script to check unified addresses for all the contracts * fix create2Calldata statelib * update unified address for some contracts * remove ICircuitValidator references * move getters for storage data back to the beginning * resolve solhint warnings * update from review comments * update AuthV2Validator * add function getResponseFields to verifier * Remove unused tests and comments * updates from review * update requestId calculation * fix solhint * update RequestStatus for RequestProofStatus * more updates from review * more updates from review * change AuthType to AuthMethod * precalculate keccack256 of field names * solve solhint warning explicit type * fix solhint warnings * fix solhint warnings for custom errors * fix circuitId for linkedMultiQuery10-beta.1 * comment requestId calculation * v3.0.0 * remove unused verifier contracts and some renaming in fields * Remove obsolete TODO comment * fix smtlib unified address and solhint warning * Hotfix deployValidators.ts script * Fix: Check V3 query in request group (#348) * fix: patch hardhat ledger in general way + fix vulnerabilities (#344) * patch hardhat ledger in general way + fix vulnerabilities * control error in eth_accounts * fix @openzeppelin/hardhat-upgrades to version 3.0.5 * update readme for patch fix * fix upgrade safe error in universal verifier (#345) * audit fix: payERC20Permit is vulnerable to DOS via frontrunning (#347) * audit fix: payERC20Permit is vulnerable to DOS via frontrunning * bump version * Fix: check claim existence when adding a new claim (#346) * check claim existence when adding a new claim * fix solhint * update package version * update according to conventions and param for custom error * check userID in response fields * fix identityLib * fix bool * check inputIndexOf for userID at least in 1 request * fix cyclomatic-complexity in solhint * private function following conventions * check requests with and without group for userID input * fix constants for userID --------- Co-authored-by: volodymyr-basiuk <31999965+volodymyr-basiuk@users.noreply.github.com> * Fix linkID != 0 in grouped request proofs (#349) * Fix linkID != 0 in grouped request proofs * Fix linter errors * Fix auth method enable check * Reduce optimizer runs to shrink code size * Check if auth method can be disabled by only owner * Audit: Simplify getRequestParams + setRequests front-running protection (#350) * simplify getRequestParams * protect request creation from front-running * add test InvalidRequestOwner * fix comments * check request owner in verifier and override it in universal verifier * remove unnecessary deployment cross-chain verifier script for testing * small updates * fix solhint * Adjust verification interfaces for future upgrades (#353) * add rawValue to ResponseField and update verify params * reorganize _checkRequestOwner internal method * reduce memory variables in validators verify method * Enforce groupID to be hash generated from its requestIds (#355) * add rawValue to ResponseField and update verify params * reorganize _checkRequestOwner internal method * reduce memory variables in validators verify method * calculate groupID as hash of requestIds * helper functions and groupInfo struct * Small renaming * Fix comment --------- Co-authored-by: Andriian Chestnykh <andriian.chestnykh@gmail.com> * Refactor Validators (#354) * Refactor Validators * Additional checks in _setGroth16Verifier() * Remove requestParamIndexOf() method * Disable initializers in all upgradeable contracts * Fix exports * Constants renaming * Renaming * Rename verifer test * Simplify _checkLinkID code * Simplify _checkRequestOwner code * Update check for groupID and linkID * Fix check-unified-addresses.test.ts * Hash based multiRequestId * Fix tests * Update Ignition modules for constant Proxy bytecode * Bump validator versions and target deploy addresses (#360) * Bump validator versions and target deploy addresses * Fix contract version * Fix naming * Clean up deployUniversalVerifier.ts * Add Eth Identity Validator deployment via ignition script * Deployment to Billions Testnet (#361) * deployment libraries to billions testnet * add chainIdInfoMap for Billions * Remove artifacts * State Contract Deployment to billions-test artifacts * State Contract Deployment to billions-test artifacts * State Contract Deployment to billions-test artifacts * update verification params for billions network * update billions main chainid --------- Co-authored-by: Andriian Chestnykh <andriian.chestnykh@gmail.com> Co-authored-by: Oleksandr Brezhniev <oleksandr.brezhniev@gmail.com> * Modify EthIdentityValidatorModule * EthIdentityValidator test * EthIdentityValidator to use GenesisUtils.getIdType * Remove state link from EthIdentityValidator * Get idType via GenesisUtils.getIdType(..) in V3 validator * Rename lmk to lmq * Fix linter * Fix deploy scripts for validators * Remove obsolete files after merge * Put audit report into Readme --------- Co-authored-by: Andriian Chestnykh <andriian.chestnykh@gmail.com> Co-authored-by: Andriian Chestnykh <AndriianChestnykh@users.noreply.github.com> Co-authored-by: volodymyr-basiuk <31999965+volodymyr-basiuk@users.noreply.github.com> Co-authored-by: Oleksandr Brezhniev <oleksandr.brezhniev@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.