Skip to content

Commit b236705

Browse files
authored
Merge pull request #212 from WizardOfMenlo/recmo/rs-commit
Interleaved Reed-Solomon commitment protocol
2 parents b23b297 + 776b24e commit b236705

59 files changed

Lines changed: 3118 additions & 2242 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 97 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ spongefish = { git = "https://github.com/arkworks-rs/spongefish", features = ["a
4646
rayon = { version = "1.10", optional = true }
4747
thiserror = "2.0"
4848
itertools = "0.14"
49-
tracing = { version = "0.1", optional = true }
49+
tracing = { version = "0.1", features = ["attributes"], optional = true }
5050
hex = "0.4"
5151
static_assertions = "1.1.0"
5252
ciborium = "0.2"
@@ -56,17 +56,21 @@ zerocopy = "0.8.33"
5656
hex-literal = "0.4.1"
5757
const-oid = "0.9.6"
5858
arrayvec = "0.7.6"
59+
derive-where = { version = "1.6.0", features = ["safe"] }
5960

6061
[dev-dependencies]
6162
proptest = "1.0"
6263
serde_json = "1.0"
6364
divan = { version = "4.2", package = "codspeed-divan-compat" }
65+
tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }
6466

6567
[profile.release]
6668
debug = true
6769

6870
[features]
6971
default = ["parallel"]
72+
# Verifier panics instead of returning errors. Useful for debuging.
73+
verifier_panics = []
7074
parallel = [
7175
"dep:rayon",
7276
"ark-poly/parallel",

benches/expand_from_coeff.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use divan::{black_box, AllocProfiler, Bencher};
2-
use whir::{crypto::fields::Field64, ntt};
2+
use whir::algebra::{fields::Field64, ntt};
33

44
#[global_allocator]
55
static ALLOC: AllocProfiler = AllocProfiler::system();
@@ -31,7 +31,11 @@ fn interleaved_rs_encode(bencher: Bencher, case: &(u32, usize, usize)) {
3131
(coeffs, expansion, coset_sz)
3232
})
3333
.bench_values(|(coeffs, expansion, coset_sz)| {
34-
black_box(ntt::interleaved_rs_encode(&coeffs, expansion, coset_sz))
34+
black_box(ntt::interleaved_rs_encode(
35+
&coeffs,
36+
expansion,
37+
1 << coset_sz,
38+
))
3539
});
3640
}
3741

benches/sumcheck.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
use ark_ff::fields::Field;
22
use divan::{black_box, AllocProfiler, Bencher};
33
use whir::{
4-
crypto::fields::Field64 as F,
5-
poly_utils::{coeffs::CoefficientList, multilinear::MultilinearPoint},
4+
algebra::{
5+
fields::Field64 as F,
6+
poly_utils::{coeffs::CoefficientList, multilinear::MultilinearPoint},
7+
},
68
protocols::sumcheck::SumcheckSingle,
79
whir::statement::{Statement, Weights},
810
};

src/domain.rs renamed to src/algebra/domain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ mod tests {
191191
use ark_ff::Field;
192192

193193
use super::*;
194-
use crate::crypto::fields::{Field64, Field64_2};
194+
use crate::algebra::fields::{Field64, Field64_2};
195195

196196
type F = Field64;
197197
type EF2 = Field64_2;

0 commit comments

Comments
 (0)