Skip to content

Commit 46c9d3e

Browse files
committed
refactor(stm): removed new tests
1 parent f1c32a5 commit 46c9d3e

3 files changed

Lines changed: 1 addition & 76 deletions

File tree

.config/nextest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ path = "tests-result.junit.xml"
2020
report-name = "mithril-tests"
2121

2222
[[profile.ci.overrides]]
23-
filter = 'test(#proof_system::halo2_snark::*slow::*) or test(#proof_system::ivc_halo2_snark::*slow::*)'
23+
filter = 'test(#proof_system::ivc_halo2_snark::*slow::*)'
2424
test-group = "ivc-snark-sequential"

mithril-stm/src/proof_system/halo2_snark/setup.rs

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -249,45 +249,4 @@ mod test {
249249
);
250250
}
251251
}
252-
253-
mod slow {
254-
use std::time::{Duration, Instant};
255-
256-
use super::*;
257-
258-
#[test]
259-
fn build_for_test_hits_the_cache_on_a_warm_second_run() {
260-
// Distinct from every other test's (parameters, depth) so this test owns its shared
261-
// cache slot and is never muddied by another test's cached artifacts.
262-
let params = Parameters {
263-
k: 4,
264-
m: 11,
265-
phi_f: 0.33,
266-
};
267-
let depth = 5;
268-
269-
let t0 = Instant::now();
270-
let setup1 = SnarkProverSetup::build_for_test(&params, depth)
271-
.expect("first build_for_test call should succeed");
272-
let first_call_elapsed = t0.elapsed();
273-
274-
let t1 = Instant::now();
275-
let setup2 = SnarkProverSetup::build_for_test(&params, depth)
276-
.expect("second build_for_test call should succeed");
277-
let second_call_elapsed = t1.elapsed();
278-
279-
let vk_bytes1 = setup1.verification_key.to_bytes_vec().unwrap();
280-
let vk_bytes2 = setup2.verification_key.to_bytes_vec().unwrap();
281-
assert_eq!(
282-
vk_bytes1, vk_bytes2,
283-
"a warm second call must return the same verification key as the first"
284-
);
285-
286-
assert!(
287-
second_call_elapsed < Duration::from_secs(5),
288-
"a warm second call must reuse the cached SRS and keys instead of regenerating \
289-
them; first call took {first_call_elapsed:?}, second call took {second_call_elapsed:?}"
290-
);
291-
}
292-
}
293252
}

mithril-stm/src/proof_system/ivc_halo2_snark/prover_setup.rs

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -277,40 +277,6 @@ mod tests {
277277
}
278278
}
279279

280-
#[test]
281-
fn build_for_test_hits_the_cache_on_a_warm_second_run() {
282-
// Distinct from every other test's (parameters, depth) so this test owns its shared
283-
// cache slot and is never muddied by another test's cached artifacts.
284-
let parameters = Parameters {
285-
k: 4,
286-
m: 11,
287-
phi_f: 0.33,
288-
};
289-
let merkle_tree_depth = 5;
290-
291-
let t0 = std::time::Instant::now();
292-
let setup1 = IvcSnarkProverSetup::build_for_test(&parameters, merkle_tree_depth)
293-
.expect("first build_for_test call should succeed");
294-
let first_call_elapsed = t0.elapsed();
295-
296-
let t1 = std::time::Instant::now();
297-
let setup2 = IvcSnarkProverSetup::build_for_test(&parameters, merkle_tree_depth)
298-
.expect("second build_for_test call should succeed");
299-
let second_call_elapsed = t1.elapsed();
300-
301-
assert_eq!(
302-
setup1.ivc_verifying_key.verifying_key().transcript_repr(),
303-
setup2.ivc_verifying_key.verifying_key().transcript_repr(),
304-
"a warm second call must return the same IVC verifying key as the first"
305-
);
306-
307-
assert!(
308-
second_call_elapsed < std::time::Duration::from_secs(10),
309-
"a warm second call must reuse the cached SRS and keys instead of regenerating \
310-
them; first call took {first_call_elapsed:?}, second call took {second_call_elapsed:?}"
311-
);
312-
}
313-
314280
// Requests an oversized unsafe SRS that shares the production SRS's tau, so the keys and stored
315281
// SRS must both downsize to `RECURSIVE_CIRCUIT_DEGREE` to reproduce the embedded production
316282
// assets exactly.

0 commit comments

Comments
 (0)