Commit Graph

139 Commits

Author SHA1 Message Date
Kobi Gurkan
fbd2f0cefa fix: fake_zero must be constrained to zero 2019-09-27 11:54:52 +03:00
Kobi Gurkan
2933bce0e4 fix: uses latest circomlib to fix mimcsponge bug 2019-09-17 09:15:53 +03:00
Kobi Gurkan
3aed03c65d fix: makes fake_zero a private input 2019-09-16 22:54:17 +03:00
Kobi Gurkan
cc3f08d1a0 fix: moves fake_zero*root to correct place 2019-09-16 10:43:13 +03:00
Kobi Gurkan
a76c72a777 fix: uses fake_zero differently in sig_verifier 2019-09-16 09:17:20 +03:00
Kobi Gurkan
370992cc2e adds fake_zero to prevent unconstrained variables 2019-09-16 09:05:11 +03:00
Kobi Gurkan
2cedb25dfa uses <-- in one place in blake2s 2019-09-15 22:41:12 +03:00
Kobi Gurkan
6ffdd09d78 makes blake2s use <== 2019-09-15 22:22:47 +03:00
Kobi Gurkan
9327523436 fix: updates snark cache 2019-09-15 20:31:21 +03:00
Kobi Gurkan
352a28c8a0 feat: updates circom version 2019-09-15 20:19:31 +03:00
Kobi Gurkan
9c9ef5dbe2 fix: removes broadcaster_address from readme 2019-08-25 22:48:59 +03:00
Kobi Gurkan
be5ae078a3 feat: adds id trapdoor and upgrades deps versions (#27)
* feat: adds id trapdoor

* fix: makes tests work with latest deps

* fix: adds identity trapdoor to tests

* fix: fixes trapdoor typo

* fix: adds trapdoor to contract tests

* feat: updates semaphore-merkle-tree version

* fix: updates README

* fix: updates README

* fix: updates README

* feat: updates snarkjs and circomlib versions

* fix: removes sbmtjs from README

* fix: invalidates cache

* feat: updates semaphore-merkle-tree version
2019-08-25 20:40:02 +03:00
Kobi Gurkan
eb861d479f removes unneeded blake2sdef 2019-08-15 12:10:45 +03:00
Koh Wei Jie
105c13d32f removed obsolete identity_r reference in the readme (#26) 2019-08-14 18:58:05 +03:00
Koh Wei Jie
be94dc47d3 Preparation for an audit (#25)
* fixed private keys in run_ganache.sh

* replaced preBroadcastRequire with a modifier isValidSignalAndProof

* Changed Semaphore.roots() to root() and added documentation comments

* fixed websnark dependency
2019-08-09 01:18:17 +03:00
Kobi Gurkan
fc7c15fb5c fix+feat: fixes some aliasing bugs, adds an optional permissioning to broadcast (#23)
* fixes aliasing bugs, adds optional permissioning to broadcast

* fixes nullifiers hash, makes permissioning work with tests

* fix: clears cache

* fix: adds another account for ci testing

* fix: addresses comments
2019-08-01 08:02:19 +03:00
Koh Wei Jie
fccedd776f Remove broadcaster check in Semaphore.sol and the circuit (#22)
* added require revert strings to contracts; modified semaphore contract test to check for said strings

upgraded snarkjs commit hash

added revert reason test for verifier-gte-snark-scalar-field

updated package-lock.json and circleci snark file cache

* removed broadcaster address check from semaphore contract; added solidity syntax highlighting for github

* Removed broadcaster address public input in the circuit and in the
contract
Updated tests
Updated snark cache for circleci
2019-07-31 14:39:05 +03:00
Koh Wei Jie
ca9dbb7f98 added require revert strings to contracts; modified semaphore contract test to check for said strings (#21)
upgraded snarkjs commit hash

added revert reason test for verifier-gte-snark-scalar-field

updated package-lock.json and circleci snark file cache
2019-07-31 12:22:11 +03:00
Koh Wei Jie
0eae928661 Separate pre-broadcast verification function in Semaphore (#20)
* use the semaphore-merkle-tree npm module instead of zkp-sbmtjs

* feat: optimizes by removing the signals tree

* updates verifier contract to fix nullifier bug, saves leaves and upgrades to solidity 0.5.10

* reverted to original Semaphore.sol as pre-broadcast checks should go into a different PR

* feat: adds unlimited root history size, upgrades MerkleTreeTester to 0.5.0

* fix: clears cache

* Upgraded to OZ 2.0 Ownable.sol; separated pre-broadcast checks in Semaphore

* semaphore test now calls the pre-broadcast checks

* added circomlib

* restored package-lock.json
2019-07-27 19:51:00 +03:00
Koh Wei Jie
6356a98922 Replace zkp-sbmtjs with semaphore-merkle-tree (#18)
* use the semaphore-merkle-tree npm module instead of zkp-sbmtjs

* reverted to original Semaphore.sol as pre-broadcast checks should go into a different PR

* added circomlib
2019-07-27 13:50:49 +03:00
Kobi Gurkan
167118773e feat: optimizations and bug fixes (#19)
* feat: optimizes by removing the signals tree

* updates verifier contract to fix nullifier bug, saves leaves and upgrades to solidity 0.5.10

* feat: adds unlimited root history size, upgrades MerkleTreeTester to 0.5.0

* fix: clears cache
2019-07-27 05:54:02 +03:00
Kobi Gurkan
602dd57abb fixes rollback and tree tests 2019-07-26 09:08:37 +03:00
Kobi Gurkan
54d628dba2 fix: fixes deps pinning and proofs (#15)
* fix: fixes deps pinning and proofs

* fix: updates sbmtjs version

* fix: fixes circomlib to point to the latest version

* feat: updates versions

* fix: attempts an alternative checksum for snarks

* fix: writes checksum to file
2019-07-08 12:32:32 +03:00
Kobi Gurkan
df7953d088 Pedersen commitments + MiMC sponge (#14)
* feat: makes identity commitment use pedersen hashes

* feat: adds pedersen hashes and deploys to rinkeby

* feat: updates versions
2019-07-07 18:51:54 +03:00
Koh Wei Jie
7423baa2af Cache generated snark files and node_modules separately (#11)
* made the Semaphore contract use OpenZepplin's Ownable

* added test for the owner of the semaphore contract

* added npm link command to readme

* fix: fixes up contract tests and adds to ci

* fix: adds contract tests to ci

* fix: correct executes contracts test

* fix: put correct path in ci contract tests

* increased gas limit for local network

* Fixed typo

* fixed path in ci.sh to get truffle test to pick up OZ contracts

* attempt to get truffle in ci to work

* copied Ownable.sol to contracts dir to remove OZ dep

* removed truffle init instruction in ci.sh

* reverted changes to ci

* updated package-lock.json

* added blake2sdef.json to semaphorejs/.gitignore

* attempt to clear circleci cache and also cache the circuit and keys generated by the trusted setup

* another attempt to get CI to cache properly

* attempt with cleared cache

* another circleci attempt - create build/ so it can be checksummed

* checksum the circuit instead of build/

* just do a fresh build for now

* fixed check in do_setup.sh

* specify local network in truffle migrate

* Made CircleCI cache node_modules and the generated snark files separately

* fixed ci
2019-06-30 14:10:08 +03:00
Koh Wei Jie
1f9e551c82 Use OpenZepplin's Ownable contract (#4)
* made the Semaphore contract use OpenZepplin's Ownable

* added test for the owner of the semaphore contract

* added npm link command to readme

* fix: fixes up contract tests and adds to ci

* fix: adds contract tests to ci

* fix: correct executes contracts test

* fix: put correct path in ci contract tests

* increased gas limit for local network

* Fixed typo

* fixed path in ci.sh to get truffle test to pick up OZ contracts

* attempt to get truffle in ci to work

* copied Ownable.sol to contracts dir to remove OZ dep

* removed truffle init instruction in ci.sh

* reverted changes to ci

* updated package-lock.json

* added blake2sdef.json to semaphorejs/.gitignore

* attempt to clear circleci cache and also cache the circuit and keys generated by the trusted setup

* another attempt to get CI to cache properly

* attempt with cleared cache

* another circleci attempt - create build/ so it can be checksummed

* checksum the circuit instead of build/

* just do a fresh build for now

* fixed check in do_setup.sh

* specify local network in truffle migrate
2019-06-29 11:37:27 +03:00
Kobi Gurkan
e9102a6b6b fix: rebuilds package-lock 2019-06-27 15:40:54 +03:00
Kobi Gurkan
73309fbfe8 fix: updates cache version 2019-06-27 15:35:50 +03:00
Kobi Gurkan
06192928be feat: updates version 2019-06-27 15:33:14 +03:00
Kobi Gurkan
11f78f323d fix: updates reference to kobigurk/circomlib 2019-06-27 15:32:37 +03:00
Kobi Gurkan
63ff1f5fa1 Circuit updates (#8)
* feat: moves code to use mimcsponge, uses blake2s for commitment

* fix: makes ci timeout larger

* fix: updates sbmtjs's reference to circomlib to mimcsponge

* fix: replaces rinkeby sponge address

* fix: moves to a wasm compatible blake2 library

* fix: attempts removing blake2.wasm from webpack

* fix: moves to native js blake2

* fix: fixes webpack config to remove blake2

* fix: makes generate_identity sync

* fix: changes mimc7 to mimcsponge in client_web

* fix: updates websnark for smaller memory

* fix: updates websnark for smaller memory

* fix: adds enlarged heap for compilation

* fix: adds enlarged heap for compilation

* fix: makes tests pass

* fix: makes MerkleTree use mimc sponge

* feat: adds position to the nullifiers hash

* feat: makes identity_nullifier 256 bits again, and makes external_nullifier 224 bits to make room for position

* fix: makes sure that we index identity_path_index correctly in hash

* feat: moves back to iden3's websnark version

* feat: uses (8*pk).x for identity commitment

* fix: changes identity_commitment to match circuit

* fix: fixes contract end-to-end test to use new primitives

* fix: ci uses local version of zkp-sbmtjs

* feat: updates package versions

* fix: removes npm link from ci

* fix: changes tests to use MimcSpongeHasher

* feat: attempts storing artifacts

* feat: updates rinkeby contract address

* feat: updates package-lock
2019-06-26 18:36:34 +03:00
Kobi Gurkan
96923d2ede Fixes contract tests (#7)
* fix: fixes up contract tests and adds to ci

* fix: adds contract tests to ci

* fix: correct executes contracts test

* fix: put correct path in ci contract tests

* fix: attempts printing vk_proof in test

* fix: attempts printing vk_proof in test

* fix: attempts printing after proof in test

* fix: adds more debug logs for crash

* fix: adds more debug logs for crash

* fix: attemps using node 11.14.0

* fix: removes debug logs

* feat: moves back to iden3's websnark version
2019-06-25 13:11:31 +03:00
Kobi Gurkan
bddc131362 feat: updates version 2019-05-31 15:47:48 +03:00
Kobi Gurkan
e363162158 fix: fixes typo in logging 2019-05-31 15:47:34 +03:00
Kobi Gurkan
d4cd65f64a feat: updates version 2019-05-31 15:45:03 +03:00
Kobi Gurkan
cb8a300664 feat: adds more logging 2019-05-31 15:44:45 +03:00
Kobi Gurkan
d37ff65c47 feat: updates version 2019-05-31 15:34:36 +03:00
Kobi Gurkan
b9ab82ad82 feat: makes logging more suitable for users 2019-05-31 15:34:18 +03:00
Kobi Gurkan
ac278b44e0 feat: updates version 2019-05-15 17:22:42 +03:00
Kobi Gurkan
454b8eb5c3 feat: updates require paths for client to support external commands 2019-05-15 15:56:28 +03:00
Kobi Gurkan
592c48100c feat: adds locks to tree to prevent race conditions 2019-05-15 14:13:03 +03:00
Kobi Gurkan
0f3bb40bc6 feat: adds locks to tree to prevent race conditions 2019-05-15 14:12:01 +03:00
Kobi Gurkan
59c81cba10 feat: updates semaphorejs version 2019-05-14 14:24:00 +03:00
Kobi Gurkan
2022f0f3ff fix: updates required version of sbmtjs 2019-05-14 14:13:30 +03:00
Kobi Gurkan
af3a644734 feat: updates version to 0.2.0 2019-05-14 14:12:24 +03:00
Kobi Gurkan
7f137350ed fix: updates rinkeby address 2019-05-14 14:00:18 +03:00
Kobi Gurkan
f1bcbae022 fix: makes ci timeout larger 2019-05-14 13:33:53 +03:00
Kobi Gurkan
281d7c1e82 feat: moves back circom and circomlib to iden3 repos, and makes it firefox compatible 2019-05-14 13:17:13 +03:00
Kobi Gurkan
4f2c3a8a73 feat: adds blake2s to semaphore 2019-05-13 23:37:57 +03:00
Kobi Gurkan
f2d39a0abc feat: adds blake2s circuit 2019-05-13 19:23:46 +03:00