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

chore(verifier.ts): remove completed todos #12

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 1 addition & 7 deletions src/verifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ import { Group } from '@semaphore-protocol/group';
const v = new RLNVerifier(vkey);

async function verifyProof(msg: MessageI, roomGroups: RoomGroupI[]): Promise<boolean> {
// FIXME NEED TO VALIDATE THE FOLLOWING (IN THIS ORDER):
// TODO EPOCH FALLS WITHIN RANGE FOR ROOM
// TODO INTERNAL NULLIFIER
// TODO MESSAGE HASH IS CORRECT
// TODO VERIFY MERKLE ROOT
// TODO VERIFY PROOF LAST
const { room } = findRoomById(roomGroups, msg.room);
if (!room) {
console.warn('Room not found');
Expand All @@ -34,7 +28,7 @@ async function verifyProof(msg: MessageI, roomGroups: RoomGroupI[]): Promise<boo
}

// Check that the internal nullifier doesn't have collisions
// TODO RLNjs cache
// TODO! INTERNAL NULLIFIER (RLNjs cache)

// Check that the message hash is correct
if (msgHash !== msg.proof.snarkProof.publicSignals.x) {
Expand Down
5 changes: 1 addition & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,5 @@
"module": "ES2022",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true
},
"files": [
"./src/server.ts"
]
}
}