Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rln-v2): update serde for rln-v2 #202

Merged
merged 2 commits into from
Aug 16, 2023
Merged

feat(rln-v2): update serde for rln-v2 #202

merged 2 commits into from
Aug 16, 2023

Conversation

rymnc
Copy link
Contributor

@rymnc rymnc commented Aug 10, 2023

In https://github.com/Rate-Limiting-Nullifier/circom-rln/blob/17f0fed7d8d19e8b127fd0b3e5295a4831193a0d/circuits/rln.circom#L8-L16 we see that there are 2 additional
private inputs, user_message_limit and message_id, this PR adds it to the serde api's.

@rymnc rymnc added this to the Release v0.4.0 milestone Aug 10, 2023
@rymnc rymnc added the track:rln RLN Track - (Secure Messaging/Applied ZK), relay and applications label Aug 10, 2023
@rymnc rymnc self-assigned this Aug 10, 2023
@github-actions
Copy link

Benchmark for 3b2dcb5

Click to view benchmark
Test Base PR %
FullMerkleTree::delete 1212.1±2.55ns 1212.7±2.37ns +0.05%
FullMerkleTree::get 0.1±0.00ns 0.1±0.00ns 0.00%
FullMerkleTree::override_range 3.0±0.00µs 3.1±0.00µs +3.33%
FullMerkleTree::set 1218.9±2.13ns 1211.5±2.20ns -0.61%
OptimalMerkleTree::compute_root 1392.4±1.56ns 1389.6±1.83ns -0.20%
OptimalMerkleTree::delete 1385.7±1.32ns 1376.8±1.41ns -0.64%
OptimalMerkleTree::get 30.4±0.06ns 30.5±0.09ns +0.33%
OptimalMerkleTree::override_range 7.1±0.00µs 7.1±0.05µs 0.00%
OptimalMerkleTree::set 1376.0±1.73ns 1373.8±3.64ns -0.16%

@github-actions
Copy link

Benchmark for 3b2dcb5

Click to view benchmark
Test Base PR %
Pmtree::compute_root 1.7±0.00ns 1.7±0.00ns 0.00%
Pmtree::get 459.8±0.22ns 463.8±0.33ns +0.87%
Pmtree::override_range 175.7±12.71µs 179.6±12.64µs +2.22%
Pmtree::set 65.9±0.08µs 65.9±0.08µs 0.00%
Pmtree:delete 65.8±0.04µs 66.0±0.40µs +0.30%

@rymnc
Copy link
Contributor Author

rymnc commented Aug 10, 2023

Note: the tests will fail till we get the new artifacts from the rln-v2 ceremony

@github-actions
Copy link

Benchmark for c891214

Click to view benchmark
Test Base PR %
FullMerkleTree::delete 1441.6±64.44ns 1411.0±73.34ns -2.12%
FullMerkleTree::get 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::override_range 3.6±0.18µs 3.7±0.21µs +2.78%
FullMerkleTree::set 1420.0±65.53ns 1435.4±57.45ns +1.08%
OptimalMerkleTree::compute_root 1571.7±98.66ns 1593.5±89.24ns +1.39%
OptimalMerkleTree::delete 1652.6±73.52ns 1587.2±88.77ns -3.96%
OptimalMerkleTree::get 35.0±1.49ns 35.2±2.12ns +0.57%
OptimalMerkleTree::override_range 8.2±0.50µs 8.5±0.64µs +3.66%
OptimalMerkleTree::set 1621.0±89.25ns 1596.4±90.84ns -1.52%

@github-actions
Copy link

Benchmark for c891214

Click to view benchmark
Test Base PR %
Pmtree::compute_root 1.7±0.01ns 1.7±0.00ns 0.00%
Pmtree::get 471.2±0.24ns 461.4±0.26ns -2.08%
Pmtree::override_range 173.3±8.16µs 176.9±26.79µs +2.08%
Pmtree::set 66.5±0.05µs 66.0±0.20µs -0.75%
Pmtree:delete 66.3±0.09µs 66.1±0.05µs -0.30%

@rymnc rymnc changed the base branch from master to rln-v2 August 11, 2023 08:58
@rymnc rymnc marked this pull request as ready for review August 11, 2023 09:00
@rymnc rymnc mentioned this pull request Aug 11, 2023
12 tasks
@github-actions
Copy link

Benchmark for f5f9910

