From b6a6d8da6042cf6c120d80fd2ce18d7fd11f1136 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Wed, 21 Aug 2024 11:57:06 +0200 Subject: [PATCH] Generic domain size --- src/ring.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ring.rs b/src/ring.rs index e5a629c..f686dd9 100644 --- a/src/ring.rs +++ b/src/ring.rs @@ -151,10 +151,10 @@ where piop_params: PiopParams, } +// Evaluation domain size required for the given ring size. #[inline(always)] -fn domain_size(ring_size: usize) -> usize { - const RING_DOMAIN_OVERHEAD: usize = 257; - 1 << ark_std::log2(ring_size + RING_DOMAIN_OVERHEAD) +fn domain_size(ring_size: usize) -> usize { + 1 << ark_std::log2(ring_size + ScalarField::::MODULUS_BIT_SIZE as usize + 4) } #[allow(private_bounds)]