diff --git a/Cargo.lock b/Cargo.lock index 4a947d3469e..976f5bc2ba8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12145,8 +12145,6 @@ dependencies = [ "ethnum", "futures", "indexmap 2.9.0", - "num-bigint 0.4.6", - "num-integer", "pretty_assertions", "rand 0.8.5", "rand_distr", @@ -12187,6 +12185,7 @@ dependencies = [ "cairo-lang-starknet-classes", "cairo-vm", "derive_more 0.99.18", + "ethnum", "indexmap 2.9.0", "indoc 2.0.5", "log", diff --git a/crates/starknet_committer_and_os_cli/Cargo.toml b/crates/starknet_committer_and_os_cli/Cargo.toml index f6669b6a326..bb13b86ff90 100644 --- a/crates/starknet_committer_and_os_cli/Cargo.toml +++ b/crates/starknet_committer_and_os_cli/Cargo.toml @@ -28,10 +28,6 @@ cairo-vm = { workspace = true, features = [ "cairo-0-data-availability-hints", "cairo-0-secp-hints", ] } -# Should be moved under `testing` feature, when it exists. -num-bigint = { workspace = true, features = ["rand"] } -# Should be moved under `testing` feature, when it exists. -num-integer.workspace = true clap = { workspace = true, features = ["cargo", "derive"] } derive_more.workspace = true ethnum.workspace = true diff --git a/crates/starknet_committer_and_os_cli/src/os_cli/tests.rs b/crates/starknet_committer_and_os_cli/src/os_cli/tests.rs index c84899a8a06..4ed9c7728af 100644 --- a/crates/starknet_committer_and_os_cli/src/os_cli/tests.rs +++ b/crates/starknet_committer_and_os_cli/src/os_cli/tests.rs @@ -1,5 +1,2 @@ -pub mod aliases; -pub mod bls_field; pub mod python_tests; pub mod types; -pub mod utils; diff --git a/crates/starknet_committer_and_os_cli/src/os_cli/tests/python_tests.rs b/crates/starknet_committer_and_os_cli/src/os_cli/tests/python_tests.rs index b7006268ada..c4c4938797e 100644 --- a/crates/starknet_committer_and_os_cli/src/os_cli/tests/python_tests.rs +++ b/crates/starknet_committer_and_os_cli/src/os_cli/tests/python_tests.rs @@ -3,15 +3,11 @@ use starknet_os::test_utils::errors::OsSpecificTestError; use starknet_types_core::felt::Felt; use crate::os_cli::commands::{validate_os_input, OsCliInput}; -use crate::os_cli::tests::aliases::aliases_test; -use crate::os_cli::tests::bls_field::test_bls_field; use crate::os_cli::tests::types::{OsPythonTestError, OsPythonTestResult}; use crate::shared_utils::types::{PythonTestError, PythonTestRunner}; // Enum representing different Python tests. pub enum OsPythonTestRunner { - AliasesTest, - BlsFieldTest, InputDeserialization, EncodeFelts, } @@ -22,8 +18,6 @@ impl TryFrom for OsPythonTestRunner { fn try_from(value: String) -> Result { match value.as_str() { - "aliases_test" => Ok(Self::AliasesTest), - "bls_field_test" => Ok(Self::BlsFieldTest), "input_deserialization" => Ok(Self::InputDeserialization), "encode_felts" => Ok(Self::EncodeFelts), _ => Err(PythonTestError::UnknownTestName(value)), @@ -36,8 +30,6 @@ impl PythonTestRunner for OsPythonTestRunner { #[allow(clippy::result_large_err)] async fn run(&self, input: Option<&str>) -> OsPythonTestResult { match self { - Self::AliasesTest => aliases_test(), - Self::BlsFieldTest => test_bls_field(), Self::InputDeserialization => input_deserialization(Self::non_optional_input(input)?), Self::EncodeFelts => { let felts: Vec = serde_json::from_str(Self::non_optional_input(input)?)?; diff --git a/crates/starknet_committer_and_os_cli/src/os_cli/tests/utils.rs b/crates/starknet_committer_and_os_cli/src/os_cli/tests/utils.rs deleted file mode 100644 index 09c38b53724..00000000000 --- a/crates/starknet_committer_and_os_cli/src/os_cli/tests/utils.rs +++ /dev/null @@ -1,81 +0,0 @@ -use std::any::Any; -use std::collections::HashMap; -use std::sync::LazyLock; - -use ethnum::U256; -use num_bigint::{BigInt, Sign}; -use rand::rngs::StdRng; -use rand::SeedableRng; -use starknet_os::hints::hint_implementation::kzg::utils::BASE; -use starknet_os::test_utils::cairo_runner::{EndpointArg, EntryPointRunnerConfig, ImplicitArg}; -use starknet_os::test_utils::errors::OsSpecificTestError; -use starknet_os::test_utils::utils::run_cairo_function_and_check_result; -use starknet_types_core::felt::Felt; - -use crate::os_cli::tests::types::OsPythonTestResult; -use crate::shared_utils::types::PythonTestError; - -// 2**251 + 17 * 2**192 + 1 -pub static DEFAULT_PRIME: LazyLock = LazyLock::new(|| { - BigInt::from_bytes_be( - Sign::Plus, - &(U256::from(2_u32).pow(251) + 17 * U256::from(2_u32).pow(192) + 1).to_be_bytes(), - ) -}); - -#[allow(clippy::too_many_arguments)] -#[allow(clippy::result_large_err)] -pub(crate) fn test_cairo_function( - runner_config: &EntryPointRunnerConfig, - program_bytes: &[u8], - function_name: &str, - explicit_args: &[EndpointArg], - implicit_args: &[ImplicitArg], - expected_explicit_retdata: &[EndpointArg], - expected_implicit_retdata: &[EndpointArg], - hint_locals: HashMap>, -) -> OsPythonTestResult { - run_cairo_function_and_check_result( - runner_config, - program_bytes, - function_name, - explicit_args, - implicit_args, - expected_explicit_retdata, - expected_implicit_retdata, - hint_locals, - ) - .map_err(|error| { - PythonTestError::SpecificError(OsSpecificTestError::Cairo0EntryPointRunner(error)) - })?; - Ok("".to_string()) -} - -pub(crate) fn seeded_random_prng() -> StdRng { - StdRng::seed_from_u64(42) -} - -/// Returns the lift of the given field element, val, as a `BigInt` in the range -/// (-prime/2, prime/2). -// TODO(Amos): Use cairo VM version if it is made public: -// https://github.com/lambdaclass/cairo-vm/blob/052e7cef977b336305c869fccbf24e1794b116ff/vm/src/hint_processor/builtin_hint_processor/kzg_da/mod.rs#L90 -fn as_int(val: &Felt, prime: &BigInt) -> BigInt { - let val = val.to_bigint(); - if val < (prime / BigInt::from(2)) { - return val.clone(); - } - val - prime -} - -/// Takes a BigInt3 struct represented by the limbs (d0, d1, d2) of -/// and reconstructs the corresponding integer (see split_bigint3()). -/// Note that the limbs do not have to be in the range [0, BASE). -/// Prime is used to handle negative values of the limbs. -// TODO(Amos): Use cairo VM version if it is made public: -// https://github.com/lambdaclass/cairo-vm/blob/052e7cef977b336305c869fccbf24e1794b116ff/vm/src/hint_processor/builtin_hint_processor/kzg_da/mod.rs#L99 -pub fn pack_bigint3(limbs: &[Felt]) -> BigInt { - assert!(limbs.len() == 3, "Expected 3 limbs, got {}", limbs.len()); - limbs.iter().enumerate().fold(BigInt::ZERO, |acc, (i, &limb)| { - acc + as_int(&limb, &DEFAULT_PRIME) * BASE.pow(i.try_into().unwrap()) - }) -} diff --git a/crates/starknet_os/Cargo.toml b/crates/starknet_os/Cargo.toml index 2ca1280776b..34f3b8139e9 100644 --- a/crates/starknet_os/Cargo.toml +++ b/crates/starknet_os/Cargo.toml @@ -54,9 +54,11 @@ strum_macros.workspace = true thiserror.workspace = true [dev-dependencies] +apollo_starknet_os_program = { workspace = true, features = ["test_programs"] } assert_matches.workspace = true blockifier = { workspace = true, features = ["testing"] } blockifier_test_utils.workspace = true +ethnum.workspace = true rand.workspace = true rstest.workspace = true starknet_patricia = { workspace = true, features = ["testing"] } diff --git a/crates/starknet_os/src/lib.rs b/crates/starknet_os/src/lib.rs index f077d2c7220..45a5951a171 100644 --- a/crates/starknet_os/src/lib.rs +++ b/crates/starknet_os/src/lib.rs @@ -7,4 +7,6 @@ pub mod runner; pub mod syscall_handler_utils; #[cfg(any(test, feature = "testing"))] pub mod test_utils; +#[cfg(test)] +pub(crate) mod tests; pub mod vm_utils; diff --git a/crates/starknet_os/src/test_utils.rs b/crates/starknet_os/src/test_utils.rs index 248ea4a4336..431c5944d65 100644 --- a/crates/starknet_os/src/test_utils.rs +++ b/crates/starknet_os/src/test_utils.rs @@ -1,3 +1,4 @@ pub mod cairo_runner; pub mod errors; +#[cfg(test)] pub mod utils; diff --git a/crates/starknet_os/src/test_utils/utils.rs b/crates/starknet_os/src/test_utils/utils.rs index 7bd6abb9483..d57f4735296 100644 --- a/crates/starknet_os/src/test_utils/utils.rs +++ b/crates/starknet_os/src/test_utils/utils.rs @@ -1,8 +1,14 @@ use std::any::Any; use std::collections::HashMap; +use std::sync::LazyLock; +use ethnum::U256; +use num_bigint::{BigInt, Sign}; +use rand::rngs::StdRng; +use rand::SeedableRng; use starknet_types_core::felt::Felt; +use crate::hints::hint_implementation::kzg::utils::BASE; use crate::test_utils::cairo_runner::{ run_cairo_0_entry_point, Cairo0EntryPointRunnerResult, @@ -55,3 +61,65 @@ pub fn create_squashed_cairo_dict( } PointerArg::Composed(squashed_dict) } + +// 2**251 + 17 * 2**192 + 1 +pub static DEFAULT_PRIME: LazyLock = LazyLock::new(|| { + BigInt::from_bytes_be( + Sign::Plus, + &(U256::from(2_u32).pow(251) + 17 * U256::from(2_u32).pow(192) + 1).to_be_bytes(), + ) +}); + +#[allow(clippy::too_many_arguments, dead_code)] +pub(crate) fn test_cairo_function( + runner_config: &EntryPointRunnerConfig, + program_bytes: &[u8], + function_name: &str, + explicit_args: &[EndpointArg], + implicit_args: &[ImplicitArg], + expected_explicit_retdata: &[EndpointArg], + expected_implicit_retdata: &[EndpointArg], + hint_locals: HashMap>, +) { + run_cairo_function_and_check_result( + runner_config, + program_bytes, + function_name, + explicit_args, + implicit_args, + expected_explicit_retdata, + expected_implicit_retdata, + hint_locals, + ) + .unwrap(); +} + +#[allow(dead_code)] +pub(crate) fn seeded_random_prng() -> StdRng { + StdRng::seed_from_u64(42) +} + +/// Returns the lift of the given field element, val, as a `BigInt` in the range +/// (-prime/2, prime/2). +// TODO(Amos): Use cairo VM version if it is made public: +// https://github.com/lambdaclass/cairo-vm/blob/052e7cef977b336305c869fccbf24e1794b116ff/vm/src/hint_processor/builtin_hint_processor/kzg_da/mod.rs#L90 +fn as_int(val: &Felt, prime: &BigInt) -> BigInt { + let val = val.to_bigint(); + if val < (prime / BigInt::from(2)) { + return val.clone(); + } + val - prime +} + +/// Takes a BigInt3 struct represented by the limbs (d0, d1, d2) of +/// and reconstructs the corresponding integer (see split_bigint3()). +/// Note that the limbs do not have to be in the range [0, BASE). +/// Prime is used to handle negative values of the limbs. +// TODO(Amos): Use cairo VM version if it is made public: +// https://github.com/lambdaclass/cairo-vm/blob/052e7cef977b336305c869fccbf24e1794b116ff/vm/src/hint_processor/builtin_hint_processor/kzg_da/mod.rs#L99 +pub fn pack_bigint3(limbs: &[Felt]) -> BigInt { + assert!(limbs.len() == 3, "Expected 3 limbs, got {}", limbs.len()); + limbs.iter().enumerate().fold(BigInt::ZERO, |acc, (i, &limb)| { + acc + as_int(&limb, &DEFAULT_PRIME) * BASE.pow(i.try_into().unwrap()) + }) +} diff --git a/crates/starknet_os/src/tests.rs b/crates/starknet_os/src/tests.rs new file mode 100644 index 00000000000..9a5818c98df --- /dev/null +++ b/crates/starknet_os/src/tests.rs @@ -0,0 +1,2 @@ +pub(crate) mod aliases; +pub(crate) mod bls_field; diff --git a/crates/starknet_committer_and_os_cli/src/os_cli/tests/aliases.rs b/crates/starknet_os/src/tests/aliases.rs similarity index 62% rename from crates/starknet_committer_and_os_cli/src/os_cli/tests/aliases.rs rename to crates/starknet_os/src/tests/aliases.rs index 9589f3627bb..10e0faa4037 100644 --- a/crates/starknet_committer_and_os_cli/src/os_cli/tests/aliases.rs +++ b/crates/starknet_os/src/tests/aliases.rs @@ -1,22 +1,14 @@ use std::collections::HashMap; use apollo_starknet_os_program::test_programs::ALIASES_TEST_BYTES; -use starknet_os::test_utils::cairo_runner::EntryPointRunnerConfig; -use tracing::info; - -use crate::os_cli::tests::types::OsPythonTestResult; -use crate::os_cli::tests::utils::test_cairo_function; +use crate::test_utils::cairo_runner::EntryPointRunnerConfig; +use crate::test_utils::utils::test_cairo_function; +// TODO(Nimrod): Move this next to the stateful compression hints implementation. // TODO(Amos): This test is incomplete. Add the rest of the test cases and remove this todo. -#[allow(clippy::result_large_err)] -pub(crate) fn aliases_test() -> OsPythonTestResult { - info!("Testing `test_constants`..."); - test_constants()?; - Ok("".to_string()) -} -#[allow(clippy::result_large_err)] -fn test_constants() -> OsPythonTestResult { +#[test] +fn test_constants() { let max_non_compressed_contract_address = 15; let alias_counter_storage_key = 0; let initial_available_alias = 128; diff --git a/crates/starknet_committer_and_os_cli/src/os_cli/tests/bls_field.rs b/crates/starknet_os/src/tests/bls_field.rs similarity index 68% rename from crates/starknet_committer_and_os_cli/src/os_cli/tests/bls_field.rs rename to crates/starknet_os/src/tests/bls_field.rs index 0dc59cec8a5..e1da0f36d88 100644 --- a/crates/starknet_committer_and_os_cli/src/os_cli/tests/bls_field.rs +++ b/crates/starknet_os/src/tests/bls_field.rs @@ -9,8 +9,11 @@ use ethnum::U256; use num_bigint::{BigInt, BigUint, RandBigInt, RandomBits, Sign, ToBigInt}; use num_integer::Integer; use rand::Rng; -use starknet_os::hints::hint_implementation::kzg::utils::{split_bigint3, BASE, BLS_PRIME}; -use starknet_os::test_utils::cairo_runner::{ +use rstest::rstest; +use starknet_types_core::felt::Felt; + +use crate::hints::hint_implementation::kzg::utils::{split_bigint3, BASE, BLS_PRIME}; +use crate::test_utils::cairo_runner::{ run_cairo_0_entry_point, EndpointArg, EntryPointRunnerConfig, @@ -18,38 +21,16 @@ use starknet_os::test_utils::cairo_runner::{ PointerArg, ValueArg, }; -use starknet_os::test_utils::errors::OsSpecificTestError; -use starknet_types_core::felt::Felt; -use tracing::info; - -use crate::os_cli::tests::types::OsPythonTestResult; -use crate::os_cli::tests::utils::{ +use crate::test_utils::utils::{ pack_bigint3, seeded_random_prng, test_cairo_function, DEFAULT_PRIME, }; -use crate::shared_utils::types::PythonTestError; const REDUCED_MUL_LIMB_BOUND: i128 = 2_i128.pow(104); -// TODO(Nimrod): Move this to the starknet_os crate and run it directly. -#[allow(clippy::result_large_err)] -pub(crate) fn test_bls_field() -> OsPythonTestResult { - info!("Testing `test_bigint3_to_uint256`..."); - test_bigint3_to_uint256()?; - info!("Testing `test_felt_to_bigint3`..."); - test_felt_to_bigint3()?; - info!("Testing `test_horner_eval`..."); - test_horner_eval()?; - info!("Testing `test_reduced_mul_random`..."); - test_reduced_mul_random()?; - info!("Testing `test_reduced_mul_parameterized`..."); - test_reduced_mul_parameterized()?; - info!("Testing `test_bls_prime_value`..."); - test_bls_prime_value()?; - Ok("".to_string()) -} +// TODO(Nimrod): Move this next to the BLS hints implementation. fn get_entrypoint_runner_config() -> EntryPointRunnerConfig { EntryPointRunnerConfig { @@ -59,8 +40,7 @@ fn get_entrypoint_runner_config() -> EntryPointRunnerConfig { } } -#[allow(clippy::result_large_err)] -fn run_reduced_mul_test(a_split: &[Felt], b_split: &[Felt]) -> OsPythonTestResult { +fn run_reduced_mul_test(a_split: &[Felt], b_split: &[Felt]) { let explicit_args = [ EndpointArg::Value(ValueArg::Array(a_split.to_vec())), EndpointArg::Value(ValueArg::Array(b_split.to_vec())), @@ -81,16 +61,14 @@ fn run_reduced_mul_test(a_split: &[Felt], b_split: &[Felt]) -> OsPythonTestResul &expected_explicit_args, &expected_implicit_args, HashMap::new(), - )?; - Ok("".to_string()) + ); } -#[allow(clippy::result_large_err)] -fn test_bigint3_to_uint256() -> OsPythonTestResult { +#[test] +fn test_bigint3_to_uint256() { let mut rng = seeded_random_prng(); let random_u256_big_uint: BigUint = rng.sample(RandomBits::new(256)); let random_u256_bigint = BigInt::from_biguint(Sign::Plus, random_u256_big_uint); - info!("random 256 bit bigint in `test_bigint3_to_uint256`: {random_u256_bigint}"); let cairo_bigin3 = EndpointArg::Value(ValueArg::Array( split_bigint3(random_u256_bigint.clone()).unwrap().to_vec(), )); @@ -113,54 +91,52 @@ fn test_bigint3_to_uint256() -> OsPythonTestResult { &expected_explicit_args, &expected_implicit_args, HashMap::new(), - )?; - Ok("".to_string()) + ); } -#[allow(clippy::result_large_err)] -fn test_felt_to_bigint3() -> OsPythonTestResult { - let values: [BigInt; 9] = [ - 0.into(), - 1.into(), - DEFAULT_PRIME.clone() - 1, - DEFAULT_PRIME.clone() - 2, - BASE.clone() - 1, - BASE.clone(), - BASE.pow(2_u32) - 1, - BASE.pow(2_u32), - DEFAULT_PRIME.clone() / 2, - ]; +#[rstest] +fn test_felt_to_bigint3( + #[values( + 0.into(), + 1.into(), + DEFAULT_PRIME.clone() - 1, + DEFAULT_PRIME.clone() - 2, + BASE.clone() - 1, + BASE.clone(), + BASE.pow(2_u32) - 1, + BASE.pow(2_u32), + DEFAULT_PRIME.clone() / 2 +)] + value: BigInt, +) { let entrypoint_runner_config = get_entrypoint_runner_config(); - for value in values { - let explicit_args: [EndpointArg; 1] = [Felt::from(value.clone()).into()]; - let implicit_args = [ImplicitArg::Builtin(BuiltinName::range_check)]; - let split_value = split_bigint3(value.clone()).unwrap(); - let expected_explicit_args = [EndpointArg::Value(ValueArg::Array(split_value.to_vec()))]; - let n_range_checks = if value == DEFAULT_PRIME.clone() - 1 { 0 } else { 6 }; - let expected_implicit_args: [EndpointArg; 1] = [n_range_checks.into()]; + let explicit_args: [EndpointArg; 1] = [Felt::from(value.clone()).into()]; + let implicit_args = [ImplicitArg::Builtin(BuiltinName::range_check)]; - test_cairo_function( - &entrypoint_runner_config, - OS_PROGRAM_BYTES, - "starkware.starknet.core.os.data_availability.bls_field.felt_to_bigint3", - &explicit_args, - &implicit_args, - &expected_explicit_args, - &expected_implicit_args, - HashMap::new(), - )?; - } - Ok("".to_string()) + let split_value = split_bigint3(value.clone()).unwrap(); + let expected_explicit_args = [EndpointArg::Value(ValueArg::Array(split_value.to_vec()))]; + let n_range_checks = if value == DEFAULT_PRIME.clone() - 1 { 0 } else { 6 }; + let expected_implicit_args: [EndpointArg; 1] = [n_range_checks.into()]; + + test_cairo_function( + &entrypoint_runner_config, + OS_PROGRAM_BYTES, + "starkware.starknet.core.os.data_availability.bls_field.felt_to_bigint3", + &explicit_args, + &implicit_args, + &expected_explicit_args, + &expected_implicit_args, + HashMap::new(), + ); } -#[allow(clippy::result_large_err)] -fn test_horner_eval() -> OsPythonTestResult { +#[test] +fn test_horner_eval() { let mut rng = seeded_random_prng(); let entrypoint_runner_config = get_entrypoint_runner_config(); for n_coefficients in [0, 100, 4096] { - info!("Testing horner_eval with {n_coefficients} coefficients."); let mut explicit_args: Vec = vec![]; explicit_args.push(n_coefficients.into()); let coefficients: Vec = (0..n_coefficients) @@ -184,9 +160,7 @@ fn test_horner_eval() -> OsPythonTestResult { &[EndpointArg::Value(ValueArg::Array(vec![Felt::ZERO, Felt::ZERO, Felt::ZERO]))], HashMap::new(), ) - .map_err(|error| { - PythonTestError::SpecificError(OsSpecificTestError::Cairo0EntryPointRunner(error)) - })?; + .unwrap(); // Get actual result. assert_eq!( @@ -220,7 +194,6 @@ fn test_horner_eval() -> OsPythonTestResult { .mod_floor(&BLS_PRIME.clone()); // Calculate expected result. - info!("Calculating expected result."); let expected_result = coefficients.iter().enumerate().fold(BigUint::ZERO, |acc, (i, coefficient)| { acc + BigUint::from_bytes_be(&coefficient.to_bytes_be()) @@ -233,13 +206,10 @@ fn test_horner_eval() -> OsPythonTestResult { Expected result: {expected_result}" ); } - - Ok("".to_string()) } -#[allow(dead_code)] -#[allow(clippy::result_large_err)] -fn test_reduced_mul_random() -> OsPythonTestResult { +#[test] +fn test_reduced_mul_random() { // Generate a,b in (-REDUCED_MUL_LIMB_LIMIT, REDUCED_MUL_LIMB_LIMIT). let mut rng = seeded_random_prng(); let a_split = (0..3) @@ -252,9 +222,8 @@ fn test_reduced_mul_random() -> OsPythonTestResult { run_reduced_mul_test(&a_split, &b_split) } -#[allow(dead_code)] -#[allow(clippy::result_large_err)] -fn test_reduced_mul_parameterized() -> OsPythonTestResult { +#[test] +fn test_reduced_mul_parameterized() { let max_value = Felt::from(REDUCED_MUL_LIMB_BOUND - 1); let min_value = Felt::from(-REDUCED_MUL_LIMB_BOUND + 1); let values: [([Felt; 3], [Felt; 3]); 4] = [ @@ -264,15 +233,12 @@ fn test_reduced_mul_parameterized() -> OsPythonTestResult { ([Felt::ONE, Felt::from(2), Felt::from(3)], [Felt::ZERO, Felt::ZERO, Felt::ZERO]), ]; for (a_split, b_split) in values { - info!("Testing `reduced_mul` with a = {a_split:?}, b = {b_split:?}"); - run_reduced_mul_test(&a_split, &b_split)?; + run_reduced_mul_test(&a_split, &b_split); } - - Ok("".to_string()) } -#[allow(clippy::result_large_err)] -fn test_bls_prime_value() -> OsPythonTestResult { +#[test] +fn test_bls_prime_value() { let entrypoint = None; let program = Program::from_bytes(OS_PROGRAM_BYTES, entrypoint).unwrap(); let actual_split_bls_prime: [Felt; 3] = array::from_fn(|i| { @@ -287,5 +253,4 @@ fn test_bls_prime_value() -> OsPythonTestResult { "Expected BLS prime value to be {expected_split_bls_prime:?}, got \ {actual_split_bls_prime:?}" ); - Ok("".to_string()) }