Skip to content
Snippets Groups Projects
Verified Commit 37a2a7e2 authored by STEVAN Antoine's avatar STEVAN Antoine :crab:
Browse files

don't try to compress with validation

that's useless.

the commit also modifies the plot script accordingly.
parent f7ce05c3
No related branches found
No related tags found
No related merge requests found
...@@ -142,10 +142,8 @@ def plot_setup(data: Data, save: bool = False): ...@@ -142,10 +142,8 @@ def plot_setup(data: Data, save: bool = False):
axs[2].legend() axs[2].legend()
axs[2].grid() axs[2].grid()
plot(data, "serialized size with no compression and no validation", "uncompressed unvalidated", "red", False, axs[3]) plot(data, "serialized size with no compression", "uncompressed", "orange", False, axs[3])
plot(data, "serialized size with compression and no validation", "compressed unvalidated", "orange", False, axs[3]) plot(data, "serialized size with compression", "compressed", "blue", False, axs[3])
plot(data, "serialized size with no compression and validation", "uncompressed validated", "blue", False, axs[3])
plot(data, "serialized size with compression and validation", "compressed validated", "green", False, axs[3])
axs[3].set_title("size") axs[3].set_title("size")
axs[3].set_xlabel("degree") axs[3].set_xlabel("degree")
axs[3].set_ylabel("size (in kb)") axs[3].set_ylabel("size (in kb)")
......
...@@ -2,7 +2,7 @@ use ark_bls12_381::{Fr, G1Projective}; ...@@ -2,7 +2,7 @@ use ark_bls12_381::{Fr, G1Projective};
use ark_ec::CurveGroup; use ark_ec::CurveGroup;
use ark_ff::PrimeField; use ark_ff::PrimeField;
use ark_poly::{univariate::DensePolynomial, DenseUVPolynomial}; use ark_poly::{univariate::DensePolynomial, DenseUVPolynomial};
use ark_serialize::{CanonicalSerialize, Compress, Validate}; use ark_serialize::{CanonicalSerialize, Compress};
use ark_std::ops::Div; use ark_std::ops::Div;
use komodo::zk; use komodo::zk;
...@@ -20,22 +20,13 @@ where ...@@ -20,22 +20,13 @@ where
let setup = zk::setup::<_, F, G>(degree, rng).unwrap(); let setup = zk::setup::<_, F, G>(degree, rng).unwrap();
for (compress, validate) in [ for compress in [Compress::Yes, Compress::No] {
(Compress::Yes, Validate::Yes),
(Compress::Yes, Validate::No),
(Compress::No, Validate::Yes),
(Compress::No, Validate::No),
] {
println!( println!(
r#"{{"reason": "benchmark-complete", "id": "serialized size with {} and {} {} on {}", "mean": {}}}"#, r#"{{"reason": "benchmark-complete", "id": "serialized size with {} {} on {}", "mean": {}}}"#,
match compress { match compress {
Compress::Yes => "compression", Compress::Yes => "compression",
Compress::No => "no compression", Compress::No => "no compression",
}, },
match validate {
Validate::Yes => "validation",
Validate::No => "no validation",
},
degree, degree,
std::any::type_name::<F>(), std::any::type_name::<F>(),
setup.serialized_size(compress), setup.serialized_size(compress),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment