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

Replace the ark-zkey witness calculator with the one of iden3 #273

Merged
merged 18 commits into from
Dec 25, 2024

Conversation

AlekseiVambol
Copy link
Contributor

@AlekseiVambol AlekseiVambol commented Dec 19, 2024

Motivation
See this comment.

Methods

  1. Use circom-witness-rs to create the execution graph file for the rln circuit used in zerokit. Add this file to the zerokit resources.

  2. Remove the execution graph generator code from circom-witness-rs and simplify its architecture to facilitate integration of its witness calculating code into zerokit.

  3. Rewrite the corresponding parts of the cut version of circom-witness-rs to make its input and output data format consistent with zerokit.

  4. Integrate the modified cut version of circom-witness-rs into zerokit, remove the code expressing the involvement of the ark-zkey witness calculator and WASM binary file used by it, involve the integrated code into the witness calculation and remove the redundant dependencies.

  5. Modify the code related to testing and measurements to facilitate studying the performance of the witness calculation for the release compilation mode.

Results

  1. On the same computer the observed witness calculation times lied in [1.72 ms, 3.49 ms] for the proposed zerokit version and in [11.42ms, 32.81 ms] for the one using the ark-zkey witness calculator. The precise comparative performance study is out of the scope of the current work.
  2. Dependence on the WASM binary file has been eliminated. This facilitates using zerokit as a software component.

Copy link

Benchmark for 2a22ee6

Click to view benchmark
Test Base PR %
FullMerkleTree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::delete 854.8±7.99ns 854.4±11.00ns -0.05%
FullMerkleTree::get 3.5±0.05ns 3.4±0.08ns -2.86%
FullMerkleTree::get_empty_leaves_indices 7.2±0.10ns 7.2±0.11ns 0.00%
FullMerkleTree::get_subtree_root 3.7±0.08ns 3.6±0.10ns -2.70%
FullMerkleTree::override_range 1345.1±12.34ns 1373.5±11.69ns +2.11%
FullMerkleTree::set 873.4±9.77ns 863.8±8.66ns -1.10%
OptimalMerkleTree::compute_root 995.4±10.50ns 995.1±11.34ns -0.03%
OptimalMerkleTree::delete 990.8±6.96ns 993.3±14.49ns +0.25%
OptimalMerkleTree::get 22.5±0.25ns 22.5±0.25ns 0.00%
OptimalMerkleTree::get_empty_leaves_indices 7.2±0.15ns 7.2±0.07ns 0.00%
OptimalMerkleTree::get_subtree_root 24.0±0.26ns 24.0±0.26ns 0.00%
OptimalMerkleTree::override_range 4.1±0.03µs 4.1±0.03µs 0.00%
OptimalMerkleTree::set 987.4±10.80ns 989.0±8.95ns +0.16%

Copy link

Benchmark for a194f3d

Click to view benchmark
Test Base PR %
FullMerkleTree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::delete 864.5±35.74ns 889.8±11.54ns +2.93%
FullMerkleTree::get 3.5±0.08ns 3.4±0.07ns -2.86%
FullMerkleTree::get_empty_leaves_indices 7.2±0.15ns 7.2±0.13ns 0.00%
FullMerkleTree::get_subtree_root 3.8±0.08ns 3.7±0.11ns -2.63%
FullMerkleTree::override_range 1343.8±16.13ns 1370.4±24.15ns +1.98%
FullMerkleTree::set 863.7±12.31ns 888.4±9.48ns +2.86%
OptimalMerkleTree::compute_root 1006.9±12.03ns 1008.6±13.14ns +0.17%
OptimalMerkleTree::delete 1008.0±14.32ns 1020.6±20.39ns +1.25%
OptimalMerkleTree::get 22.5±0.60ns 22.5±0.25ns 0.00%
OptimalMerkleTree::get_empty_leaves_indices 7.2±0.05ns 7.5±0.10ns +4.17%
OptimalMerkleTree::get_subtree_root 24.0±0.35ns 24.0±0.31ns 0.00%
OptimalMerkleTree::override_range 4.1±0.04µs 4.2±0.15µs +2.44%
OptimalMerkleTree::set 1005.0±8.09ns 1019.7±10.18ns +1.46%

Copy link

Benchmark for 2a22ee6

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 13.9±0.12ms 13.9±0.11ms 0.00%
OptimalMerkleTree::::full_height_gen 586.6±6.45µs 580.1±4.96µs -1.11%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 368.7±3.71ns 369.4±4.28ns +0.19%
Pmtree::get_empty_leaves_indices 8.7±0.09ns 8.4±0.10ns -3.45%
Pmtree::get_subtree_root 508.7±3.72ns 512.5±6.82ns +0.75%
Pmtree::override_range 233.9±5.02µs 235.4±2.95µs +0.64%
Pmtree::set 54.7±0.77µs 54.5±0.56µs -0.37%
Pmtree:delete 54.7±0.47µs 54.5±0.40µs -0.37%
Set/FullMerkleTree::::set/1 561.4±6.27µs 557.5±2.55µs -0.69%
Set/FullMerkleTree::::set/10 5.6±0.01ms 5.6±0.03ms 0.00%
Set/FullMerkleTree::::set/100 56.3±0.26ms 56.0±0.11ms -0.53%
Set/FullMerkleTree::::set_range/1 561.2±9.58µs 559.9±6.47µs -0.23%
Set/FullMerkleTree::::set_range/10 763.1±6.68µs 761.6±9.34µs -0.20%
Set/FullMerkleTree::::set_range/100 3.3±0.01ms 3.3±0.01ms 0.00%
Set/OptimalMerkleTree::::set/1 561.9±5.89µs 560.5±5.07µs -0.25%
Set/OptimalMerkleTree::::set/10 5.6±0.02ms 5.6±0.02ms 0.00%
Set/OptimalMerkleTree::::set/100 56.4±0.22ms 56.1±0.15ms -0.53%
Set/OptimalMerkleTree::::set_range/1 560.9±6.16µs 558.3±2.89µs -0.46%
Set/OptimalMerkleTree::::set_range/10 5.6±0.02ms 5.6±0.01ms 0.00%
Set/OptimalMerkleTree::::set_range/100 56.3±0.31ms 56.0±0.18ms -0.53%
vk::vk_from_ark_serialized 1630.2±44.79ns 1640.2±12.63ns +0.61%
zkey::zkey_from_raw 3.4±0.01s 3.4±0.01s 0.00%

