Skip to content

Commit

Permalink
feat: Compute L0 denominators with fft
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnevadoc committed Aug 29, 2024
1 parent c73d85d commit 366912b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions halo2_backend/src/plonk/keygen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ where
}

// Compute fixeds

let fixed_polys: Vec<_> = circuit
.preprocessing
.fixed
Expand Down Expand Up @@ -161,11 +160,16 @@ where
};

// Compute denominators.
let mut acc = zeta;
l0.iter_mut().for_each(|e| {
*e = acc - one;
acc *= w;
});
// (X-1) in {z, zw, zw^2,... zw^(extended_n)} equals
// (zX-1) in {1, w, ... w^{extended_n} wich can be computed with fft.
l0[0] = -one;
l0[1] = zeta;
halo2curves::fft::best_fft(
&mut l0,
vk.domain.get_extended_omega(),
vk.domain.extended_k(),
);

l0.batch_invert();

// Compute numinators.
Expand Down

0 comments on commit 366912b

Please sign in to comment.