From d3fc1ba159bf6e9c1d3d394f7d80dc6165c5846d Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Wed, 7 Oct 2026 08:00:19 +0000 Subject: [PATCH] fin-proof: the inclusive two-thirds test over a divisible window; the switch in the fast-time file Co-Authored-By: Claude Fable 5.1 --- infra/fast-time/override-60x.json | 1 + proving/igneum-prove/fin/tests/harness.rs | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/infra/fast-time/override-60x.json b/infra/fast-time/override-60x.json index f232111df..326ab131b 100644 --- a/infra/fast-time/override-60x.json +++ b/infra/fast-time/override-60x.json @@ -58,6 +58,7 @@ "program_class_v4_activation_daa": 18446744073709551615, "program_class_v4_signal_window_daa": 120, "proving_v1_fresh_rule_daa": 18446744073709551615, + "finality_in_proof_activation_daa": 18446744073709551615, "exec_restart_number": 18446744073709551615, "exec_restart_hash": "", "exec_restart_trust_daa": 18446744073709551615, diff --git a/proving/igneum-prove/fin/tests/harness.rs b/proving/igneum-prove/fin/tests/harness.rs index 5af2e6b79..90e371723 100644 --- a/proving/igneum-prove/fin/tests/harness.rs +++ b/proving/igneum-prove/fin/tests/harness.rs @@ -292,8 +292,13 @@ fn known_failed_first_todays_light_client_takes_the_voter_list_from_a_node_and_t #[test] fn two_thirds_is_inclusive_and_under_it_is_refused() { - // six equal keys: 4 of 6 locks, 3 of 6 does not (spec 3.10 Q3's unit test, here inside the proof) - let mut sim = Sim::new(params(), &["a", "b", "c", "d", "e", "f"]); + // six equal keys over a 240-block window (40 blocks each): 4 of 6 is exactly two thirds and locks, 3 of 6 does + // not (spec 3.10 Q3's unit test, here inside the proof) + let mut p = params(); + p.weight_window = 240; + p.min_daa = 240; + p.equivocation_ban = 240; + let mut sim = Sim::new(p, &["a", "b", "c", "d", "e", "f"]); let mut w = FoldWitness::default(); w.reveals = (0..6).map(|i| reveal(&sim.keys[i])).collect(); sim.mine(0, &[], w).unwrap(); @@ -301,6 +306,8 @@ fn two_thirds_is_inclusive_and_under_it_is_refused() { sim.mine((n % 6) as usize, &[], FoldWitness::default()).unwrap(); } let cp = 240u64; + let (_, total) = voters_at(&sim.tables[&cp], cp, sim.params.dust); + assert_eq!(total, 240); let three = sim.certificate(8, cp, &[0, 1, 2]); let mut w = FoldWitness::default(); w.certificates.push(three);