Copy link

Benchmark for a194f3d

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 14.2±0.12ms 14.0±0.09ms -1.41%
OptimalMerkleTree::::full_height_gen 583.4±7.55µs 581.7±4.18µs -0.29%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 369.5±3.65ns 367.1±4.81ns -0.65%
Pmtree::get_empty_leaves_indices 8.7±0.07ns 8.4±0.10ns -3.45%
Pmtree::get_subtree_root 506.8±6.16ns 511.2±7.02ns +0.87%
Pmtree::override_range 232.1±2.77µs 236.1±4.10µs +1.72%
Pmtree::set 55.0±0.61µs 54.5±0.98µs -0.91%
Pmtree:delete 54.9±0.55µs 54.6±0.59µs -0.55%
Set/FullMerkleTree::::set/1 565.4±5.64µs 559.8±5.88µs -0.99%
Set/FullMerkleTree::::set/10 5.6±0.01ms 5.6±0.04ms 0.00%
Set/FullMerkleTree::::set/100 56.4±0.17ms 55.9±0.07ms -0.89%
Set/FullMerkleTree::::set_range/1 561.8±4.27µs 562.3±19.07µs +0.09%
Set/FullMerkleTree::::set_range/10 770.1±5.89µs 763.6±14.25µs -0.84%
Set/FullMerkleTree::::set_range/100 3.4±0.01ms 3.3±0.01ms -2.94%
Set/OptimalMerkleTree::::set/1 582.9±6.40µs 561.2±10.28µs -3.72%
Set/OptimalMerkleTree::::set/10 5.9±0.03ms 5.6±0.06ms -5.08%
Set/OptimalMerkleTree::::set/100 56.6±0.19ms 56.1±0.69ms -0.88%
Set/OptimalMerkleTree::::set_range/1 579.7±5.28µs 563.2±5.48µs -2.85%
Set/OptimalMerkleTree::::set_range/10 5.8±0.01ms 5.6±0.07ms -3.45%
Set/OptimalMerkleTree::::set_range/100 56.6±0.15ms 56.4±0.21ms -0.35%
vk::vk_from_ark_serialized 1617.8±22.81ns 1595.1±8.37ns -1.40%
zkey::zkey_from_raw 3.4±0.01s 3.4±0.01s 0.00%

Copy link

Benchmark for 2a22ee6

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 14.0±0.10ms 14.1±0.10ms +0.71%
OptimalMerkleTree::::full_height_gen 586.0±13.20µs 584.9±9.25µs -0.19%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 367.0±5.04ns 365.0±4.68ns -0.54%
Pmtree::get_empty_leaves_indices 8.4±0.06ns 8.4±0.08ns 0.00%
Pmtree::get_subtree_root 511.9±7.01ns 514.9±5.40ns +0.59%
Pmtree::override_range 231.0±2.99µs 232.1±4.72µs +0.48%
Pmtree::set 54.5±0.36µs 54.7±0.49µs +0.37%
Pmtree:delete 54.6±0.54µs 55.1±0.68µs +0.92%
Set/FullMerkleTree::::set/1 561.4±4.44µs 563.5±5.43µs +0.37%
Set/FullMerkleTree::::set/10 5.6±0.04ms 5.6±0.02ms 0.00%
Set/FullMerkleTree::::set/100 56.4±0.74ms 56.3±0.16ms -0.18%
Set/FullMerkleTree::::set_range/1 561.6±3.66µs 561.5±3.50µs -0.02%
Set/FullMerkleTree::::set_range/10 766.0±3.89µs 766.2±5.44µs +0.03%
Set/FullMerkleTree::::set_range/100 3.3±0.01ms 3.3±0.01ms 0.00%
Set/OptimalMerkleTree::::set/1 564.2±5.58µs 561.8±2.81µs -0.43%
Set/OptimalMerkleTree::::set/10 5.6±0.02ms 5.6±0.02ms 0.00%
Set/OptimalMerkleTree::::set/100 56.4±0.16ms 56.4±0.42ms 0.00%
Set/OptimalMerkleTree::::set_range/1 568.1±28.13µs 563.1±3.18µs -0.88%
Set/OptimalMerkleTree::::set_range/10 5.6±0.02ms 5.6±0.05ms 0.00%
Set/OptimalMerkleTree::::set_range/100 56.4±0.14ms 56.4±0.23ms 0.00%
arkzkey::arkzkey_from_raw_compressed 341.1±0.36ms 335.9±0.51ms -1.52%
arkzkey::arkzkey_from_raw_uncompressed 6.0±0.01ms 6.0±0.03ms 0.00%
vk::vk_from_ark_serialized 1584.6±9.54ns 1645.7±7.19ns +3.86%
zkey::zkey_from_raw 3.4±0.00s 3.4±0.00s 0.00%

Copy link