Click to view benchmark
Test Base PR %
FullMerkleTree::delete 1497.3±4.21ns 1498.0±1.56ns +0.05%
FullMerkleTree::get 0.1±0.00ns 0.1±0.00ns 0.00%
FullMerkleTree::override_range 3.8±0.01µs 3.8±0.02µs 0.00%
FullMerkleTree::set 1515.8±1.41ns 1496.3±6.48ns -1.29%
OptimalMerkleTree::compute_root 1667.0±3.42ns 1672.8±15.67ns +0.35%
OptimalMerkleTree::delete 1663.5±2.98ns 1657.7±32.74ns -0.35%
OptimalMerkleTree::get 34.9±0.08ns 36.8±0.06ns +5.44%
OptimalMerkleTree::override_range 8.6±0.02µs 8.5±0.05µs -1.16%
OptimalMerkleTree::set 1666.6±4.49ns 1662.3±4.86ns -0.26%

@github-actions
Copy link

Benchmark for 7694126

Click to view benchmark
Test Base PR %
FullMerkleTree::delete 1246.6±0.75ns 1254.5±0.78ns +0.63%
FullMerkleTree::get 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::override_range 3.1±0.00µs 3.1±0.00µs 0.00%
FullMerkleTree::set 1245.1±0.72ns 1244.7±1.03ns -0.03%
OptimalMerkleTree::compute_root 1384.9±9.89ns 1385.8±0.51ns +0.06%
OptimalMerkleTree::delete 1381.8±0.72ns 1376.8±4.54ns -0.36%
OptimalMerkleTree::get 29.1±0.01ns 30.0±0.01ns +3.09%
OptimalMerkleTree::override_range 7.0±0.00µs 7.2±0.00µs +2.86%
OptimalMerkleTree::set 1387.3±0.99ns 1378.6±5.60ns -0.63%

@github-actions
Copy link

Benchmark for 7694126

Click to view benchmark
Test Base PR %
Pmtree::compute_root 2.0±0.02ns 2.0±0.02ns 0.00%
Pmtree::get 471.4±0.16ns 464.7±0.16ns -1.42%
Pmtree::override_range 170.6±8.49µs 172.8±7.30µs +1.29%
Pmtree::set 66.2±0.32µs 66.5±0.05µs +0.45%
Pmtree:delete 66.1±0.05µs 66.0±0.19µs -0.15%

@github-actions
Copy link

Benchmark for f5f9910

Click to view benchmark
Test Base PR %
Pmtree::compute_root 2.5±0.04ns 2.5±0.04ns 0.00%
Pmtree::get 551.3±5.80ns 557.8±0.99ns +1.18%
Pmtree::override_range 204.1±10.23µs 201.1±8.27µs -1.47%
Pmtree::set 79.6±1.05µs 78.2±0.97µs -1.76%
Pmtree:delete 79.2±1.14µs 79.1±0.66µs -0.13%

@tyshko-rostyslav
Copy link
Contributor

Note: the tests will fail till we get the new artifacts from the rln-v2 ceremony

While it's not the case, maybe we should keep the failing code at a temporary branch?

@rymnc
Copy link
Contributor Author

rymnc commented Aug 16, 2023

Note: the tests will fail till we get the new artifacts from the rln-v2 ceremony

While it's not the case, maybe we should keep the failing code at a temporary branch?

Yes, merging into rln-v2 branch

@rymnc rymnc merged commit 5347f74 into rln-v2 Aug 16, 2023
8 of 16 checks passed
@rymnc rymnc deleted the update-serde-rln-v2 branch August 16, 2023 06:11
rymnc added a commit that referenced this pull request Aug 17, 2023
* feat(rln-v2): update serde for rln-v2

* fix: public tests that needed to append the new fields
rymnc added a commit that referenced this pull request Oct 3, 2023
* feat(rln-v2): update serde for rln-v2 (#202)

* feat(rln-v2): update serde for rln-v2

* fix: public tests that needed to append the new fields

* s/id_commitments/rate_commitments (#205)

* feat: rename public, protocol and update tests to use rate_commitments

* fix: into()

* `message_id` range check (#210)

* feature: range check added

* fmt

* feature: message_id_range_check

* fix: corresponding change of types

* comments: function level

* fmt

* fix(rln): tests (#212)

* most changes

* fix

* fix protocol tests

* fmt

* ffi tests fix

* feat(rln-v2): new artifacts, removed older ones (#211)

* feat(rln-v2): new artifacts, removed older ones

* wip: working branch

* fix: remove more refs to epoch + rln_identifier

* Updated serde in RLN proof verification

* Updated artifacts

* chore: update

* chore: update

* hardcoded test works

* fix: proof generation and verification

* fix: rln-wasm tests

* fix: ffi tests

* fix: rln-wasm test

* fix: recover_id_secret

* Fix message (#217)



---------

Co-authored-by: rymnc <43716372+rymnc@users.noreply.github.com>

* chore: Release

---------

Co-authored-by: tyshko-rostyslav <122977916+tyshko-rostyslav@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
track:rln RLN Track - (Secure Messaging/Applied ZK), relay and applications
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants