Compare commits

...

2 Commits

Author SHA1 Message Date
cedoor
78dcb705c5 chore: v3.14.0
Former-commit-id: 091eb436ae
2023-10-11 19:16:55 -07:00
cedoor
3c75453e69 perf(proof): use cached curve rather than a new one
Former-commit-id: 60dc748fe7
2023-10-11 19:16:23 -07:00
18 changed files with 46 additions and 42 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/cli-template-contracts-hardhat",
"version": "3.13.0",
"version": "3.14.0",
"description": "Semaphore Hardhat template.",
"license": "Unlicense",
"files": [
@@ -36,10 +36,10 @@
"@nomicfoundation/hardhat-toolbox": "^2.0.0",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-etherscan": "^3.0.0",
"@semaphore-protocol/group": "3.13.0",
"@semaphore-protocol/hardhat": "3.13.0",
"@semaphore-protocol/identity": "3.13.0",
"@semaphore-protocol/proof": "3.13.0",
"@semaphore-protocol/group": "3.14.0",
"@semaphore-protocol/hardhat": "3.14.0",
"@semaphore-protocol/identity": "3.14.0",
"@semaphore-protocol/proof": "3.14.0",
"@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2",
"@types/chai": "^4.2.0",
@@ -58,7 +58,7 @@
"typescript": ">=4.5.0"
},
"dependencies": {
"@semaphore-protocol/contracts": "3.13.0"
"@semaphore-protocol/contracts": "3.14.0"
},
"config": {
"solidity": {

View File

@@ -18,10 +18,10 @@
"@nomicfoundation/hardhat-chai-matchers": "^1.0.5",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@semaphore-protocol/group": "3.13.0",
"@semaphore-protocol/hardhat": "3.13.0",
"@semaphore-protocol/identity": "3.13.0",
"@semaphore-protocol/proof": "3.13.0",
"@semaphore-protocol/group": "3.14.0",
"@semaphore-protocol/hardhat": "3.14.0",
"@semaphore-protocol/identity": "3.14.0",
"@semaphore-protocol/proof": "3.14.0",
"@typechain/ethers-v5": "^10.0.0",
"@typechain/hardhat": "^6.0.0",
"@types/chai": "^4.3.1",
@@ -40,7 +40,7 @@
"typechain": "^8.0.0"
},
"dependencies": {
"@semaphore-protocol/contracts": "3.13.0"
"@semaphore-protocol/contracts": "3.14.0"
},
"config": {
"solidity": {

View File

@@ -10,10 +10,10 @@
},
"dependencies": {
"@next/font": "13.0.3",
"@semaphore-protocol/data": "3.13.0",
"@semaphore-protocol/group": "3.13.0",
"@semaphore-protocol/identity": "3.13.0",
"@semaphore-protocol/proof": "3.13.0",
"@semaphore-protocol/data": "3.14.0",
"@semaphore-protocol/group": "3.14.0",
"@semaphore-protocol/identity": "3.14.0",
"@semaphore-protocol/proof": "3.14.0",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.8",
"dotenv": "^16.0.3",

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/cli-template-monorepo-ethers",
"version": "3.13.0",
"version": "3.14.0",
"description": "Semaphore Hardhat + Next.js + SemaphoreEthers template.",
"license": "Unlicense",
"files": [

View File

@@ -18,10 +18,10 @@
"@nomicfoundation/hardhat-chai-matchers": "^1.0.5",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@semaphore-protocol/group": "3.13.0",
"@semaphore-protocol/hardhat": "3.13.0",
"@semaphore-protocol/identity": "3.13.0",
"@semaphore-protocol/proof": "3.13.0",
"@semaphore-protocol/group": "3.14.0",
"@semaphore-protocol/hardhat": "3.14.0",
"@semaphore-protocol/identity": "3.14.0",
"@semaphore-protocol/proof": "3.14.0",
"@typechain/ethers-v5": "^10.0.0",
"@typechain/hardhat": "^6.0.0",
"@types/chai": "^4.3.1",
@@ -40,7 +40,7 @@
"typechain": "^8.0.0"
},
"dependencies": {
"@semaphore-protocol/contracts": "3.13.0"
"@semaphore-protocol/contracts": "3.14.0"
},
"config": {
"solidity": {

View File

@@ -10,10 +10,10 @@
},
"dependencies": {
"@next/font": "13.0.3",
"@semaphore-protocol/data": "3.13.0",
"@semaphore-protocol/group": "3.13.0",
"@semaphore-protocol/identity": "3.13.0",
"@semaphore-protocol/proof": "3.13.0",
"@semaphore-protocol/data": "3.14.0",
"@semaphore-protocol/group": "3.14.0",
"@semaphore-protocol/identity": "3.14.0",
"@semaphore-protocol/proof": "3.14.0",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.8",
"dotenv": "^16.0.3",

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/cli-template-monorepo-subgraph",
"version": "3.13.0",
"version": "3.14.0",
"description": "Semaphore Hardhat + Next.js + SemaphoreSubgraph template.",
"license": "Unlicense",
"files": [

View File

@@ -1,7 +1,7 @@
{
"name": "@semaphore-protocol/cli",
"type": "module",
"version": "3.13.0",
"version": "3.14.0",
"description": "A command line tool to set up your Semaphore project and get group data.",
"license": "MIT",
"bin": {
@@ -42,7 +42,7 @@
"ts-node": "^10.9.1"
},
"dependencies": {
"@semaphore-protocol/data": "3.13.0",
"@semaphore-protocol/data": "3.14.0",
"axios": "^1.3.2",
"boxen": "^7.0.1",
"chalk": "^5.1.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/contracts",
"version": "3.13.0",
"version": "3.14.0",
"description": "Semaphore contracts to manage groups and broadcast anonymous signals.",
"license": "MIT",
"files": [

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/data",
"version": "3.13.0",
"version": "3.14.0",
"description": "A library to query Semaphore contracts.",
"license": "MIT",
"main": "dist/index.node.js",

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/group",
"version": "3.13.0",
"version": "3.14.0",
"description": "A library to create and manage Semaphore groups.",
"license": "MIT",
"main": "dist/index.node.js",

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/hardhat",
"version": "3.13.0",
"version": "3.14.0",
"description": "A Semaphore Hardhat plugin to deploy verifiers and Semaphore contract.",
"license": "MIT",
"main": "dist/index.node.js",
@@ -38,7 +38,7 @@
},
"dependencies": {
"@nomiclabs/hardhat-ethers": "^2.1.1",
"@semaphore-protocol/contracts": "3.13.0",
"@semaphore-protocol/contracts": "3.14.0",
"circomlibjs": "^0.1.7",
"ethers": "^5.7.1",
"hardhat-dependency-compiler": "^1.1.3"

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/heyauthn",
"version": "3.13.0",
"version": "3.14.0",
"description": "A library to allow developers to create and manage Semaphore identities using WebAuthn",
"license": "MIT",
"main": "dist/index.node.js",
@@ -33,7 +33,7 @@
"rollup-plugin-typescript2": "^0.31.2"
},
"dependencies": {
"@semaphore-protocol/identity": "3.13.0",
"@semaphore-protocol/identity": "3.14.0",
"@simplewebauthn/browser": "7.2.0",
"@simplewebauthn/server": "7.2.0"
}

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/identity",
"version": "3.13.0",
"version": "3.14.0",
"description": "A library to create Semaphore identities.",
"license": "MIT",
"main": "dist/index.node.js",

View File

@@ -1,6 +1,6 @@
{
"name": "@semaphore-protocol/proof",
"version": "3.13.0",
"version": "3.14.0",
"description": "A library to generate and verify Semaphore proofs.",
"license": "MIT",
"main": "dist/index.node.js",
@@ -48,8 +48,8 @@
"rollup-plugin-typescript2": "^0.31.2"
},
"peerDependencies": {
"@semaphore-protocol/group": "3.13.0",
"@semaphore-protocol/identity": "3.13.0"
"@semaphore-protocol/group": "3.14.0",
"@semaphore-protocol/identity": "3.14.0"
},
"dependencies": {
"@ethersproject/bignumber": "^5.5.0",

View File

@@ -27,7 +27,8 @@ export default async function groth16Verify(_vk_verifier: any, _publicSignals: a
const proof = unstringifyBigInts(_proof)
const publicSignals = unstringifyBigInts(_publicSignals)
const curve = await buildBn128(undefined, undefined)
// @ts-ignore
const curve = globalThis.curve_bn128 ?? (await buildBn128(undefined, undefined))
const IC0 = curve.G1.fromObject(vk_verifier.IC[0])
const IC = new Uint8Array(curve.G1.F.n8 * 2 * publicSignals.length)

View File

@@ -31,7 +31,10 @@ async function readHeaderGroth16(fd: any, sections: any, toObject: any) {
const n8r = await fd.readULE32()
zkey.n8r = n8r
zkey.r = await binFileUtils.readBigInt(fd, n8r)
zkey.curve = await buildBn128(undefined, undefined)
// @ts-ignore
zkey.curve = globalThis.curve_bn128 ?? (await buildBn128(undefined, undefined))
zkey.nVars = await fd.readULE32()
zkey.nPublic = await fd.readULE32()
zkey.domainSize = await fd.readULE32()

View File

@@ -1 +1 @@
dc2f95a0a229d9a66a7b3900e3f2c2eeb3c4cd81
71f38ed83e78afe29c45554a5a3361c4f0792257