Benchmark for a194f3d

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 14.2±0.13ms 14.1±0.11ms -0.70%
OptimalMerkleTree::::full_height_gen 582.2±9.88µs 583.7±3.60µs +0.26%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 369.0±4.97ns 370.0±2.86ns +0.27%
Pmtree::get_empty_leaves_indices 8.4±0.08ns 8.4±0.07ns 0.00%
Pmtree::get_subtree_root 509.8±4.54ns 514.0±6.21ns +0.82%
Pmtree::override_range 232.6±4.25µs 231.7±2.90µs -0.39%
Pmtree::set 54.4±0.50µs 54.9±0.80µs +0.92%
Pmtree:delete 54.4±0.51µs 54.9±0.46µs +0.92%
Set/FullMerkleTree::::set/1 564.7±19.21µs 562.1±11.22µs -0.46%
Set/FullMerkleTree::::set/10 5.6±0.02ms 5.6±0.09ms 0.00%
Set/FullMerkleTree::::set/100 56.2±0.12ms 56.2±0.14ms 0.00%
Set/FullMerkleTree::::set_range/1 560.6±4.62µs 562.7±7.52µs +0.37%
Set/FullMerkleTree::::set_range/10 764.7±4.39µs 765.0±3.50µs +0.04%
Set/FullMerkleTree::::set_range/100 3.3±0.01ms 3.3±0.01ms 0.00%
Set/OptimalMerkleTree::::set/1 563.9±6.13µs 562.8±4.82µs -0.20%
Set/OptimalMerkleTree::::set/10 5.6±0.02ms 5.6±0.01ms 0.00%
Set/OptimalMerkleTree::::set/100 56.3±0.10ms 56.3±0.13ms 0.00%
Set/OptimalMerkleTree::::set_range/1 561.6±6.28µs 565.0±2.75µs +0.61%
Set/OptimalMerkleTree::::set_range/10 5.6±0.03ms 5.7±0.01ms +1.79%
Set/OptimalMerkleTree::::set_range/100 56.4±0.08ms 56.4±0.13ms 0.00%
arkzkey::arkzkey_from_raw_compressed 341.3±0.74ms 335.9±0.39ms -1.58%
arkzkey::arkzkey_from_raw_uncompressed 6.0±0.01ms 6.0±0.02ms 0.00%
vk::vk_from_ark_serialized 1608.5±12.52ns 1585.9±11.84ns -1.41%
zkey::zkey_from_raw 3.4±0.00s 3.4±0.00s 0.00%

Copy link
Contributor

@tyshko-rostyslav tyshko-rostyslav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing critical, but I think it would be a good idea to fix a least some things I pointed out. If there is a rush another PR to fix it could be created and this one could be merged now.


