Skip to content

Commit 9980a92

Browse files
Fix rebase mistakes
1 parent 82567ae commit 9980a92

File tree

6 files changed

+5
-14
lines changed

6 files changed

+5
-14
lines changed

extensions/algebra/circuit/src/fp2_extension.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl Fp2Extension {
3636
pub fn generate_complex_init(&self, modular_config: &ModularExtension) -> String {
3737
fn get_index_of_modulus(modulus: &BigUint, modular_config: &ModularExtension) -> usize {
3838
modular_config
39-
.supported_modulus
39+
.supported_moduli
4040
.iter()
4141
.position(|m| m == modulus)
4242
.expect("Modulus used in Fp2Extension not found in ModularExtension")

extensions/algebra/circuit/src/modular_extension.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl ModularExtension {
3636
// Generates a call to the moduli_init! macro with moduli in the correct order
3737
pub fn generate_moduli_init(&self) -> String {
3838
let supported_moduli = self
39-
.supported_modulus
39+
.supported_moduli
4040
.iter()
4141
.map(|modulus| format!("\"{}\"", modulus))
4242
.collect::<Vec<String>>()

extensions/algebra/guest/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ use core::{
5454
pub use field::Field;
5555
#[cfg(not(target_os = "zkvm"))]
5656
use num_bigint::BigUint;
57-
pub use once_cell;
5857
pub use openvm_algebra_complex_macros as complex_macros;
5958
pub use openvm_algebra_moduli_macros as moduli_macros;
6059
#[cfg(target_os = "zkvm")]

extensions/algebra/moduli-macros/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,10 +1081,6 @@ pub fn moduli_init(input: TokenStream) -> TokenStream {
10811081
}
10821082
});
10831083

1084-
setup_all_moduli.push(quote::quote_spanned! { span.into() =>
1085-
#setup_function();
1086-
});
1087-
10881084
setups.push(quote::quote_spanned! { span.into() =>
10891085
#[allow(non_snake_case)]
10901086
#[no_mangle]

extensions/algebra/tests/programs/examples/sqrt.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ openvm_algebra_moduli_macros::moduli_declare! {
1414
}
1515
}
1616

17-
openvm_algebra_moduli_macros::moduli_init!(
18-
"0xFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F"
19-
);
17+
openvm::init!();
2018

2119
pub fn main() {
22-
setup_all_moduli();
23-
2420
let a = Secp256k1Coord::from_u32(4);
2521
let sqrt = a.sqrt();
2622
assert_eq!(sqrt, Some(Secp256k1Coord::from_u32(2)));

extensions/algebra/tests/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ mod tests {
168168

169169
#[test]
170170
fn test_sqrt() -> Result<()> {
171-
let elf = build_example_program_at_path(get_programs_dir!(), "sqrt")?;
171+
let config = Rv32ModularConfig::new(vec![SECP256K1_CONFIG.modulus.clone()]);
172+
let elf = build_example_program_at_path(get_programs_dir!(), "sqrt", &config)?;
172173
let openvm_exe = VmExe::from_elf(
173174
elf,
174175
Transpiler::<F>::default()
@@ -177,7 +178,6 @@ mod tests {
177178
.with_extension(Rv32IoTranspilerExtension)
178179
.with_extension(ModularTranspilerExtension),
179180
)?;
180-
let config = Rv32ModularConfig::new(vec![SECP256K1_CONFIG.modulus.clone()]);
181181
air_test(config, openvm_exe);
182182
Ok(())
183183
}

0 commit comments

Comments
 (0)