-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added optimized verifier contract * updated optimized verifier test * updated verifier contract to use depth 30 and batch size 100 * updated ITreeVerifier interface * fixed compliation errors resulting from verifier interface change * update test params and add docs tests still break * update verifiers test fail * fix incorrect import of insertion verifier for tests * fix registration/deletion tests * delete all update logic and unused functions in V1 * remove invalid commitment test we no longer need it because we make sure the commitments are valid off-chain within the circuit * remove unreduced element test we no longer need it because we make sure elements are reduced off-chain within the circuit * fix tests optimized verifier test still broken * new optimized verifier test still broken * fix interface errors proof invalid error * fix optimized semaphore verifier test * add natspec explainer * remove unused old enums, events and errors * Revert "remove unused old enums, events and errors" This reverts commit 4ea1185. * add dev comments --------- Co-authored-by: 0xKitsune <[email protected]>
- Loading branch information
Showing
30 changed files
with
2,730 additions
and
1,588 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.21; | ||
|
||
/// @title Tree Verifier Interface | ||
/// @author Worldcoin | ||
/// @notice An interface representing a merkle tree verifier. | ||
interface ISemaphoreVerifier { | ||
/// @notice Verify an uncompressed Groth16 proof. | ||
/// @notice Reverts with InvalidProof if the proof is invalid or | ||
/// with PublicInputNotInField the public input is not reduced. | ||
/// @notice There is no return value. If the function does not revert, the | ||
/// proof was succesfully verified. | ||
/// @param proof the points (A, B, C) in EIP-197 format matching the output | ||
/// of compressProof. | ||
/// @param input the public input field elements in the scalar field Fr. | ||
/// Elements must be reduced. | ||
function verifyProof(uint256[8] calldata proof, uint256[4] calldata input) external view; | ||
} |
This file contains 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
Oops, something went wrong.