Commit Graph

28 Commits

Author SHA1 Message Date
Dmitriy Ryajov d93ea064fe
move license to the bottom 2023-04-14 19:24:28 -06:00
Dmitriy Ryajov a1976e0543
extract poseidon to it's own package 2023-04-14 19:21:51 -06:00
Dmitriy Ryajov ebef300064
Ark circom and rust ffi (#5)
* wip rust ffi

* proper test component instantiation

* adding quick&dirty poseidon implementation

* update gitignode

* gitignore

* adding rust circuit tests

* gitignore

* rename

* add storer tests

* move utils under circuit_tests

* fix storage proofs

* wip: ffi

* instantiate storer

* enable ark-serialize

* delete js tests

* update CI to run cargo tests

* keep the artifacts dir

* update .gitignore

* build circuits

* remove package json

* place built circuits in correct dirs

* update gitignore

* remove node

* fix ci

* updating readme

* storageproofs.rs to storage_proofs.rs

* flatten tests chunks by default

* add ffi

* fix digest

* minor fixes for ffi

* fix storer test

* use random data for chunks

* debug optimizations to speed witness generation

* clippy & other lint stuff

* add back missing unsafe blocks

* release mode disables constraint checks

* fix ffi

* fix hashes serialization

* make naming more consistent

* add missing pragma

* use correct circuits

* add todo

* add clarification to readme

* silence unused warning

* include constants file into exec

* remove unused imports
2023-04-12 16:17:00 -06:00
Dmitriy Ryajov e7b296ebbb
rework with poseidon (#3)
* rework with poseidon

* adding main template

* adding todo

* remove mimc
2023-03-07 18:27:00 -06:00
Dmitriy Ryajov 4483440c27
adding CI build (#4)
adding initial CI build for circuits
2023-03-07 18:17:13 -06:00
Mikerah d3487bfb5f
Update README.md (#2)
* Update README.md

* fix tests running example

---------

Co-authored-by: Dmitriy Ryajov <dryajov@gmail.com>
2023-02-21 17:06:09 -06:00
Dmitriy Ryajov a0ba322cfd
Storage proofs (#1)
* WIP: working on storage proofs

* make it work

* don't need to pass an array

* add failing case

* move `saltSquare` to top

* updating deps
2023-02-09 10:40:23 -06:00
Csaba Kiraly 94b9b0da6d
adding minimal README
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-02-08 15:46:17 +01:00
Csaba Kiraly 94f5bcbb99
adding script to prepare circuit in CLI
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-12-14 10:40:39 +01:00
Csaba Kiraly 3761dde176
use 2.1.0 circom syntax
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-29 14:55:31 +01:00
Csaba Kiraly 3875d06186
fixup: checked in with wrong curve
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-29 12:42:58 +01:00
Csaba Kiraly 43ba6e6bf3
fullprocess: define path at beginning
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-28 10:49:21 +01:00
Csaba Kiraly 92200bd506
add fullprocess to circuit test
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-25 00:31:51 +01:00
Csaba Kiraly 53392c8722
add first merkletree test with Poseidon hash
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-24 09:20:54 +01:00
Csaba Kiraly 055bc98f09
circuit contract: simplify main for first test
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-24 09:17:18 +01:00
Csaba Kiraly 115a9d4e41
add gitignore
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-24 09:16:56 +01:00
Csaba Kiraly f515e0d73d
storage contract: remove some old syntax
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-24 09:14:49 +01:00
Csaba Kiraly 8c6eb95378
fix public inputs
the root hash should also be a public input

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-22 14:34:26 +01:00
Csaba Kiraly 4d14db8ddc
speed up c++ witness calculation using 2.0.8 parallel tag
See https://docs.circom.io/circom-language/templates-and-components/#components

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-17 14:37:02 +01:00
Csaba Kiraly a54c97aa6a
just comment and test
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-17 14:28:37 +01:00
Csaba Kiraly 6735dc4bc4
use circom 2.1.0 anonymous components
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-17 14:28:16 +01:00
Csaba Kiraly 1955c11d69
we are using 2.1.0 syntax
we use <== on arrays, which was introduced in 2.1.0

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-17 14:24:14 +01:00
Csaba Kiraly 69fa933f10
factorize CheckInclusions loop
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-17 14:23:31 +01:00
Csaba Kiraly d2a72613b0
cleanup 2022-11-17 14:00:16 +01:00
Csaba Kiraly 56ca654ab9
use block indices directly to calculate treePathIndices
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-17 13:59:58 +01:00
Csaba Kiraly 26d8f78c58
initial commit of tests
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-17 13:51:13 +01:00
Csaba Kiraly 24540dbcbd
initial commit of circuits
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-17 13:49:58 +01:00
Csaba Kiraly 7f0e3b6b5d
initial commit
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-11-17 13:49:02 +01:00