Commit Graph

287 Commits

Author SHA1 Message Date
Aaryamann Challani 2e868d6cbf
fix(ci): force draft=false for nightly releases (#143) 2023-03-31 18:15:37 +05:30
tyshko-rostyslav 39bea35a6d
Macro to call functions with an error message with output (#141)
Another variation of our call, this time when output is used
2023-03-31 14:44:04 +02:00
tyshko-rostyslav 6ff4eeb237
Macro to call functions with an error message (#140)
abstract out calls

---------

Co-authored-by: tyshkor <tyshko1@gmail.com>
2023-03-29 15:16:36 +02:00
Aaryamann Challani 1f983bb232
fix(rln): move std::path to cfg_if block (#138) 2023-03-24 09:31:01 +05:30
tyshko-rostyslav 13a2c61355
add wasm-strip to reduce size even more (#137)
* added wasm-strip fixed docs

* requested change

* fix installdeps

* fix ubuntu

* fix macos

---------

Co-authored-by: tyshkor <tyshko1@gmail.com>
2023-03-24 09:30:48 +05:30
tyshko-rostyslav 2bbb710e83
add Cargo.lock to the repo (#136)
add Cargo.lock to the repo
2023-03-23 07:45:36 +01:00
tyshko-rostyslav 8cd4baba8a
leave our fork of `ark-circom` (#132)
* leave our fork of `ark-circom`

---------

Co-authored-by: tyshkor <tyshko1@gmail.com>
2023-03-22 07:01:24 +01:00
Aaryamann Challani 9045e31006
fix ci tag (#133)
* fix(ci): release tag

* fix: use 0.2.1
2023-03-20 17:47:46 +05:30
Aaryamann Challani 9e44bb64dc
fix(semaphore): use fixed rev (#130) 2023-03-20 14:06:25 +05:30
Aaryamann Challani bb7dfb80ee
feat(ci): cross-compile release assets, cache deps (#128)
* feat(ci): cross-compile release assets, cache deps

chore(ci): add caching to regular tests

* fix(ci): include cross only in ci env, add note about release assets
2023-03-14 17:44:06 +05:30
Aaryamann Challani c319f32a1e
feat(rln): package rln w/ resources into a static lib (#118)
* feat(rln): package resources into lib

* fix(rln): use Path

* fix(rln): fmt

* fix(rln): trailing slash
2023-03-07 18:15:06 +05:30
tyshko-rostyslav bf2aa16a71
chore(rln): ensure all dependencies have fixed revision (#127) 2023-03-07 09:11:08 +05:30
tyshko-rostyslav c423bdea61
chore(rln): update pmtree implementation (#125)
* most changes

* fmt

* hide tests back under feature

* grooming

* changed `SledConfig`

* requested change: rm `dbpath`

---------

Co-authored-by: tyshkor <tyshko1@gmail.com>
2023-03-03 10:33:39 +05:30
Carlos Pérez 5eb98d4b33
change: Replace `u64` for `usize` for length vars (#94)
* change: Replace `u64` for `usize` for length vars

Resolves: #39

* fix(rln): usize instead of u64 in tests

* fix(rln): linter

* fix: outlier u64 usage

* fix(rln|rln-wasm): serde of usize types

---------

Co-authored-by: Aaryamann Challani <43716372+rymnc@users.noreply.github.com>
2023-03-02 19:15:58 +05:30
Aaryamann Challani b698153e28
fix(ci): nightly release (#124) 2023-03-02 07:41:49 +05:30
Aaryamann Challani a6c8090c93
feat(v0.2): changelog (#122) 2023-02-28 16:25:18 +05:30
tyshko-rostyslav 7ee7675d52
Redundunt dependencies (#111)
* most changes

* delete unused deps + update ark-circom

* fix build

* revert

* default deatures

* return

* кумуке 2

* try

* rm

---------

Co-authored-by: tyshkor <tyshko1@gmail.com>
2023-02-28 00:19:47 +05:30
Aaryamann Challani 062055dc5e
fix(license): add licensing info to cargo.toml (#121) 2023-02-27 11:47:55 +05:30
tyshko-rostyslav 55b00fd653
Code quality (#114)
* to color_eyre::Result 1st part

* tests and seconds batch

* third batch

* rln fixes + multiplier

* rln-wasm, assert rln, multiplier

* io to color_eyre

* fmt + clippy

* fix lint

* temporary fix of `ark-circom`

* fix ci after merge

* fmt

* fix rln tests

* minor

* fix tests

* imports

* requested change

* report + commented line + requested change

* requested changes

* fix build

* lint fixes

* better comments

---------

Co-authored-by: tyshkor <tyshko1@gmail.com>
2023-02-27 11:46:16 +05:30
Rahul Ghangas 62018b4eba
Update documentation for building and testing (#120)
* chore: fix Makefile pre-build

* chore: add Makefile command to install depenedncy cargo-make

* chore: update all READMEs with instructions to install dependencies, build and test

* chore: add target to fetch all submodules
2023-02-24 11:50:51 +05:30
oskarth 48fa1b9b3d
chore: Add MIT/Apache dual license (#119) 2023-02-24 11:20:01 +08:00
Aaryamann Challani a6145ab201
feat(rln): expose poseidon to ffi (#112) 2023-02-16 13:26:13 +05:30
Aaryamann Challani e21e9954ac
fix(semaphore): revert ark-circom dependency (#116) 2023-02-16 12:32:43 +05:30
Carlos Pérez de5eb2066a
change: Replace profile overwrites to Workspace Cargo.toml (#95)
Since profile info specified inside workspace members `Cargo.toml`'s
is ignored by Cargo, this replaces the place to specify these details
for the workspace-level `Cargo.toml`.

NOTE that `panic` and `rpath` aren't supported with the Overwritting
feature. Therefore, the only required thing (if considered necessary) is
to create a new profile which also enables these things.

Resolves: #93
2023-02-08 12:38:42 +01:00
tyshko-rostyslav 7aba62ff51
Add rust-clippy to CI (#108)
Convert clippy warnings to errors, fix them 

---------

Co-authored-by: tyshkor <tyshko1@gmail.com>
2023-02-06 05:54:59 +01:00
Rahul Ghangas cbf8c541c2
test: separate out tests (#103)
* test: move tests for rln, multiplier and private-settlements to tests folder

* test: fix rln test for poseiden tree

* test: move tests for rln-wasn to standalone tests folder

* test: move tests for semaphore and utils to standalone tests folder

* chore: cargo fmt

* test: rename test files

* test: move tests out from rln/src/public to test folder

* test: fix rln tests, move tests accessign private fields back to relevant source file

* chor: run cargo fmt

* test: move all semaphore tests to tests folder

* chore: cargo fmt
2023-01-31 21:27:28 +05:30
Rahul Ghangas 5bcbc6c22f
Use cargo make for tests in CI (#107)
* chore: use cargo make for builds/tests

* chore: add step to install cargo-make
2023-01-31 20:46:33 +05:30
tyshko-rostyslav 01fdba6d88
feat(rln): Abstract ffi APIs structure with a helper function (#102)
Added macros to do the following:

read the input passed to the FFI API;
cast it to a byte sequence;
pass the byte sequence to the corresponding public function;
cast the output of the public function to Buffer(if any) and write it into the FFI caller ´output_buffer` variable;
erase memory from any temporarily allocated data structure;
return true if everything went fine, false otherwise.
2023-01-31 09:43:41 +01:00
Rahul Ghangas 1502315605
chore: Makefile and consistent usage of cargo-make (#101)
* feat: add Makefile with pre build check. add targets for build, test and clean

* feat: add workspace level build file

* chore: add skeletal build files for each crate

* chore: remove environment variable to extend workspace makefile

* chore: formatting

* chore: add release flags to all builds/tests
2023-01-26 09:19:55 +05:30
Richard Ramos 92c431c98f feat(rln-wasm): expose `set_leaves_from` and `init_tree_with_leaves` 2023-01-19 08:37:15 -04:00
Richard Ramos 005393d696 feat(wasm): add extended_key_gen, seeded_extended_key_gen and recover_id_secret 2022-12-22 14:30:13 -04:00
G 89ea87a98a
feat(rln): integrate pmtree for MT persistance (#86)
* feat(rln): integrate pmtree for MT persistance

* fix(rln): address reviewers comments

* refactor(rln): move pmtree tests under pmtree flag
2022-12-13 20:00:27 +01:00
G 32f3202e9d
feat(rln): add extended keygen APIs for Semaphore-compatible credentials (#85)
* refactor(rln): update APIs based on updated rln circuit design

* chore(rln): update rln vendor submodule

* fix(ci): update ci to not ignore rln resources changes

* feat(rln): add extended keygen APIs

* refactor(rln): rename id_secret/id_key to identity_secret_hash as per RFC

* fix(rln): cargo fmt
2022-12-12 00:48:22 +01:00
G e69f6a67d8
fix(semaphore): restore and update original semaphore git dependency 2022-12-12 00:40:08 +01:00
G 9e1355d36a
refactor(rln): update APIs after circuit update (#84)
* refactor(rln): update APIs based on updated rln circuit design

* chore(rln): update rln vendor submodule

* fix(ci): update ci to not ignore rln resources changes
2022-12-09 17:19:55 +01:00
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