From 781d57ca35c5cf3d8f47362ad2ce34ce83d4cdea Mon Sep 17 00:00:00 2001 From: VolodymyrBg Date: Fri, 10 Oct 2025 18:19:23 +0300 Subject: [PATCH] fix: PartitionOptions hash_rate upper bound to match u8 storage --- air/src/options.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/air/src/options.rs b/air/src/options.rs index 8a2da634f..ffb9d55aa 100644 --- a/air/src/options.rs +++ b/air/src/options.rs @@ -189,7 +189,7 @@ impl ProofOptions { /// # Panics /// Panics if: /// - `num_partitions` is zero or greater than 16. - /// - `hash_rate` is zero or greater than 256. + /// - `hash_rate` is zero or greater than 255. pub const fn with_partitions( mut self, num_partitions: usize, @@ -414,7 +414,7 @@ impl PartitionOptions { assert!(num_partitions <= 16, "number of partitions must be smaller than or equal to 16"); assert!(hash_rate >= 1, "hash rate must be greater than or equal to 1"); - assert!(hash_rate <= 256, "hash rate must be smaller than or equal to 256"); + assert!(hash_rate <= 255, "hash rate must be smaller than or equal to 255"); Self { num_partitions: num_partitions as u8,