diff --git a/compiler/noirc_frontend/src/hir/comptime/interpreter/foreign.rs b/compiler/noirc_frontend/src/hir/comptime/interpreter/foreign.rs index bbda9691e67..10b50255bb0 100644 --- a/compiler/noirc_frontend/src/hir/comptime/interpreter/foreign.rs +++ b/compiler/noirc_frontend/src/hir/comptime/interpreter/foreign.rs @@ -243,15 +243,6 @@ fn blake_hash( /// signature: [u8; 64], /// message_hash: [u8; N], /// ) -> bool -/// -/// pub fn verify_signature_slice( -/// public_key_x: [u8; 32], -/// public_key_y: [u8; 32], -/// signature: [u8; 64], -/// message_hash: [u8], -/// ) -> bool -/// ``` -/// // cSpell:disable-next-line fn ecdsa_secp256_verify( interner: &mut NodeInterner, diff --git a/docs/docs/noir/standard_library/cryptographic_primitives/ecdsa_sig_verification.mdx b/docs/docs/noir/standard_library/cryptographic_primitives/ecdsa_sig_verification.mdx index 7dc566e71a7..a629763b265 100644 --- a/docs/docs/noir/standard_library/cryptographic_primitives/ecdsa_sig_verification.mdx +++ b/docs/docs/noir/standard_library/cryptographic_primitives/ecdsa_sig_verification.mdx @@ -12,7 +12,6 @@ Noir supports ECDSA signatures verification over the secp256k1 and secp256r1 cur ## ecdsa_secp256k1::verify_signature Verifier for ECDSA Secp256k1 signatures. -See ecdsa_secp256k1::verify_signature_slice for a version that accepts slices directly. #include_code ecdsa_secp256k1 noir_stdlib/src/ecdsa_secp256k1.nr rust @@ -27,20 +26,6 @@ fn main(hashed_message : [u8;32], pub_key_x : [u8;32], pub_key_y : [u8;32], sign -## ecdsa_secp256k1::verify_signature_slice - -:::info - -This method is deprecated and will be removed in 1.0.0-beta.12 - -::: - -Verifier for ECDSA Secp256k1 signatures where the message is a slice. - -#include_code ecdsa_secp256k1_slice noir_stdlib/src/ecdsa_secp256k1.nr rust - - - ## ecdsa_secp256r1::verify_signature Verifier for ECDSA Secp256r1 signatures. @@ -58,17 +43,3 @@ fn main(hashed_message : [u8;32], pub_key_x : [u8;32], pub_key_y : [u8;32], sign ``` - -## ecdsa_secp256r1::verify_signature - -:::info - -This method is deprecated and will be removed in 1.0.0-beta.12 - -::: - -Verifier for ECDSA Secp256r1 signatures where the message is a slice. - -#include_code ecdsa_secp256r1_slice noir_stdlib/src/ecdsa_secp256r1.nr rust - - diff --git a/noir_stdlib/src/ecdsa_secp256k1.nr b/noir_stdlib/src/ecdsa_secp256k1.nr index 5a3dae2dcfa..296ceeb6f96 100644 --- a/noir_stdlib/src/ecdsa_secp256k1.nr +++ b/noir_stdlib/src/ecdsa_secp256k1.nr @@ -23,15 +23,3 @@ pub fn verify_signature( ) -> bool // docs:end:ecdsa_secp256k1 {} - -#[deprecated("This method is deprecated and will be removed in 1.0.0-beta.12")] -#[foreign(ecdsa_secp256k1)] -// docs:start:ecdsa_secp256k1_slice -pub fn verify_signature_slice( - public_key_x: [u8; 32], - public_key_y: [u8; 32], - signature: [u8; 64], - message_hash: [u8], -) -> bool -// docs:end:ecdsa_secp256k1_slice -{} diff --git a/noir_stdlib/src/ecdsa_secp256r1.nr b/noir_stdlib/src/ecdsa_secp256r1.nr index 6e568f1803a..95f9ebbe128 100644 --- a/noir_stdlib/src/ecdsa_secp256r1.nr +++ b/noir_stdlib/src/ecdsa_secp256r1.nr @@ -8,15 +8,3 @@ pub fn verify_signature( ) -> bool // docs:end:ecdsa_secp256r1 {} - -#[deprecated("This method is deprecated and will be removed in 1.0.0-beta.12")] -#[foreign(ecdsa_secp256r1)] -// docs:start:ecdsa_secp256r1_slice -pub fn verify_signature_slice( - public_key_x: [u8; 32], - public_key_y: [u8; 32], - signature: [u8; 64], - message_hash: [u8], -) -> bool -// docs:end:ecdsa_secp256r1_slice -{} diff --git a/test_programs/noir_test_success/comptime_blackbox/src/main.nr b/test_programs/noir_test_success/comptime_blackbox/src/main.nr index 8ae42cb0bf6..b2ce6da976e 100644 --- a/test_programs/noir_test_success/comptime_blackbox/src/main.nr +++ b/test_programs/noir_test_success/comptime_blackbox/src/main.nr @@ -47,7 +47,7 @@ fn test_blake3() { /// Test that ecdsa_secp256k1 is implemented. #[test] fn test_ecdsa_secp256k1() { - let (valid_array, valid_slice) = comptime { + let valid = comptime { let pub_key_x: [u8; 32] = hex_to_bytes( "a0434d9e47f3c86235477c7b1ae6ae5d3442d49b1943c2b752a68e2a47e247c7", ) @@ -65,25 +65,15 @@ fn test_ecdsa_secp256k1() { ) .as_array(); - let valid_array = - std::ecdsa_secp256k1::verify_signature(pub_key_x, pub_key_y, signature, hashed_message); - let valid_slice = std::ecdsa_secp256k1::verify_signature_slice( - pub_key_x, - pub_key_y, - signature, - hashed_message.as_slice(), - ); - - (valid_array, valid_slice) + std::ecdsa_secp256k1::verify_signature(pub_key_x, pub_key_y, signature, hashed_message) }; - assert(valid_array); - assert(valid_slice); + assert(valid); } /// Test that ecdsa_secp256r1 is implemented. #[test] fn test_ecdsa_secp256r1() { - let (valid_array, valid_slice) = comptime { + let valid = comptime { let pub_key_x: [u8; 32] = hex_to_bytes( "550f471003f3df97c3df506ac797f6721fb1a1fb7b8f6f83d224498a65c88e24", ) @@ -101,18 +91,9 @@ fn test_ecdsa_secp256r1() { ) .as_array(); - let valid_array = - std::ecdsa_secp256r1::verify_signature(pub_key_x, pub_key_y, signature, hashed_message); - let valid_slice = std::ecdsa_secp256r1::verify_signature_slice( - pub_key_x, - pub_key_y, - signature, - hashed_message.as_slice(), - ); - (valid_array, valid_slice) + std::ecdsa_secp256r1::verify_signature(pub_key_x, pub_key_y, signature, hashed_message) }; - assert(valid_array); - assert(valid_slice); + assert(valid); } /// Test that sha256_compression is implemented. diff --git a/tooling/nargo_cli/tests/snapshots/compile_success_empty/arithmetic_generics/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/compile_success_empty/arithmetic_generics/execute__tests__expanded.snap index af1f1b708aa..4c71b503157 100644 --- a/tooling/nargo_cli/tests/snapshots/compile_success_empty/arithmetic_generics/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/compile_success_empty/arithmetic_generics/execute__tests__expanded.snap @@ -24,8 +24,8 @@ fn split_first(array: [T; N]) -> (T, [T; N - 1]) { fn push(array: [Field; N], element: Field) -> [Field; N + 1] { let mut result: [Field; N + 1] = std::mem::zeroed(); { - let i_3852: u32 = array.len(); - result[i_3852] = element; + let i_3842: u32 = array.len(); + result[i_3842] = element; }; for i in 0_u32..array.len() { result[i] = array[i]; diff --git a/tooling/nargo_cli/tests/snapshots/compile_success_empty/assign_mutation_in_lvalue/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/compile_success_empty/assign_mutation_in_lvalue/execute__tests__expanded.snap index 810633803fe..c040142ec7a 100644 --- a/tooling/nargo_cli/tests/snapshots/compile_success_empty/assign_mutation_in_lvalue/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/compile_success_empty/assign_mutation_in_lvalue/execute__tests__expanded.snap @@ -10,11 +10,11 @@ fn main() { fn bug() { let mut a: ([Field; 2], Field) = ([1_Field, 2_Field], 3_Field); { - let i_3821: u32 = { + let i_3811: u32 = { a = ([4_Field, 5_Field], 6_Field); 1_u32 }; - a.0[i_3821] = 7_Field; + a.0[i_3811] = 7_Field; }; assert(a == ([4_Field, 7_Field], 6_Field)); } diff --git a/tooling/nargo_cli/tests/snapshots/compile_success_empty/numeric_generics/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/compile_success_empty/numeric_generics/execute__tests__expanded.snap index b5806d62b64..74d940f775d 100644 --- a/tooling/nargo_cli/tests/snapshots/compile_success_empty/numeric_generics/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/compile_success_empty/numeric_generics/execute__tests__expanded.snap @@ -27,8 +27,8 @@ impl MyStruct { fn insert(mut self, index: Field, elem: Field) -> Self { assert((index as u64) < (S as u64)); { - let i_3835: u32 = index as u32; - self.data[i_3835] = elem; + let i_3825: u32 = index as u32; + self.data[i_3825] = elem; }; self } diff --git a/tooling/nargo_cli/tests/snapshots/compile_success_empty/numeric_generics_explicit/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/compile_success_empty/numeric_generics_explicit/execute__tests__expanded.snap index 72ea58d80ec..0f7fade4686 100644 --- a/tooling/nargo_cli/tests/snapshots/compile_success_empty/numeric_generics_explicit/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/compile_success_empty/numeric_generics_explicit/execute__tests__expanded.snap @@ -36,8 +36,8 @@ impl MyStruct { fn insert(mut self, index: Field, elem: Field) -> Self { assert((index as u32) < S); { - let i_3853: u32 = index as u32; - self.data[i_3853] = elem; + let i_3843: u32 = index as u32; + self.data[i_3843] = elem; }; self } diff --git a/tooling/nargo_cli/tests/snapshots/compile_success_empty/regression_bignum/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/compile_success_empty/regression_bignum/execute__tests__expanded.snap index fe9857e0e87..b4c82b9fd2a 100644 --- a/tooling/nargo_cli/tests/snapshots/compile_success_empty/regression_bignum/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/compile_success_empty/regression_bignum/execute__tests__expanded.snap @@ -53,8 +53,8 @@ unconstrained fn shl(shift: u32) -> [u64; 6] { result[num_shifted_limbs] = 1_u64 << limb_shift; for i in 1_u32..6_u32 - num_shifted_limbs { { - let i_3842: u32 = i + num_shifted_limbs; - result[i_3842] = 0_u64; + let i_3832: u32 = i + num_shifted_limbs; + result[i_3832] = 0_u64; } } result diff --git a/tooling/nargo_cli/tests/snapshots/compile_success_empty/serialize_1/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/compile_success_empty/serialize_1/execute__tests__expanded.snap index 6f3ccbcc4a0..8476e6a6424 100644 --- a/tooling/nargo_cli/tests/snapshots/compile_success_empty/serialize_1/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/compile_success_empty/serialize_1/execute__tests__expanded.snap @@ -25,8 +25,8 @@ where } for i in 0_u32..b.len() { { - let i_3844: u32 = i + a.len(); - array[i_3844] = b[i]; + let i_3834: u32 = i + a.len(); + array[i_3834] = b[i]; } } array diff --git a/tooling/nargo_cli/tests/snapshots/compile_success_empty/serialize_4/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/compile_success_empty/serialize_4/execute__tests__expanded.snap index e27fa6bf2fb..e1ef52bbebc 100644 --- a/tooling/nargo_cli/tests/snapshots/compile_success_empty/serialize_4/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/compile_success_empty/serialize_4/execute__tests__expanded.snap @@ -25,8 +25,8 @@ where } for i in 0_u32..b.len() { { - let i_3844: u32 = i + a.len(); - array[i_3844] = b[i]; + let i_3834: u32 = i + a.len(); + array[i_3834] = b[i]; } } array diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/aes128_encrypt/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/aes128_encrypt/execute__tests__expanded.snap index 4a24fb2de0d..9a982e0ee41 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/aes128_encrypt/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/aes128_encrypt/execute__tests__expanded.snap @@ -18,8 +18,8 @@ unconstrained fn decode_hex(s: str) -> [u8; M] { for i in 0_u32..N { if (i % 2_u32) != 0_u32 { continue; }; { - let i_3836: u32 = i / 2_u32; - result[i_3836] = + let i_3826: u32 = i / 2_u32; + result[i_3826] = (decode_ascii(as_bytes[i]) * 16_u8) + decode_ascii(as_bytes[i + 1_u32]); } } diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/array_dedup_regression/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/array_dedup_regression/execute__tests__expanded.snap index 72614e6d300..8575fe82c2e 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/array_dedup_regression/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/array_dedup_regression/execute__tests__expanded.snap @@ -7,8 +7,8 @@ unconstrained fn main(x: u32) { for i in 0_u32..5_u32 { let mut a2: [Field; 5] = [1_Field, 2_Field, 3_Field, 4_Field, 5_Field]; { - let i_3823: u32 = x + i; - a2[i_3823] = 128_Field; + let i_3813: u32 = x + i; + a2[i_3813] = 128_Field; }; println(a2); if i != 0_u32 { diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/array_dynamic_blackbox_input/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/array_dynamic_blackbox_input/execute__tests__expanded.snap index 9223cab2d9b..125eb0b1492 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/array_dynamic_blackbox_input/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/array_dynamic_blackbox_input/execute__tests__expanded.snap @@ -17,12 +17,12 @@ fn compute_root(leaf: [u8; 32], path: [u8; 64], _index: u32, root: [u8; 32]) { let b: u32 = if is_right { 0_u32 } else { 32_u32 }; for j in 0_u32..32_u32 { { - let i_3837: u32 = j + a; - hash_input[i_3837] = current[j]; + let i_3827: u32 = j + a; + hash_input[i_3827] = current[j]; }; { - let i_3838: u32 = j + b; - hash_input[i_3838] = path[offset + j]; + let i_3828: u32 = j + b; + hash_input[i_3828] = path[offset + j]; } } current = std::hash::blake3(hash_input); diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/array_dynamic_nested_blackbox_input/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/array_dynamic_nested_blackbox_input/execute__tests__expanded.snap index c5ad0c682de..67fb150b951 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/array_dynamic_nested_blackbox_input/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/array_dynamic_nested_blackbox_input/execute__tests__expanded.snap @@ -14,13 +14,13 @@ struct Foo { fn main(mut x: [Foo; 3], y: pub u32, hash_result: pub [u8; 32]) { { - let i_3822: u32 = y - 1_u32; - x[i_3822].bar.inner = [106_u8, 107_u8, 10_u8]; + let i_3812: u32 = y - 1_u32; + x[i_3812].bar.inner = [106_u8, 107_u8, 10_u8]; }; let mut hash_input: [u8; 3] = x[y - 1_u32].bar.inner; { - let i_3824: u32 = y - 1_u32; - hash_input[i_3824] = 0_u8; + let i_3814: u32 = y - 1_u32; + hash_input[i_3814] = 0_u8; }; let hash: [u8; 32] = std::hash::blake3(hash_input); assert(hash == hash_result); diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/brillig_cow/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/brillig_cow/execute__tests__expanded.snap index c3947cd1235..201759621fe 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/brillig_cow/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/brillig_cow/execute__tests__expanded.snap @@ -22,8 +22,8 @@ fn modify_in_inlined_constrained(original: [Field; 5], index: u32) -> ExecutionR modified[index] = 27_Field; let modified_once: [Field; 5] = modified; { - let i_3834: u32 = index + 1_u32; - modified[i_3834] = 27_Field; + let i_3824: u32 = index + 1_u32; + modified[i_3824] = 27_Field; }; ExecutionResult { original: original, modified_once: modified_once, modified_twice: modified } } @@ -33,8 +33,8 @@ unconstrained fn modify_in_unconstrained(original: [Field; 5], index: u32) -> Ex modified[index] = 27_Field; let modified_once: [Field; 5] = modified; { - let i_3837: u32 = index + 1_u32; - modified[i_3837] = 27_Field; + let i_3827: u32 = index + 1_u32; + modified[i_3827] = 27_Field; }; ExecutionResult { original: original, modified_once: modified_once, modified_twice: modified } } diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/brillig_cow_regression/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/brillig_cow_regression/execute__tests__expanded.snap index 20adc320421..4afbe75980c 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/brillig_cow_regression/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/brillig_cow_regression/execute__tests__expanded.snap @@ -155,33 +155,33 @@ unconstrained fn main(kernel_data: DataToHash) -> pub [Field; 2] { let mut offset: u32 = 0_u32; for j in 0_u32..MAX_NOTE_HASHES_PER_TX { { - let i_3846: u32 = offset + j; - tx_effects_hash_inputs[i_3846] = new_note_hashes[j]; + let i_3836: u32 = offset + j; + tx_effects_hash_inputs[i_3836] = new_note_hashes[j]; } } offset = offset + MAX_NOTE_HASHES_PER_TX; for j in 0_u32..MAX_NULLIFIERS_PER_TX { { - let i_3848: u32 = offset + j; - tx_effects_hash_inputs[i_3848] = new_nullifiers[j]; + let i_3838: u32 = offset + j; + tx_effects_hash_inputs[i_3838] = new_nullifiers[j]; } } offset = offset + MAX_NULLIFIERS_PER_TX; for j in 0_u32..MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX { { - let i_3850: u32 = offset + (j * 2_u32); - tx_effects_hash_inputs[i_3850] = public_data_update_requests[j].leaf_slot; + let i_3840: u32 = offset + (j * 2_u32); + tx_effects_hash_inputs[i_3840] = public_data_update_requests[j].leaf_slot; }; { - let i_3851: u32 = (offset + (j * 2_u32)) + 1_u32; - tx_effects_hash_inputs[i_3851] = public_data_update_requests[j].new_value; + let i_3841: u32 = (offset + (j * 2_u32)) + 1_u32; + tx_effects_hash_inputs[i_3841] = public_data_update_requests[j].new_value; } } offset = offset + (MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX * 2_u32); for j in 0_u32..MAX_L2_TO_L1_MSGS_PER_TX { { - let i_3853: u32 = offset + j; - tx_effects_hash_inputs[i_3853] = l2ToL1Msgs[j]; + let i_3843: u32 = offset + j; + tx_effects_hash_inputs[i_3843] = l2ToL1Msgs[j]; } } offset = offset + MAX_L2_TO_L1_MSGS_PER_TX; @@ -191,21 +191,21 @@ unconstrained fn main(kernel_data: DataToHash) -> pub [Field; 2] { let new_contracts: [NewContractData; 1] = kernel_data.new_contracts; tx_effects_hash_inputs[offset] = new_contracts[0_u32].contract_address; { - let i_3856: u32 = offset + 1_u32; - tx_effects_hash_inputs[i_3856] = new_contracts[0_u32].portal_contract_address; + let i_3846: u32 = offset + 1_u32; + tx_effects_hash_inputs[i_3846] = new_contracts[0_u32].portal_contract_address; }; offset = offset + (MAX_NEW_CONTRACTS_PER_TX * 2_u32); for j in 0_u32..NUM_FIELDS_PER_SHA256 { { - let i_3858: u32 = offset + j; - tx_effects_hash_inputs[i_3858] = encryptedLogsHash[j]; + let i_3848: u32 = offset + j; + tx_effects_hash_inputs[i_3848] = encryptedLogsHash[j]; } } offset = offset + (NUM_ENCRYPTED_LOGS_HASHES_PER_TX * NUM_FIELDS_PER_SHA256); for j in 0_u32..NUM_FIELDS_PER_SHA256 { { - let i_3860: u32 = offset + j; - tx_effects_hash_inputs[i_3860] = unencryptedLogsHash[j]; + let i_3850: u32 = offset + j; + tx_effects_hash_inputs[i_3850] = unencryptedLogsHash[j]; } } offset = offset + (NUM_UNENCRYPTED_LOGS_HASHES_PER_TX * NUM_FIELDS_PER_SHA256); @@ -215,8 +215,8 @@ unconstrained fn main(kernel_data: DataToHash) -> pub [Field; 2] { let input_as_bytes: [u8; 32] = tx_effects_hash_inputs[offset].to_be_bytes(); for byte_index in 0_u32..32_u32 { { - let i_3865: u32 = (offset * 32_u32) + byte_index; - hash_input_flattened[i_3865] = input_as_bytes[byte_index]; + let i_3855: u32 = (offset * 32_u32) + byte_index; + hash_input_flattened[i_3855] = input_as_bytes[byte_index]; } } } @@ -225,11 +225,11 @@ unconstrained fn main(kernel_data: DataToHash) -> pub [Field; 2] { tx_effects_hash_inputs[TX_EFFECT_HASH_FULL_FIELDS + log_field_index].to_be_bytes(); for byte_index in 0_u32..16_u32 { { - let i_3869: u32 = ( + let i_3859: u32 = ( (TX_EFFECT_HASH_FULL_FIELDS * 32_u32) + (log_field_index * 16_u32) ) + byte_index; - hash_input_flattened[i_3869] = input_as_bytes[byte_index]; + hash_input_flattened[i_3859] = input_as_bytes[byte_index]; } } } diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/conditional_1/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/conditional_1/execute__tests__expanded.snap index aace75cd485..883ea927eaa 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/conditional_1/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/conditional_1/execute__tests__expanded.snap @@ -27,8 +27,8 @@ fn main(a: u32, mut c: [u32; 4], x: [u8; 5], result: pub [u8; 32]) { if i_u32 == a { for j in 0_u32..4_u32 { { - let i_3835: u32 = i + j; - data[i_3835] = c[(4_u32 - 1_u32) - j]; + let i_3825: u32 = i + j; + data[i_3825] = c[(4_u32 - 1_u32) - j]; }; for k in 0_u32..4_u32 { ba = ba + data[k]; diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/databus_two_calldata/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/databus_two_calldata/execute__tests__expanded.snap index 48eca7d7e3a..19f9013ea21 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/databus_two_calldata/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/databus_two_calldata/execute__tests__expanded.snap @@ -9,8 +9,8 @@ fn main(mut x: [u32; 4], y: [u32; 3], z: [u32; 4]) -> return_data [u32; 4] { result[idx] = y[idx] + z[idx]; } { - let i_3825: u32 = x[3_u32]; - result[i_3825] = z[x[3_u32]]; + let i_3815: u32 = x[3_u32]; + result[i_3815] = z[x[3_u32]]; }; result } diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/encrypted_log_regression/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/encrypted_log_regression/execute__tests__expanded.snap index 692bbb756c6..dc8141c7a23 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/encrypted_log_regression/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/encrypted_log_regression/execute__tests__expanded.snap @@ -39,15 +39,15 @@ fn compute_encrypted_log( if flag { for i in 0_u32..EPH_PK_SIZE { { - let i_3838: u32 = offset + i; - encrypted_bytes[i_3838] = eph_pk_bytes[i]; + let i_3828: u32 = offset + i; + encrypted_bytes[i_3828] = eph_pk_bytes[i]; } } offset = offset + EPH_PK_SIZE; for i in 0_u32..HEADER_SIZE { { - let i_3840: u32 = offset + i; - encrypted_bytes[i_3840] = incoming_header_ciphertext[i]; + let i_3830: u32 = offset + i; + encrypted_bytes[i_3830] = incoming_header_ciphertext[i]; } } offset = offset + HEADER_SIZE; @@ -56,8 +56,8 @@ fn compute_encrypted_log( assert(size == incoming_body_ciphertext.len(), "ciphertext length mismatch"); for i in 0_u32..size { { - let i_3843: u32 = offset + i; - encrypted_bytes[i_3843] = incoming_body_ciphertext[i]; + let i_3833: u32 = offset + i; + encrypted_bytes[i_3833] = incoming_body_ciphertext[i]; } } }; diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/nested_array_dynamic/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/nested_array_dynamic/execute__tests__expanded.snap index 7a25d70c8ed..2143ebab75e 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/nested_array_dynamic/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/nested_array_dynamic/execute__tests__expanded.snap @@ -35,13 +35,13 @@ fn main(mut x: [Foo; 4], y: pub u32) { assert(x[3_u32].a == 50_Field); if y == 2_u32 { { - let i_3821: u32 = y - 1_u32; - x[i_3821].b = [50_Field, 51_Field, 52_Field]; + let i_3811: u32 = y - 1_u32; + x[i_3811].b = [50_Field, 51_Field, 52_Field]; } } else { { - let i_3822: u32 = y - 1_u32; - x[i_3822].b = [100_Field, 101_Field, 102_Field]; + let i_3812: u32 = y - 1_u32; + x[i_3812].b = [100_Field, 101_Field, 102_Field]; } }; assert(x[2_u32].b == [100_Field, 101_Field, 102_Field]); @@ -60,39 +60,39 @@ fn main(mut x: [Foo; 4], y: pub u32) { assert(foo_parents[1_u32].foos[1_u32].b == [5_Field, 6_Field, 21_Field]); if y == 2_u32 { { - let i_3826: u32 = y - 2_u32; - let i_3827: u32 = y - 2_u32; - foo_parents[i_3826].foos[i_3827].b = [10_Field, 9_Field, 8_Field]; + let i_3816: u32 = y - 2_u32; + let i_3817: u32 = y - 2_u32; + foo_parents[i_3816].foos[i_3817].b = [10_Field, 9_Field, 8_Field]; } } else { { - let i_3828: u32 = y - 2_u32; - let i_3829: u32 = y - 2_u32; - foo_parents[i_3828].foos[i_3829].b = [20_Field, 19_Field, 18_Field]; + let i_3818: u32 = y - 2_u32; + let i_3819: u32 = y - 2_u32; + foo_parents[i_3818].foos[i_3819].b = [20_Field, 19_Field, 18_Field]; } }; assert(foo_parents[1_u32].foos[1_u32].b == [20_Field, 19_Field, 18_Field]); assert(foo_parents[1_u32].foos[1_u32].b[2_u32] == 18_Field); if y == 3_u32 { { - let i_3830: u32 = y - 2_u32; - let i_3831: u32 = y - 2_u32; - let i_3832: u32 = y - 1_u32; - foo_parents[i_3830].foos[i_3831].b[i_3832] = 5000_Field; + let i_3820: u32 = y - 2_u32; + let i_3821: u32 = y - 2_u32; + let i_3822: u32 = y - 1_u32; + foo_parents[i_3820].foos[i_3821].b[i_3822] = 5000_Field; } } else { { - let i_3833: u32 = y - 2_u32; - let i_3834: u32 = y - 2_u32; - let i_3835: u32 = y - 1_u32; - foo_parents[i_3833].foos[i_3834].b[i_3835] = 1000_Field; + let i_3823: u32 = y - 2_u32; + let i_3824: u32 = y - 2_u32; + let i_3825: u32 = y - 1_u32; + foo_parents[i_3823].foos[i_3824].b[i_3825] = 1000_Field; } }; assert(foo_parents[1_u32].foos[1_u32].b[2_u32] == 5000_Field); { - let i_3836: u32 = y - 2_u32; - let i_3837: u32 = y - 3_u32; - foo_parents[i_3836].foos[i_3837].b = foo_parents[y - 2_u32].foos[y - 2_u32].b; + let i_3826: u32 = y - 2_u32; + let i_3827: u32 = y - 3_u32; + foo_parents[i_3826].foos[i_3827].b = foo_parents[y - 2_u32].foos[y - 2_u32].b; }; assert(foo_parents[1_u32].foos[0_u32].b == [20_Field, 19_Field, 5000_Field]); } diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/nested_array_in_slice/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/nested_array_in_slice/execute__tests__expanded.snap index b8428e6ba9a..7381831cd26 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/nested_array_in_slice/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/nested_array_in_slice/execute__tests__expanded.snap @@ -48,25 +48,25 @@ fn main(y: u32) { assert(x[y].bar.inner == [109_Field, 110_Field, 111_Field]); if y != 2_u32 { { - let i_3825: u32 = y - 2_u32; - x[i_3825].a = 50_Field; + let i_3815: u32 = y - 2_u32; + x[i_3815].a = 50_Field; } } else { { - let i_3826: u32 = y - 2_u32; - x[i_3826].a = 100_Field; + let i_3816: u32 = y - 2_u32; + x[i_3816].a = 100_Field; } }; assert(x[y - 2_u32].a == 50_Field); if y == 2_u32 { { - let i_3827: u32 = y - 1_u32; - x[i_3827].b = [50_Field, 51_Field, 52_Field]; + let i_3817: u32 = y - 1_u32; + x[i_3817].b = [50_Field, 51_Field, 52_Field]; } } else { { - let i_3828: u32 = y - 1_u32; - x[i_3828].b = [100_Field, 101_Field, 102_Field]; + let i_3818: u32 = y - 1_u32; + x[i_3818].b = [100_Field, 101_Field, 102_Field]; } }; assert(x[2_u32].b == [100_Field, 101_Field, 102_Field]); diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/ram_blowup_regression/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/ram_blowup_regression/execute__tests__expanded.snap index 633fc0d8148..20bc25ee9ab 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/ram_blowup_regression/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/ram_blowup_regression/execute__tests__expanded.snap @@ -29,8 +29,8 @@ fn main(tx_effects_hash_input: [Field; 256]) -> pub Field { let input_as_bytes: [u8; 32] = tx_effects_hash_input[offset].to_be_bytes(); for byte_index in 0_u32..32_u32 { { - let i_3836: u32 = (offset * 32_u32) + byte_index; - hash_input_flattened[i_3836] = input_as_bytes[byte_index]; + let i_3826: u32 = (offset * 32_u32) + byte_index; + hash_input_flattened[i_3826] = input_as_bytes[byte_index]; } } } diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_1144_1169_2399_6609/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_1144_1169_2399_6609/execute__tests__expanded.snap index cc5b9ca22eb..e775c26a69f 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/regression_1144_1169_2399_6609/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_1144_1169_2399_6609/execute__tests__expanded.snap @@ -36,12 +36,12 @@ fn compact_decode(input: [u8; N], length: Field) -> ([U4; 16], Field if (i as u32) < (length as u32) { let x: u8 = input[i]; { - let i_3847: u32 = (2_u32 * i) - 1_u32; - nibble[i_3847] = U4::from_u8(x >> 4_u8); + let i_3837: u32 = (2_u32 * i) - 1_u32; + nibble[i_3837] = U4::from_u8(x >> 4_u8); }; { - let i_3848: u32 = 2_u32 * i; - nibble[i_3848] = U4::from_u8(x & 15_u8); + let i_3838: u32 = 2_u32 * i; + nibble[i_3838] = U4::from_u8(x & 15_u8); } } } @@ -50,12 +50,12 @@ fn compact_decode(input: [u8; N], length: Field) -> ([U4; 16], Field if (i as u32) < ((length as u32) - 1_u32) { let x: u8 = input[i + 1_u32]; { - let i_3851: u32 = 2_u32 * i; - nibble[i_3851] = U4::from_u8(x >> 4_u8); + let i_3841: u32 = 2_u32 * i; + nibble[i_3841] = U4::from_u8(x >> 4_u8); }; { - let i_3852: u32 = (2_u32 * i) + 1_u32; - nibble[i_3852] = U4::from_u8(x & 15_u8); + let i_3842: u32 = (2_u32 * i) + 1_u32; + nibble[i_3842] = U4::from_u8(x & 15_u8); } } } diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_6674_1/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_6674_1/execute__tests__expanded.snap index 2f426432cec..6d1439a38a5 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/regression_6674_1/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_6674_1/execute__tests__expanded.snap @@ -16,8 +16,8 @@ impl BoundedVec4 { pub fn push(&mut self, elem: Field) { { - let i_3841: u32 = self.len; - self.storage[i_3841] = elem; + let i_3831: u32 = self.len; + self.storage[i_3831] = elem; }; self.len = self.len + 1_u32; } diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_6674_2/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_6674_2/execute__tests__expanded.snap index 737d13fcf13..b3bf1c51261 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/regression_6674_2/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_6674_2/execute__tests__expanded.snap @@ -16,8 +16,8 @@ impl BoundedVec4 { pub fn push(&mut self, elem: Field) { { - let i_3841: u32 = self.len; - self.storage[i_3841] = elem; + let i_3831: u32 = self.len; + self.storage[i_3831] = elem; }; self.len = self.len + 1_u32; } diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/regression_capacity_tracker/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/regression_capacity_tracker/execute__tests__expanded.snap index 069569a89b4..750ffb7b276 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/regression_capacity_tracker/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/regression_capacity_tracker/execute__tests__expanded.snap @@ -8,13 +8,13 @@ fn main(expected: pub Field, first: Field, input: [Field; 20]) { assert(hasher_slice[0_u32] == expected); if (expected as u32) > 10_u32 { { - let i_3823: u32 = (expected - 10_Field) as u32; - hasher_slice[i_3823] = 100_Field; + let i_3813: u32 = (expected - 10_Field) as u32; + hasher_slice[i_3813] = 100_Field; } } else { { - let i_3824: u32 = expected as u32; - hasher_slice[i_3824] = 100_Field; + let i_3814: u32 = expected as u32; + hasher_slice[i_3814] = 100_Field; } }; assert(hasher_slice[0_u32] == expected); diff --git a/tooling/nargo_cli/tests/snapshots/execution_success/slice_dynamic_index/execute__tests__expanded.snap b/tooling/nargo_cli/tests/snapshots/execution_success/slice_dynamic_index/execute__tests__expanded.snap index 40f8f5585c7..b73a67cd310 100644 --- a/tooling/nargo_cli/tests/snapshots/execution_success/slice_dynamic_index/execute__tests__expanded.snap +++ b/tooling/nargo_cli/tests/snapshots/execution_success/slice_dynamic_index/execute__tests__expanded.snap @@ -36,8 +36,8 @@ fn dynamic_slice_index_set_if(mut slice: [Field], x: u32, y: u32) { assert(slice[x] == 4_Field); slice[x] = slice[x] - 2_Field; { - let i_3867: u32 = x - 1_u32; - slice[i_3867] = slice[x]; + let i_3857: u32 = x - 1_u32; + slice[i_3857] = slice[x]; } } else { slice[x] = 0_Field; @@ -56,8 +56,8 @@ fn dynamic_slice_index_set_else(mut slice: [Field], x: u32, y: u32) { assert(slice[x] == 4_Field); slice[x] = slice[x] - 2_Field; { - let i_3868: u32 = x - 1_u32; - slice[i_3868] = slice[x]; + let i_3858: u32 = x - 1_u32; + slice[i_3858] = slice[x]; } } else { slice[x] = 0_Field;