let mut nodes = Vec::new();
let nodes_num = br.read_u64::<LittleEndian>()?;
for _ in 0..nodes_num {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a one-liner using collect would be more idiomatic

Copy link
Contributor Author

@AlekseiVambol AlekseiVambol Dec 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

UPDATE: Impossible to collect because of "read_message(&mut br)?;" cannot be within the map closure due to "?". Let's leave this as is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense.

Btw, do we know the estimate for the number of nodes? I mean that we know the size and it would be nice to allocate memory to the vector at once, instead of copying it every time we push it.

Like this:

let mut nodes = Vec::with_capacity(nodes_num as usize);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense.

Btw, do we know the estimate for the number of nodes? I mean that we know the size and it would be nice to allocate memory to the vector at once, instead of copying it every time we push it.

Like this:

let mut nodes = Vec::with_capacity(nodes_num as usize);

Agree. I will add this.

if bytes_read == 0 {
return Err(std::io::Error::new(
std::io::ErrorKind::UnexpectedEof,
"Unexpected EOF",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to have these literals by name, reuse them and put them in a different file. Even better would be a more holistic approach to error handling, but that could be topic of another PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need in this, because the iden3 code contains only 2 such literals, which are used only 3 times, and the original zerokit code uses the same approach to error handling.
изображение

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think that processing is necessary because, if you pay attention, all external functions that are called by rln have this handling and this one don't leave utils lib in this form

Moreover, as far as I can see you use unwrap in all calls, which is not very good either:

deserialize_witnesscalc_graph(std::io::Cursor::new(graph_data)).unwrap();

if bytes_read != ln {
return Err(std::io::Error::new(
std::io::ErrorKind::UnexpectedEof,
"Unexpected EOF",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

rln/src/public.rs Outdated Show resolved Hide resolved

// Find all nodes with the same value.
let mut value_map = HashMap::new();
for (i, &value) in values.iter().enumerate() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these for cycles below are not very idiomatic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cycle with HashMap does not need modifications, see the second part of https://stackoverflow.com/a/30441736 . The only loop in this function to be eliminated is the one at the line 596.

for (key, value) in input_list {
let (offset, len) = inputs_info[key];
if len != value.len() {
panic!("Invalid input length for {}", key);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the justification for a panic?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, we need to get the results back, not panic

Copy link
Contributor Author

@AlekseiVambol AlekseiVambol Dec 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

UPDATE: I have studied all 3 places, where panic! is used, and I think that these case are justified. It seems that these pieces of code panic in situations, which cannot happen with correctly written code and correctly generated execution graph regardless of the user's input. So the condition checks leading to these "panics" can be considered as some fundamental sanity checks.

The same is true regarding those unwraps that I have studied. By the way, the project contains 3 iden3 files with unwraps and 20 previous files with them. Thus, using these unwraps seems to be consistent with the code style.

In most cases the iden3 code uses returning Results, which is the evidence of their understanding the principles of using panic!.

Thus, there is no need in rewriting these panic! and unwrap fragments.

)),
Node::Input(_) => Err(NodeConstErr::InputSignal),
Node::MontConstant(_) => {
panic!("MontConstant should not be used here")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the justification for a panic here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*output = renumber[*output].unwrap();
}

eprintln!("Removed {removed} unused nodes");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a good idea to think about a more holistic approach to logging

Copy link
Contributor Author

@AlekseiVambol AlekseiVambol Dec 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess there is no need in these logging fragments, so I am going to remove them.

@AlekseiVambol
Copy link
Contributor Author

AlekseiVambol commented Dec 22, 2024

Nothing critical, but I think it would be a good idea to fix a least some things I pointed out. If there is a rush another PR to fix it could be created and this one could be merged now.

Thank you for reviewing! Almost all the fragments of the code you mentioned have been written by iden3 and can be found there: https://github.com/philsippl/circom-witness-rs . Thus, I think it is better to contact them regarding your remarks, and then the updated code from iden3 repository can be integrated. So I have responded to the comment regarding the part of code rewritten by me.

rln/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@seemenkina seemenkina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Agree about errors handling - no panics and unwrap, use `thiserror as in all code
  2. Fix clippy error
  3. Return wasm file into resources - rln_wasm right now depend on this file especially in tests. And also check that you don't remove functionality around rln-wasm

for (key, value) in input_list {
let (offset, len) = inputs_info[key];
if len != value.len() {
panic!("Invalid input length for {}", key);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, we need to get the results back, not panic

.collect();

let (nodes, signals, input_mapping): (Vec<Node>, Vec<usize>, InputSignalsInfo) =
deserialize_witnesscalc_graph(std::io::Cursor::new(graph_data)).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add error return, not unwrap

Copy link
Contributor Author

@AlekseiVambol AlekseiVambol Dec 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

See #273 (comment)

rln/src/iden3calc.rs Outdated Show resolved Hide resolved
rln/src/protocol.rs Show resolved Hide resolved
rln/src/public.rs Outdated Show resolved Hide resolved
@seemenkina
Copy link
Contributor

Thank you for reviewing! Almost all the fragments of the code you mentioned have been written by iden3 and can be found there: https://github.com/philsippl/circom-witness-rs . Thus, I think it is better to contact them regarding your remarks, and then the updated code from iden3 repository can be integrated. So I have responded to the comment regarding the part of code rewritten by me.

As for me, all remarks are on point and it's worth fixing them because they affect the general style of the code. Just because the code is taken from another source doesn't mean it can't be changed, especially since it's taken without pulling dependencies (by the way, why not?).

Copy link

Benchmark for 3aa142c

Click to view benchmark
Test Base PR %
FullMerkleTree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::delete 862.9±9.14ns 863.6±18.91ns +0.08%
FullMerkleTree::get 3.5±0.14ns 3.4±0.10ns -2.86%
FullMerkleTree::get_empty_leaves_indices 7.2±0.09ns 7.2±0.18ns 0.00%
FullMerkleTree::get_subtree_root 3.5±0.14ns 3.6±0.12ns +2.86%
FullMerkleTree::override_range 1332.8±14.73ns 1333.1±17.10ns +0.02%
FullMerkleTree::set 855.7±9.78ns 856.0±18.06ns +0.04%
OptimalMerkleTree::compute_root 996.1±10.13ns 999.8±12.56ns +0.37%
OptimalMerkleTree::delete 992.8±12.96ns 1008.7±54.49ns +1.60%
OptimalMerkleTree::get 22.6±0.22ns 22.9±0.38ns +1.33%
OptimalMerkleTree::get_empty_leaves_indices 7.2±0.09ns 7.2±0.17ns 0.00%
OptimalMerkleTree::get_subtree_root 24.0±0.34ns 24.0±0.32ns 0.00%
OptimalMerkleTree::override_range 4.1±0.04µs 4.1±0.04µs 0.00%
OptimalMerkleTree::set 990.6±12.90ns 988.5±10.35ns -0.21%

Copy link

Benchmark for a59fa6d

Click to view benchmark
Test Base PR %
FullMerkleTree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::delete 858.6±22.11ns 868.8±54.65ns +1.19%
FullMerkleTree::get 3.4±0.04ns 3.4±0.05ns 0.00%
FullMerkleTree::get_empty_leaves_indices 7.2±0.09ns 7.2±0.10ns 0.00%
FullMerkleTree::get_subtree_root 3.7±0.13ns 3.6±0.10ns -2.70%
FullMerkleTree::override_range 1347.8±17.26ns 1332.7±12.00ns -1.12%
FullMerkleTree::set 880.3±13.23ns 857.5±24.02ns -2.59%
OptimalMerkleTree::compute_root 1008.4±11.47ns 998.2±10.35ns -1.01%
OptimalMerkleTree::delete 1005.4±6.26ns 1011.0±109.08ns +0.56%
OptimalMerkleTree::get 22.6±0.25ns 23.0±0.21ns +1.77%
OptimalMerkleTree::get_empty_leaves_indices 7.2±0.07ns 7.2±0.16ns 0.00%
OptimalMerkleTree::get_subtree_root 24.0±0.27ns 23.9±0.22ns -0.42%
OptimalMerkleTree::override_range 4.1±0.10µs 4.1±0.12µs 0.00%
OptimalMerkleTree::set 1005.3±9.78ns 988.0±9.81ns -1.72%

Copy link

Benchmark for 3aa142c

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 14.2±0.47ms 13.9±0.19ms -2.11%
OptimalMerkleTree::::full_height_gen 587.8±6.34µs 581.9±8.40µs -1.00%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 366.4±4.22ns 371.2±6.07ns +1.31%
Pmtree::get_empty_leaves_indices 8.7±0.05ns 8.7±0.13ns 0.00%
Pmtree::get_subtree_root 505.6±5.39ns 534.9±6.27ns +5.80%
Pmtree::override_range 235.7±4.72µs 230.3±3.32µs -2.29%
Pmtree::set 54.5±0.55µs 54.7±0.45µs +0.37%
Pmtree:delete 54.7±0.41µs 54.7±0.63µs 0.00%
Set/FullMerkleTree::::set/1 562.4±6.03µs 558.7±7.48µs -0.66%
Set/FullMerkleTree::::set/10 5.6±0.02ms 5.6±0.01ms 0.00%
Set/FullMerkleTree::::set/100 56.2±0.07ms 56.1±0.29ms -0.18%
Set/FullMerkleTree::::set_range/1 562.1±6.21µs 561.3±2.75µs -0.14%
Set/FullMerkleTree::::set_range/10 763.7±7.89µs 763.0±4.36µs -0.09%
Set/FullMerkleTree::::set_range/100 3.3±0.04ms 3.3±0.01ms 0.00%
Set/OptimalMerkleTree::::set/1 572.7±9.28µs 566.1±23.12µs -1.15%
Set/OptimalMerkleTree::::set/10 5.6±0.00ms 5.6±0.05ms 0.00%
Set/OptimalMerkleTree::::set/100 56.4±0.23ms 56.1±0.19ms -0.53%
Set/OptimalMerkleTree::::set_range/1 563.0±6.74µs 563.2±5.56µs +0.04%
Set/OptimalMerkleTree::::set_range/10 5.6±0.02ms 5.6±0.02ms 0.00%
Set/OptimalMerkleTree::::set_range/100 56.4±0.25ms 56.3±0.77ms -0.18%
vk::vk_from_ark_serialized 1629.6±5.43ns 1601.2±13.29ns -1.74%
zkey::zkey_from_raw 3.4±0.01s 3.4±0.01s 0.00%

Copy link

Benchmark for a59fa6d

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 14.1±0.07ms 14.2±0.15ms +0.71%
OptimalMerkleTree::::full_height_gen 587.5±5.02µs 583.9±10.14µs -0.61%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 386.6±7.35ns 373.5±3.19ns -3.39%
Pmtree::get_empty_leaves_indices 8.7±0.24ns 8.7±0.10ns 0.00%
Pmtree::get_subtree_root 523.3±5.01ns 530.8±5.01ns +1.43%
Pmtree::override_range 235.4±6.09µs 232.1±5.15µs -1.40%
Pmtree::set 54.8±0.60µs 54.6±0.39µs -0.36%
Pmtree:delete 54.9±0.43µs 54.7±0.53µs -0.36%
Set/FullMerkleTree::::set/1 563.7±5.52µs 561.8±6.15µs -0.34%
Set/FullMerkleTree::::set/10 5.6±0.01ms 5.6±0.01ms 0.00%
Set/FullMerkleTree::::set/100 56.3±0.24ms 56.4±0.15ms +0.18%
Set/FullMerkleTree::::set_range/1 562.8±5.75µs 561.7±5.12µs -0.20%
Set/FullMerkleTree::::set_range/10 764.4±11.04µs 764.1±3.28µs -0.04%
Set/FullMerkleTree::::set_range/100 3.3±0.01ms 3.3±0.01ms 0.00%
Set/OptimalMerkleTree::::set/1 569.0±4.84µs 562.0±2.60µs -1.23%
Set/OptimalMerkleTree::::set/10 5.6±0.01ms 5.6±0.01ms 0.00%
Set/OptimalMerkleTree::::set/100 56.5±0.19ms 56.4±0.24ms -0.18%
Set/OptimalMerkleTree::::set_range/1 562.8±5.21µs 561.8±5.13µs -0.18%
Set/OptimalMerkleTree::::set_range/10 5.6±0.02ms 5.6±0.05ms 0.00%
Set/OptimalMerkleTree::::set_range/100 56.5±0.15ms 56.4±0.14ms -0.18%
vk::vk_from_ark_serialized 1618.7±5.84ns 1616.8±21.63ns -0.12%
zkey::zkey_from_raw 3.4±0.00s 3.4±0.00s 0.00%

Copy link

Benchmark for 3aa142c

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 14.1±0.10ms 14.3±0.69ms +1.42%
OptimalMerkleTree::::full_height_gen 586.7±16.05µs 583.5±8.25µs -0.55%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 365.3±5.58ns 359.7±4.41ns -1.53%
Pmtree::get_empty_leaves_indices 8.4±0.11ns 8.7±0.15ns +3.57%
Pmtree::get_subtree_root 508.7±6.63ns 504.9±4.79ns -0.75%
Pmtree::override_range 236.3±5.50µs 238.6±9.68µs +0.97%
Pmtree::set 54.5±0.56µs 54.6±0.33µs +0.18%
Pmtree:delete 54.6±0.38µs 54.7±0.50µs +0.18%
Set/FullMerkleTree::::set/1 562.4±13.75µs 558.9±2.95µs -0.62%
Set/FullMerkleTree::::set/10 5.6±0.08ms 5.6±0.09ms 0.00%
Set/FullMerkleTree::::set/100 56.3±0.17ms 56.0±0.84ms -0.53%
Set/FullMerkleTree::::set_range/1 562.1±4.52µs 559.7±4.63µs -0.43%
Set/FullMerkleTree::::set_range/10 764.8±3.93µs 759.4±2.66µs -0.71%
Set/FullMerkleTree::::set_range/100 3.3±0.01ms 3.3±0.01ms 0.00%
Set/OptimalMerkleTree::::set/1 563.8±6.75µs 559.1±4.08µs -0.83%
Set/OptimalMerkleTree::::set/10 5.6±0.04ms 5.6±0.02ms 0.00%
Set/OptimalMerkleTree::::set/100 56.7±1.46ms 56.5±0.34ms -0.35%
Set/OptimalMerkleTree::::set_range/1 565.4±6.25µs 562.7±16.34µs -0.48%
Set/OptimalMerkleTree::::set_range/10 5.6±0.02ms 5.6±0.01ms 0.00%
Set/OptimalMerkleTree::::set_range/100 56.4±0.18ms 56.6±0.41ms +0.35%
arkzkey::arkzkey_from_raw_compressed 341.5±0.87ms 340.3±0.78ms -0.35%
arkzkey::arkzkey_from_raw_uncompressed 6.1±0.02ms 6.1±0.02ms 0.00%
vk::vk_from_ark_serialized 1591.1±7.05ns 1580.0±8.29ns -0.70%
zkey::zkey_from_raw 3.4±0.01s 3.4±0.01s 0.00%

@tyshko-rostyslav
Copy link
Contributor

Nothing critical, but I think it would be a good idea to fix a least some things I pointed out. If there is a rush another PR to fix it could be created and this one could be merged now.

Thank you for reviewing! Almost all the fragments of the code you mentioned have been written by iden3 and can be found there: https://github.com/philsippl/circom-witness-rs . Thus, I think it is better to contact them regarding your remarks, and then the updated code from iden3 repository can be integrated. So I have responded to the comment regarding the part of code rewritten by me.

If we are copying any code as is from other repositories, I would suppose it is mandatory to put doc that specifies it, that would include links to files we are copying. There were issues in such occasions

Copy link

Benchmark for a59fa6d

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 14.3±0.11ms 14.2±0.10ms -0.70%
OptimalMerkleTree::::full_height_gen 585.2±7.91µs 581.5±5.90µs -0.63%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 374.5±2.79ns 357.7±7.63ns -4.49%
Pmtree::get_empty_leaves_indices 8.4±0.11ns 9.0±0.10ns +7.14%
Pmtree::get_subtree_root 524.2±8.48ns 502.1±7.16ns -4.22%
Pmtree::override_range 237.8±4.44µs 237.9±3.42µs +0.04%
Pmtree::set 54.5±0.83µs 54.5±0.41µs 0.00%
Pmtree:delete 54.5±0.52µs 55.0±0.85µs +0.92%
Set/FullMerkleTree::::set/1 562.7±5.61µs 558.8±6.07µs -0.69%
Set/FullMerkleTree::::set/10 5.6±0.02ms 5.6±0.02ms 0.00%
Set/FullMerkleTree::::set/100 56.6±1.24ms 55.9±0.11ms -1.24%
Set/FullMerkleTree::::set_range/1 564.2±6.41µs 559.0±4.53µs -0.92%
Set/FullMerkleTree::::set_range/10 766.9±6.49µs 759.9±6.37µs -0.91%
Set/FullMerkleTree::::set_range/100 3.3±0.00ms 3.3±0.01ms 0.00%
Set/OptimalMerkleTree::::set/1 563.5±4.13µs 559.4±4.56µs -0.73%
Set/OptimalMerkleTree::::set/10 5.6±0.03ms 5.6±0.01ms 0.00%
Set/OptimalMerkleTree::::set/100 56.1±0.23ms 56.1±0.13ms 0.00%
Set/OptimalMerkleTree::::set_range/1 560.3±6.38µs 558.9±4.87µs -0.25%
Set/OptimalMerkleTree::::set_range/10 5.6±0.12ms 5.6±0.01ms 0.00%
Set/OptimalMerkleTree::::set_range/100 56.3±0.22ms 56.0±0.18ms -0.53%
arkzkey::arkzkey_from_raw_compressed 341.4±0.73ms 340.5±0.55ms -0.26%
arkzkey::arkzkey_from_raw_uncompressed 6.6±0.01ms 6.0±0.02ms -9.09%
vk::vk_from_ark_serialized 1597.7±14.01ns 1585.2±33.48ns -0.78%
zkey::zkey_from_raw 3.4±0.00s 3.4±0.00s 0.00%

@AlekseiVambol
Copy link
Contributor Author

Thanks for participating in the first round of reviewing and welcome to the second!

@AlekseiVambol
Copy link
Contributor Author

Nothing critical, but I think it would be a good idea to fix a least some things I pointed out. If there is a rush another PR to fix it could be created and this one could be merged now.

Thank you for reviewing! Almost all the fragments of the code you mentioned have been written by iden3 and can be found there: https://github.com/philsippl/circom-witness-rs . Thus, I think it is better to contact them regarding your remarks, and then the updated code from iden3 repository can be integrated. So I have responded to the comment regarding the part of code rewritten by me.

If we are copying any code as is from other repositories, I would suppose it is mandatory to put doc that specifies it, that would include links to files we are copying. There were issues in such occasions

Thanks, Ekaterina and I support your idea. The corresponding changes have been included into the latest commit.

Copy link

Benchmark for 4f9d8d4

Click to view benchmark
Test Base PR %
FullMerkleTree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::delete 868.5±34.54ns 876.5±20.85ns +0.92%
FullMerkleTree::get 3.4±0.04ns 3.4±0.02ns 0.00%
FullMerkleTree::get_empty_leaves_indices 7.2±0.18ns 7.2±0.12ns 0.00%
FullMerkleTree::get_subtree_root 3.6±0.14ns 3.6±0.07ns 0.00%
FullMerkleTree::override_range 1338.0±19.21ns 1332.9±18.81ns -0.38%
FullMerkleTree::set 855.8±8.02ns 869.1±11.06ns +1.55%
OptimalMerkleTree::compute_root 995.8±10.08ns 1031.8±11.21ns +3.62%
OptimalMerkleTree::delete 993.9±17.53ns 1005.2±7.84ns +1.14%
OptimalMerkleTree::get 22.6±0.24ns 23.0±0.23ns +1.77%
OptimalMerkleTree::get_empty_leaves_indices 7.2±0.06ns 7.2±0.07ns 0.00%
OptimalMerkleTree::get_subtree_root 24.0±0.46ns 24.0±0.32ns 0.00%
OptimalMerkleTree::override_range 4.1±0.03µs 4.1±0.03µs 0.00%
OptimalMerkleTree::set 989.3±6.75ns 1009.6±25.80ns +2.05%

Copy link

Benchmark for 4f9d8d4

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 13.8±0.11ms 13.9±0.09ms +0.72%
OptimalMerkleTree::::full_height_gen 582.9±6.04µs 584.8±7.82µs +0.33%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 368.8±5.78ns 374.0±4.99ns +1.41%
Pmtree::get_empty_leaves_indices 8.7±0.12ns 8.7±0.12ns 0.00%
Pmtree::get_subtree_root 518.6±51.36ns 530.2±5.89ns +2.24%
Pmtree::override_range 233.2±7.86µs 229.9±3.09µs -1.42%
Pmtree::set 54.7±0.50µs 54.9±0.94µs +0.37%
Pmtree:delete 54.7±0.60µs 55.0±0.49µs +0.55%
Set/FullMerkleTree::::set/1 562.8±4.55µs 563.2±5.13µs +0.07%
Set/FullMerkleTree::::set/10 5.6±0.01ms 5.6±0.05ms 0.00%
Set/FullMerkleTree::::set/100 56.4±0.48ms 56.0±0.09ms -0.71%
Set/FullMerkleTree::::set_range/1 561.9±3.43µs 562.7±5.18µs +0.14%
Set/FullMerkleTree::::set_range/10 763.8±6.35µs 766.0±5.95µs +0.29%
Set/FullMerkleTree::::set_range/100 3.3±0.03ms 3.3±0.04ms 0.00%
Set/OptimalMerkleTree::::set/1 562.3±3.03µs 562.6±4.06µs +0.05%
Set/OptimalMerkleTree::::set/10 5.6±0.01ms 5.6±0.01ms 0.00%
Set/OptimalMerkleTree::::set/100 56.4±0.14ms 56.4±0.12ms 0.00%
Set/OptimalMerkleTree::::set_range/1 562.4±2.69µs 562.1±1.90µs -0.05%
Set/OptimalMerkleTree::::set_range/10 5.6±0.01ms 5.6±0.01ms 0.00%
Set/OptimalMerkleTree::::set_range/100 56.4±0.10ms 56.4±0.12ms 0.00%
vk::vk_from_ark_serialized 1614.2±5.34ns 1593.1±9.69ns -1.31%
zkey::zkey_from_raw 3.4±0.00s 3.4±0.01s 0.00%

Copy link

Benchmark for 3f36961

Click to view benchmark
Test Base PR %
FullMerkleTree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::delete 867.0±16.21ns 871.6±12.96ns +0.53%
FullMerkleTree::get 3.5±0.08ns 3.4±0.06ns -2.86%
FullMerkleTree::get_empty_leaves_indices 7.2±0.09ns 7.2±0.07ns 0.00%
FullMerkleTree::get_subtree_root 3.5±0.10ns 3.5±0.10ns 0.00%
FullMerkleTree::override_range 1346.5±10.75ns 1334.5±19.62ns -0.89%
FullMerkleTree::set 857.0±13.10ns 857.1±19.39ns +0.01%
OptimalMerkleTree::compute_root 995.5±9.40ns 1028.1±17.30ns +3.27%
OptimalMerkleTree::delete 997.1±23.90ns 994.8±22.23ns -0.23%
OptimalMerkleTree::get 22.6±0.24ns 23.0±0.44ns +1.77%
OptimalMerkleTree::get_empty_leaves_indices 7.2±0.08ns 7.2±0.10ns 0.00%
OptimalMerkleTree::get_subtree_root 23.9±0.27ns 24.1±0.52ns +0.84%
OptimalMerkleTree::override_range 4.1±0.05µs 4.1±0.15µs 0.00%
OptimalMerkleTree::set 989.6±11.13ns 997.4±50.90ns +0.79%

Copy link

Benchmark for 4f9d8d4

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 13.9±0.05ms 13.9±0.04ms 0.00%
OptimalMerkleTree::::full_height_gen 582.4±5.70µs 580.4±6.67µs -0.34%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 373.2±6.32ns 360.8±3.57ns -3.32%
Pmtree::get_empty_leaves_indices 8.4±0.06ns 8.7±0.08ns +3.57%
Pmtree::get_subtree_root 511.7±7.27ns 505.3±4.65ns -1.25%
Pmtree::override_range 232.7±7.25µs 232.4±3.47µs -0.13%
Pmtree::set 54.4±0.38µs 54.4±0.86µs 0.00%
Pmtree:delete 54.5±0.51µs 54.5±0.81µs 0.00%
Set/FullMerkleTree::::set/1 562.6±6.27µs 559.3±5.94µs -0.59%
Set/FullMerkleTree::::set/10 5.6±0.01ms 5.6±0.07ms 0.00%
Set/FullMerkleTree::::set/100 56.2±0.15ms 56.3±0.10ms +0.18%
Set/FullMerkleTree::::set_range/1 562.3±5.33µs 561.4±8.57µs -0.16%
Set/FullMerkleTree::::set_range/10 762.9±3.47µs 761.1±3.23µs -0.24%
Set/FullMerkleTree::::set_range/100 3.3±0.01ms 3.3±0.02ms 0.00%
Set/OptimalMerkleTree::::set/1 562.3±3.37µs 559.9±7.08µs -0.43%
Set/OptimalMerkleTree::::set/10 5.6±0.04ms 5.6±0.01ms 0.00%
Set/OptimalMerkleTree::::set/100 56.2±0.13ms 56.2±0.10ms 0.00%
Set/OptimalMerkleTree::::set_range/1 561.7±3.00µs 561.1±6.31µs -0.11%
Set/OptimalMerkleTree::::set_range/10 5.6±0.01ms 5.6±0.02ms 0.00%
Set/OptimalMerkleTree::::set_range/100 56.2±0.13ms 56.1±0.12ms -0.18%
arkzkey::arkzkey_from_raw_compressed 341.1±1.07ms 340.0±0.32ms -0.32%
arkzkey::arkzkey_from_raw_uncompressed 6.2±0.04ms 6.0±0.02ms -3.23%
vk::vk_from_ark_serialized 1596.1±5.79ns 1588.5±28.58ns -0.48%
zkey::zkey_from_raw 3.4±0.00s 3.4±0.00s 0.00%

Copy link

Benchmark for 3f36961

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 13.9±0.06ms 14.0±0.09ms +0.72%
OptimalMerkleTree::::full_height_gen 583.0±4.94µs 583.0±7.45µs 0.00%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 372.8±4.84ns 369.9±2.43ns -0.78%
Pmtree::get_empty_leaves_indices 8.7±0.07ns 8.7±0.07ns 0.00%
Pmtree::get_subtree_root 511.9±4.95ns 534.5±6.72ns +4.41%
Pmtree::override_range 234.0±6.39µs 231.6±3.87µs -1.03%
Pmtree::set 54.7±0.82µs 54.6±0.34µs -0.18%
Pmtree:delete 54.7±0.66µs 54.7±0.37µs 0.00%
Set/FullMerkleTree::::set/1 561.4±7.74µs 558.7±3.66µs -0.48%
Set/FullMerkleTree::::set/10 5.6±0.02ms 5.6±0.02ms 0.00%
Set/FullMerkleTree::::set/100 56.5±0.15ms 56.1±0.16ms -0.71%
Set/FullMerkleTree::::set_range/1 561.9±5.28µs 562.5±6.48µs +0.11%
Set/FullMerkleTree::::set_range/10 764.4±5.88µs 764.6±6.53µs +0.03%
Set/FullMerkleTree::::set_range/100 3.3±0.01ms 3.3±0.01ms 0.00%
Set/OptimalMerkleTree::::set/1 561.9±4.77µs 562.7±4.17µs +0.14%
Set/OptimalMerkleTree::::set/10 5.7±0.02ms 5.6±0.01ms -1.75%
Set/OptimalMerkleTree::::set/100 56.7±0.27ms 56.3±0.12ms -0.71%
Set/OptimalMerkleTree::::set_range/1 566.3±12.66µs 563.2±5.49µs -0.55%
Set/OptimalMerkleTree::::set_range/10 5.6±0.02ms 5.7±0.21ms +1.79%
Set/OptimalMerkleTree::::set_range/100 56.7±0.14ms 56.3±0.28ms -0.71%
vk::vk_from_ark_serialized 1627.3±5.30ns 1617.8±34.15ns -0.58%
zkey::zkey_from_raw 3.4±0.01s 3.4±0.01s 0.00%

Copy link

Benchmark for 3f36961

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 14.0±0.08ms 14.0±0.12ms 0.00%
OptimalMerkleTree::::full_height_gen 583.1±8.69µs 583.4±9.97µs +0.05%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 375.4±5.54ns 365.5±5.67ns -2.64%
Pmtree::get_empty_leaves_indices 8.4±0.07ns 8.4±0.06ns 0.00%
Pmtree::get_subtree_root 520.5±7.15ns 502.0±5.96ns -3.55%
Pmtree::override_range 235.8±5.83µs 233.8±3.70µs -0.85%
Pmtree::set 54.5±0.61µs 54.6±1.74µs +0.18%
Pmtree:delete 54.6±0.51µs 54.6±0.42µs 0.00%
Set/FullMerkleTree::::set/1 559.8±4.53µs 559.3±3.73µs -0.09%
Set/FullMerkleTree::::set/10 5.6±0.13ms 5.6±0.06ms 0.00%
Set/FullMerkleTree::::set/100 56.1±0.17ms 56.0±0.16ms -0.18%
Set/FullMerkleTree::::set_range/1 558.1±5.01µs 559.3±2.81µs +0.22%
Set/FullMerkleTree::::set_range/10 764.8±3.81µs 761.6±2.62µs -0.42%
Set/FullMerkleTree::::set_range/100 3.3±0.01ms 3.3±0.00ms 0.00%
Set/OptimalMerkleTree::::set/1 563.2±4.68µs 560.6±4.98µs -0.46%
Set/OptimalMerkleTree::::set/10 5.6±0.01ms 5.6±0.01ms 0.00%
Set/OptimalMerkleTree::::set/100 56.5±0.38ms 56.1±0.15ms -0.71%
Set/OptimalMerkleTree::::set_range/1 563.7±6.18µs 560.4±5.19µs -0.59%
Set/OptimalMerkleTree::::set_range/10 5.6±0.02ms 5.6±0.01ms 0.00%
Set/OptimalMerkleTree::::set_range/100 56.3±0.42ms 56.1±0.16ms -0.36%
arkzkey::arkzkey_from_raw_compressed 341.1±0.47ms 340.3±0.84ms -0.23%
arkzkey::arkzkey_from_raw_uncompressed 6.0±0.02ms 6.0±0.01ms 0.00%
vk::vk_from_ark_serialized 1592.4±7.05ns 1683.4±13.83ns +5.71%
zkey::zkey_from_raw 3.4±0.00s 3.4±0.00s 0.00%

@AlekseiVambol AlekseiVambol merged commit e39f156 into master Dec 25, 2024
15 checks passed
@AlekseiVambol AlekseiVambol deleted the iden3witnesscalc branch December 25, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants