Commit Graph

152 Commits

Author SHA1 Message Date
Richard Ramos 3551435d60 feat(wasm): expose seeded_key_gen 2022-12-07 11:35:09 -04:00
G 60e3369621
feat(rln): add recover identity secret API (#80)
* feat(rln): add API to recover id_secret when a user is slashed

* feat(rln): add RLN API for recovering id_secret

* feat(rln): add recover_id_secret FFI API; update public API docs

* fix(rln): address reviewers' comments

* fix(rln): removing ; for clippy
2022-11-28 12:05:33 +01:00
G 284e51483c
feat(rln): add example usage tutorial and expand documentation for RLN (WIP) (#74)
* feat(rln): expand documentation with minimal public API usage example

* refactor(rln): ease RLN interaction with new APIs

* feat(rln): expand API docs

* fix(rln): disable doctest for rln
2022-11-25 10:54:17 +01:00
G 3427729f7e
fix(semaphore): temporarily use fixed semaphore-rs fork (#79)
* fix(semaphore): temporarily use fixed semaphore-rs fork

* fix(semaphore): update semaphore logic to work with latest master of semaphore-rs
2022-11-23 10:55:12 +01:00
G e1c16c9c3f
refactor(zerokit): split test workflows per module (#76)
* refactor(zerokit): split test workflows per module

* refactor(ci): separate clippy per module

* fix(ci): continue with next module lint check, even if previous fails

* refactor: enable tests on linux/macos

* fix(rln-wasm): make cargo make build work on macOS and linux (#77)

* fix(ci): fix workflow

* fix(ci): add name to workflows

* refactor(zerokit): split test workflows per module

* refactor(ci): separate clippy per module

* fix(ci): continue with next module lint check, even if previous fails

* refactor: enable tests on linux/macos

* fix(ci): fix workflow

* fix(ci): add name to workflows

* fix(ci): enable lint tests only for ubuntu
2022-11-22 15:25:35 +01:00
G bc69e25359
feat(rln): add few serialization APIs to ease user interaction (#75)
* feat(rln): add few serialization APIs to ease user interaction

* fix(rln): cargo fmt
2022-11-21 17:55:08 +01:00
G 6a7808d911
fix(rln-wasm): make cargo make build work on macOS and linux (#77) 2022-11-21 16:41:38 +01:00
Aaryamann Challani 25bcb7991b
fix(ci): exclude rln-wasm since it has its own step now (#73)
* fix(ci): exclude rln-wasm since it has its own step now

* fix(ci): use stable toolchain

* fix(ci): paths for release notes

* fix(ci): release path

* test(ci): check the tree for filepaths

* test(ci): check the tree for filepaths

* test(ci): tighten name and release assets

* test(ci): auto generated release notes

* fix(ci): remove commit hash from asset name for determinism

* test(ci): start tag should be last release
2022-11-16 20:06:17 +05:30
Aaryamann Challani 3d943bccb6
feat(rln): publish rln artifacts nightly (#72)
* feat(rln): publish rln artifacts on push to master

* test(ci): check if artifacts are built on push to temp branch

* fix(ci): run tests only on changes to src

* fix(ci): add paths-ignore to prs

* fix(ci): make paths more explicit

* fix(ci): make publish workflow run

* fix(ci): revert back to master ref

* fix(ci): add os and sha to artifact name

* test(ci): trigger publish

* feat(ci): tar the artifacts

* test(ci): split ci and publish

* test(ci): only on master runs

* feat(ci): replace with nightly releaser

* chore(ci): extra newlines

* fix(ci): Spelling

Co-authored-by: G. <28568419+s1fr0@users.noreply.github.com>

* feat(ci): build and publish rln wasm

Co-authored-by: G. <28568419+s1fr0@users.noreply.github.com>
2022-11-15 16:35:29 +05:30
Aaryamann Challani fba905f45d
fix(rln): throw if attempting to insert out of bounds (#67)
* fix(rln): throw if attempting to insert out of bounds

* chore(rln): better error msg

* fix(merkle-tree): make it mimic OptimalMerkleTree impl

* chore(rln): return result as is
2022-11-10 22:41:44 +05:30
Aaryamann Challani 490206aa44
feat(rln): ability to set leaves from a given index (#63)
* feat(rln): ability to set leaves from a given index

* style(rln): fmt

* fix(rln): bubble the error

* revert: "fix(rln): bubble the error"

This reverts commit 40265082ba.

* fix(rln): replace ark::std::Zero with default

* fix(rln): ordering of ffi api

* fix(rln): use PoseidonHash::default_leaf

* chore(rln): add ffi test for batching

* docs(rln): add entry to changelog

* fix(rln): address reviews

* fix(changelog): fmt

* fix(rln): safe conversion

* fix(rln): reset tree with init func,  add comments

* chore(rln): add comment about init_tree_with_leaves

* fix(rln): comment
2022-11-03 17:49:30 +05:30
G afa4a09bba
Update public.rs
fix(rln): remove unnecessary print
2022-10-10 08:52:36 +02:00
Richard Ramos b95b151a1c feat(rln-wasm): expose get_root and verify_with_roots 2022-10-07 14:34:03 -04:00
G b77facc5e9
feat(RLN): Proof verification using provided roots (#61)
* chore(rln): better comments

* feat(rln): add verification with roots
2022-10-07 18:04:48 +02:00
Sanaz Taheri Boshrooyeh 5d429ca031
Initializes the private settlement package (#60)
* initializes the private settlement crate

* adds private settlement to the main cargo.toml
2022-10-06 13:44:16 -07:00
G 1df6c53ca0
fix(rln): fix order of inputs in comments (#59) 2022-10-03 14:58:49 +02:00
Richard Ramos 878c3c5c5f
fix(rln-wasm): expose verify_rln_proof instead of verify (#58) 2022-10-03 08:50:27 -04:00
G a5aa4e8d4f
feat(rln): add seeded keygen (#56)
* refactor(rln/zerokit): move poseidon to separate utils crate

* refactor(rln/zerokit): move merkle tree to utils crate

* feat(rln): add seeded keygen
2022-09-30 17:27:55 +02:00
G bbacc9dcce
Add `utils` module (#53)
* refactor(rln/zerokit): move poseidon to separate utils crate

* refactor(rln/zerokit): move merkle tree to utils crate

* refactor(rln/zerokit): move poseidon to separate utils crate

* fix(utils/rln): fmt & conflict resolve

* feat(utils): add parallel feature
2022-09-28 11:33:14 +02:00
G c42fcfe644
Add GrainLFRS and PrimeField trait to Poseidon (#51)
* refactor(rln): generate poseidon constants

* refactor(rln): use traits in poseidon hash; refactor constants

* fix(rln): fix poseidon hardcoded constants test

* fix(rln): cargo fmt
2022-09-27 17:17:23 +02:00
fryorcraken.eth 99a7eb003f
ci: include wasm (#54) 2022-09-28 01:09:48 +10:00
Richard Ramos 14f41d5340
chore: use cargo-make for building and publishing rln-wasm (#48) 2022-09-24 10:27:46 -04:00
Richard Ramos c401c0b21d
feat: wasm (#38) 2022-09-20 08:22:46 -04:00
oskarth 4f08818d7a
docs: Add CHANGELOG for v0.1 release (#46)
Co-authored-by: oskarth <noreply@dev.null>
2022-09-19 13:16:43 +08:00
G 4dc600d353
refactor(RLN:) Remove dependencies and add new APIs (#45)
* refactor(rln): removing unused crates/dependencies

* cargo fmt

* refactor(rln): removed more dependencies; curve/fields as parameters

* refactor(rln): use poseidon-rs hash instead of semaphore-rs poseidon

* chore(rln): remove deps

* refactor(rln): use exclusively arkworks Fr

* refactor(rln): integrate poseidon-rs implementation to work with arkworks arithmetic

* fix(rln): remove previous poseidon-rs wrapper

* feat(rln): add features to select MT; remove prints if not in debug mode

* fix(rln): collect test parameters in a vector

* feat(RLN): add `new_with_params` (#36)

Allows passing the wasm, zkey and verification key data as buffers, instead of using a path to a folder

* chore(rln): simplify read wasm

* fix(rln): remove unused dependencies

* cargo fmt

* fix(rln): update dependencies, fix commit

* refactor(rln): restore ark-circom original dep

Co-authored-by: Richard Ramos <info@richardramos.me>
2022-09-15 16:32:45 +08:00
G 1131b76a66
feat(RLN): integrate Poseidon Hash (#44)
* refactor(rln): removing unused crates/dependencies

* cargo fmt

* refactor(rln): removed more dependencies; curve/fields as parameters

* refactor(rln): use poseidon-rs hash instead of semaphore-rs poseidon

* chore(rln): remove deps

* refactor(rln): use exclusively arkworks Fr

* refactor(rln): integrate poseidon-rs implementation to work with arkworks arithmetic

* fix(rln): remove previous poseidon-rs wrapper
2022-09-15 11:06:16 +08:00
oskarth fb34ebe63c ci: Remove old GH action
We are using Vac Research board, not this deleted board.
2022-09-14 17:50:06 +08:00
G a85454cfd7
Use arkworks arithmetic only (#43)
* refactor(rln): removing unused crates/dependencies

* cargo fmt

* refactor(rln): removed more dependencies; curve/fields as parameters

* refactor(rln): use poseidon-rs hash instead of semaphore-rs poseidon

* chore(rln): remove deps

* refactor(rln): use exclusively arkworks Fr
2022-09-14 17:48:48 +08:00
oskarth f5897eb752 feat: Remove unsupported poseidon-tornado example
Currently a basic PoC, and a better starting point here is probably RLN
package. Can still be looked at as an example where relevant.
2022-09-14 11:58:08 +08:00
Richard Ramos 2455bea922
refactor(RLN): use iterators instead of loops (#33)
* refactor(RLN): use iterators instead of loops
* fix(rln): cargo fmt
* fix(rln): cargo clippy: avoid Vec object creation

Co-authored-by: s1fr0 <28568419+s1fr0@users.noreply.github.com>
2022-08-22 07:48:31 -04:00
G 824296e695
refactor(rln): use space-efficient Merkle tree implementation (#32)
* refactor(rln): replace merkle tree implementation

refactor(rln): before switch

refactor(rln): replace merkle tree implementation

fix(rln): cargo fmt, cargo clippy

cargo fmt

* chore(rln): add comments

* chore(rln): cargo fmt; cargo clippy

* refactor(rln): improve Merkle tree crate

- Integrate previous Full storage MT with Optimal (storage) MT implementation
- Align the two implementation to same API/traits implementations
- Align implementations as much as possible to same language and variable names/meaning
- Comment code
- Add descriptions to each module's crate
- address reviewer's comments

* refactor(rln): fmt, clippy, remove pub from next index, update output type for some proc
2022-08-17 11:08:14 +02:00
G 64f5083639
RLN: update README (#27)
* refactor(rln): update readme

* fix(rln): update README in light of https://github.com/vacp2p/zerokit/pull/30
2022-08-07 16:51:03 +02:00
G 3378aed857
refactor(rln): Update Merkle tree initialization method (#30)
* refactor(rln): fix merkle tree initialization

* fix(rln): cargo fmt; cargo clippy
2022-08-05 12:36:06 +02:00
oskarth cbb10efc10
Update labels.yml 2022-08-02 16:20:17 +08:00
G c1db14dd7c
refactor(rln): improve circuit loading performances and tests fix (#26)
* refactor(rln): change witness generation logic to improve performance

* rln(refactor): - change circuit loading logic; - update tests with tree size 20
2022-07-29 13:40:16 +08:00
Oskar Thoren 9ca9c227e4
chore: add labels
Adding all because why not
2022-07-27 18:44:38 +08:00
Oskar Thoren aab10342f3
ci: Add to new project board 2022-07-27 18:43:34 +08:00
Oskar Thoren cc7270987d
ci: Add GH workflow for syncing labels 2022-07-27 17:27:39 +08:00
Richard Ramos 7fe9bb4f94
chore(rln): add "staticlib" to crate-type in Cargo.toml (#24) 2022-07-25 12:54:13 -04:00
oskarth 42e1743198
fix(rln): Fix CI by updating ethers dependency (#25) 2022-07-25 14:18:50 +08:00
G 9cc333811b
RLN: Update API (#22)
* refactor(rln): integrate semaphore's merkle tree implementation

* feat(rln): expand API and refactor

* refactor(rln):  support external resource path for circuits/keys, add circuit for tree_height = 20

* feat(rln): add cargo library directives
2022-06-29 18:56:03 +02:00
G 95352a4a7c
RLN: Update Rust and C API (#20)
* fix(rln): ignore dirty rln submodule

* feat(rln): add RLN witness & proof values byte serialization/deserialization

* feat(RLN): add Merkle-tree public APIs

* fix(rln): use references to avoid unnecessary clone()

* fix(rln): fix rust public API, code refactor

* fix(rln): change vector length serialization from usize to u64; add random witness generation

* feat(rln): add C APIs

* chore(rln): cargo format/clippy

* feat(rln): add C APIs tests

* chore(rln): minor code restyling

* refactor(rln): change &Vec<u8> to &[u8] (avoids  new object creation)
2022-06-22 15:36:54 +01:00
Oskar Thoren 89593dc033
ci: Add new issues and PRs to vac-research board 2022-06-20 12:53:35 +01:00
s1fr0 eea9fdbeb1
Merge branch 'master' of https://github.com/vacp2p/zerokit 2022-06-09 15:58:05 +02:00
s1fr0 8e065d4a83
fix(rln): fixed proof generation/verification and E2E tests
chore(rln): clippy and fmt

fix(rln): cargo fix

ci: update submodules

chore(rln): remove unnecessary test, restyle

fix(rln): switch to field type, add field arithmetic

feat(rln): public input computation from witness

fix(rln): fix semaphore crate version
2022-06-09 15:57:03 +02:00
G 98ebd24261
Merge pull request #18 from vacp2p/fix-e2e
RLN: fix proof generation/verification and E2E tests, add RLN utilities
2022-06-09 14:27:21 +02:00
s1fr0 1bf339f6eb
fix(rln): fix semaphore crate version 2022-06-09 13:45:15 +02:00
s1fr0 30d820aeb9
feat(rln): public input computation from witness 2022-06-09 11:50:12 +02:00
s1fr0 7ac5b60cb6
fix(rln): switch to field type, add field arithmetic 2022-06-09 00:41:50 +02:00
s1fr0 cf6168bf4e
chore(rln): remove unnecessary test, restyle 2022-06-02 19:43:59 +02:00