Skip to content

Commit

Permalink
fix(contracts): reverse proof b points
Browse files Browse the repository at this point in the history
  • Loading branch information
cedoor committed Jan 12, 2024
1 parent 7708477 commit 4d4a31c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/contracts/contracts/Semaphore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ contract Semaphore is ISemaphore, SemaphoreGroups {
if (
!verifier.verifyProof(
[proof[0], proof[1]],
[[proof[3], proof[2]], [proof[5], proof[4]]],
[[proof[2], proof[3]], [proof[4], proof[5]]],
[proof[6], proof[7]],
[merkleTreeRoot, nullifier, message, scope]
)
Expand Down
4 changes: 1 addition & 3 deletions packages/contracts/test/Semaphore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable jest/valid-expect */
import { Group } from "@semaphore-protocol/group"
import { Identity } from "@semaphore-protocol/identity"
import { SemaphoreProof, generateProof, verifyProof } from "@semaphore-protocol/proof"
import { SemaphoreProof, generateProof } from "@semaphore-protocol/proof"
import { expect } from "chai"
import { Signer, constants } from "ethers"
import { run } from "hardhat"
Expand Down Expand Up @@ -250,8 +250,6 @@ describe("Semaphore", () => {
})

it("Should verify a proof for an onchain group correctly", async () => {
console.log(await verifyProof(fullProof), fullProof)

const transaction = semaphoreContract.verifyProof(
groupId,
fullProof.treeRoot,
Expand Down

0 comments on commit 4d4a31c

Please sign in to comment.