302 Commits

Author SHA1 Message Date
0xmad
0aea419a89 chore: update with upstream 2023-10-19 14:28:39 -05:00
isk
303a92f6b4 fix: convert to @cryptkeeperzk/ejs 2023-10-19 13:58:08 -05:00
isk
41f5895ef0 fix: replacing ffjavascript with forked @cryptkeeperzk/ffjavascript package 2023-10-19 13:57:31 -05:00
dependabot[bot]
f6e3bf7bb2 chore: Bump eslint from 8.50.0 to 8.51.0 (#433)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 20:41:14 -07:00
dependabot[bot]
bef560e894 chore: Bump eslint from 8.49.0 to 8.50.0 (#429)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-27 12:15:17 -07:00
Jordi Baylina
918b4ad3e2 0.7.1 2023-09-19 17:12:29 +02:00
dependabot[bot]
33c753b1c5 chore: Bump eslint from 8.48.0 to 8.49.0 (#426)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 21:59:52 -07:00
dependabot[bot]
694ffab541 chore: Bump eslint from 8.47.0 to 8.48.0 (#420)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-03 16:57:01 -07:00
dependabot[bot]
cc4bcd2664 chore: Bump circom_runtime from 0.1.23 to 0.1.24 (#414)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-19 14:54:17 -07:00
dependabot[bot]
c5a603cab7 chore: Bump r1csfile from 0.0.46 to 0.0.47 (#413)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-19 14:52:57 -07:00
dependabot[bot]
a1888165af chore: Bump ffjavascript from 0.2.59 to 0.2.60 (#407)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-19 14:26:16 -07:00
dependabot[bot]
51a1464794 chore: Bump eslint from 8.46.0 to 8.47.0 (#408)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-14 21:20:24 -07:00
dependabot[bot]
4c6679185c chore: Bump eslint from 8.44.0 to 8.46.0 (#403)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-06 12:48:28 -07:00
dependabot[bot]
0461c449f8 chore: Bump eslint from 8.43.0 to 8.44.0 (#394)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-04 14:56:02 -07:00
dependabot[bot]
978d1fcab2 chore: Bump eslint from 8.42.0 to 8.43.0 (#386)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-25 14:54:12 -07:00
dependabot[bot]
fb144555d8 chore: Bump circom_runtime from 0.1.22 to 0.1.23 (#374)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-10 13:04:37 -07:00
dependabot[bot]
ebf8ba5b1e chore: Bump r1csfile from 0.0.45 to 0.0.46 (#375)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-10 13:04:22 -07:00
dependabot[bot]
9ec8d8ae6c chore: Bump eslint from 8.41.0 to 8.42.0 (#379)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-10 13:00:51 -07:00
Jordi Baylina
793ead1dae 0.7.0 2023-05-24 12:23:51 +02:00
dependabot[bot]
b793222e0b chore: Bump eslint from 8.40.0 to 8.41.0 (#373)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 19:41:44 -07:00
Xavier Pinsach
274e1eef6a Plonk refactor (#371)
* Plonk refactored with new clsses and working

* change logger.in -> logger.debug

* update protocol to last version

* Refactor Fiat-Shamir adding preprocessed circuit dependent values

* fix errors. working

* wip

* add debug function

* Plonk smart contracte refactored.

* Added test with circuits using +1 inputs

* Added cricuits tests with +1 inputs

* mod package.json

* Plonk refactored with new clsses and working

* change logger.in -> logger.debug

* update protocol to last version

* Refactor Fiat-Shamir adding preprocessed circuit dependent values

* fix errors. working

* wip

* add debug function

* Plonk smart contracte refactored.

* Added cricuits tests with +1 inputs

* mod package.json

* update ffjavascript to 0.2.59
2023-05-18 19:10:11 +02:00
Jordi Baylina
46066cd375 0.6.11 2023-05-07 10:33:42 +02:00
dependabot[bot]
19be14fa41 chore: Bump eslint from 8.38.0 to 8.40.0 (#361)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-06 16:02:43 -07:00
Blaine Bublitz
e113aecbc5 chore: Move smart contract tests into subdirectory (#355) 2023-05-04 23:09:30 -07:00
dependabot[bot]
b59c535c69 chore: Bump eslint from 8.36.0 to 8.38.0 (#346)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-15 17:22:37 -07:00
Xavier Pinsach
96b7d2786d Refactor fflonk test (#336)
* fflonk files test moved

* fflonk SC verification added to test suite

* add again length proof check to smart contract

* fix tests.yml for continous integration

* add hardhat dependencies to github action

* add more options to launch.json file

* remove hardhat-toolbox

* add missed packages

* skip smart contract testing in node version < 14

* fix smart contract tests

* fix typo and move variables inside function

* add plonk&groth16 smart contract tests

* add setup and prove on smart contracts tests
2023-03-22 08:21:27 +01:00
Jordi Baylina
614c35079d 0.6.10 2023-03-21 00:06:20 +01:00
Jordi Baylina
782894ab72 0.6.9 2023-03-15 05:49:45 +01:00
Jordi Baylina
d26326a110 build 2023-03-15 05:49:21 +01:00
dependabot[bot]
d8ac6bdddf chore: Bump eslint from 8.35.0 to 8.36.0 (#328)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-13 16:40:30 -07:00
Jordi Baylina
fa00080538 0.6.8 2023-03-10 11:24:44 +01:00
Jordi Baylina
28cda564d3 0.6.7 2023-03-01 03:52:11 -07:00
Jordi Baylina
ff22e3650d 0.6.6 2023-02-28 07:22:30 -07:00
dependabot[bot]
5756e1a081 chore: Bump eslint from 8.33.0 to 8.35.0 (#320)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-27 19:47:35 -07:00
Jordi Baylina
8c2183941f 0.6.5 2023-02-27 11:17:42 +01:00
Jordi Baylina
b5be04c960 0.6.4 2023-02-22 15:56:44 +01:00
Jordi Baylina
cffd9171c0 0.6.3 2023-02-21 17:33:20 +01:00
Jordi Baylina
1806c6f624 0.6.2 2023-02-21 09:42:59 +01:00
Jordi Baylina
1345a60aaf 0.6.1 2023-02-10 19:18:47 +01:00
Jordi Baylina
1ffcb9fd4e 0.6.0 2023-02-10 17:33:59 +01:00
Xavier Pinsach
6555d901a7 Fflonk (#305)
This PR includes all the FFLONK implementation

* baby plonk added

* wip

* commands added

* fix babyplonk command calls

* refactor cmd calls

* WIP

* Add header babyplonk to zkey utils

* wip

* Wip baby plonk verifier

* Add baby plonk test

* babyplonk export verification keu aded

* wip

* refactor polynomial & add some tests

* refactor setup, extract a new class to process r1cs constraints

* improve polynomial.4T

* fix

* refactor setup

* refactor

* massive update

* Add comments to round1 and 2

* organize fflonk prover

* organize fflonk verifier

* Change format add a section for each sigma

* read sigma from each section

* add T0 polynomial computation

* mul_z transformed to a class

* add C1 polynomial computation

* add function to X^n to Polynomial class

* Add C2 polynomial computation

* typos

* added computeZ

* Add T1 polynomial computation

* T2 polynomial computation added

* Compute h1, h2, h3 and xi

* polynomial F added (wip)

* Improve comments in fflonk prover

* typo

* fix comments

* compute F(X) and L(X) polynomials added

* fflonk verifier added

* Remove QL, QR, QM, QO, QC, S1, S2 and S3 commitments in verification key and zkey because they are not used on either the verifier or the prover

* remove unused variables

* Fix in final pairing

* Add omega 3 and omega 4 in setup process and export vk process

* Add omega3 and omega4 to the prover&verifier

* omega3 and omega4 comments

* change folder name to fflonk

* fix proof messages

* change polynomial length getter to function

* change evalutions length getter to function

* dev

* fix error on sigma computings & increase ptau buffer

* fflonk setup memory improvements

* fflonk prover & verifier refactor

* wip fflonk exportcalldata & export solidity done, refactor fflonk prove and verifier

* wip

* fix r1(x) & r2(x) and refactor h1w3, h2w3 & h3w3 converted to arrays

* improve comments

* improve lagrange4

* refactoring polynomial lagrange4

* Add Lagrange polynomials interpolation methods (optimized and non optimized)

* Added polynomials methods: fromCoefficientsArray, divBy === eucledian division and changed method name fromBuffer to fromEvaluations

* Refactor polynomial.js to take in account when use BigBuffer or Uint8Array

* Add div by ZT's

* massive updates

* add polynomial zerofier test

* massive updates

* Move computation of 3th root of omega to fflonk_setup to setup

* fix: L polynomial computation

* fix: remove default parameter in evaluations

* Add logger to export verification key

* fix: several improvements

* Change evaluations.getEvaluation(i) from byte-based i parameter to index-based

* fix: first proof verified

* dev

* solidity verifier added and working with r1(y) and r2(y) inside the proof

* fflonk verifier in Solidity working

* Added zero knowledge and degree checking

* fix typo

* fix: save & load the exact SRS length string

* prover improvement

* fix: add zero knowledge

* Improve add batch inverse in lagrange polynomials computation

* wip develop part of the verifier developed in Solidity in Javascript to check if could work

* added beta version of the first fflonk verifier smart contract

* remove babyplonk references

* fix: Check if Ptau is big enough for the circuit

* remove polynomials and evakuations from memory when not used

* add fflonk tests suite

* Add fflonk full prove command

* Add readme documentation for fflonk

* fix typos

* fix: force to clean memory with globalThis.gc()

* fix: extract constant multiplication part outside of the loop for better performance

* perfomance: removed all the divisions in smart contract by sending a single evaluation from the prover and the rebuild the onverses using the Montgomery batched algorithm

* smart contract updated

* Refactor fflonk smart contract

* improve comments in smart contract

* Refactor lagrange interpolation. Specific lagrange from 4 and 6 points removed

* improve prover performance

* improve performance of the prover

* resolve conflict

* improve performance of the prover

* write fflonk tests into github action workflow tutorial.yml

* comment previous fflonk workflow

* Fix: load constraints dinamically

* fix dev

* add more comments in fflonk setup

* improve comments

* improve comments

* improve comments

* improve comments in setup process

* improve prompt comments in setup process

* dev

* change divZh() arguments, added domainSize

* dev

* fix coef.length by coef.byteLength

* fix dev

* dev

* fix dev

* add more messages

* Improve comments & add a new parameter in Evaluation::fromPolynomial to choose the extension size

* dev

* fflonk security issue fixed

* Add comments in fflonk_proer and fast divison and new method "fromPolynomial" to create a new Polynomial

* add w16 to setup and remove w3, w4 and w8

* CPolynomial added

* fix dev

* use CPolynomial class in setup and us multiexp from polynomial

* fix computeT1

* improve round 5

* fix r1cs processor

* fix r1cs process constraints

* adapt solidity verifier to new implementation

* remove unnecessary debug functions

* fix typo

* refactor computeF and computeL

* fix

* refactor computeF

* update package-lock.json
2023-02-10 17:12:08 +01:00
dependabot[bot]
b478e44e9f chore: Bump eslint from 8.32.0 to 8.33.0 (#300)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-30 17:10:48 -07:00
dependabot[bot]
a413a57654 chore: Bump eslint from 8.31.0 to 8.32.0 (#299)
Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-16 12:39:54 -07:00
dependabot[bot]
32395733dd chore: Bump eslint from 8.30.0 to 8.31.0 (#296)
Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-02 11:23:51 -07:00
dependabot[bot]
f1a1fc0d29 chore: Bump eslint from 8.29.0 to 8.30.0 (#289)
Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-19 11:41:18 -07:00
dependabot[bot]
b1b93ffb88 chore: Bump mocha from 10.1.0 to 10.2.0 (#282)
Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-12 11:17:31 -07:00
dependabot[bot]
ac3d9a648d chore: Bump eslint from 8.28.0 to 8.29.0 (#279)
Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-05 10:56:03 -07:00
dependabot[bot]
be2d76a44d chore: Bump eslint from 8.27.0 to 8.28.0 (#271)
Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-21 11:29:54 -07:00
dependabot[bot]
e8473cb5ff chore: Bump eslint from 8.25.0 to 8.27.0 (#270)
Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 13:58:23 -07:00
dependabot[bot]
9bcf6e8273 chore: Bump r1csfile from 0.0.41 to 0.0.42 (#269)
Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 13:57:50 -07:00