From 2f3d5b2064127e0b3dcd2495698e2ca5416531b0 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Tue, 13 Feb 2024 15:17:14 +0000 Subject: [PATCH] chore: Sync to noir-lang/noir chore: switch noir pull to master branch (https://github.com/AztecProtocol/aztec-packages/pull/4581) --- .../array_dynamic_blackbox_input/Nargo.toml | 7 ----- .../array_dynamic_blackbox_input/Prover.toml | 4 --- .../array_dynamic_blackbox_input/src/main.nr | 27 ------------------- 3 files changed, 38 deletions(-) delete mode 100644 test_programs/execution_success/array_dynamic_blackbox_input/Nargo.toml delete mode 100644 test_programs/execution_success/array_dynamic_blackbox_input/Prover.toml delete mode 100644 test_programs/execution_success/array_dynamic_blackbox_input/src/main.nr diff --git a/test_programs/execution_success/array_dynamic_blackbox_input/Nargo.toml b/test_programs/execution_success/array_dynamic_blackbox_input/Nargo.toml deleted file mode 100644 index 15d437a8f8d..00000000000 --- a/test_programs/execution_success/array_dynamic_blackbox_input/Nargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "array_dynamic_blackbox_input" -type = "bin" -authors = [""] -compiler_version = ">=0.23.0" - -[dependencies] \ No newline at end of file diff --git a/test_programs/execution_success/array_dynamic_blackbox_input/Prover.toml b/test_programs/execution_success/array_dynamic_blackbox_input/Prover.toml deleted file mode 100644 index 3797c0b0038..00000000000 --- a/test_programs/execution_success/array_dynamic_blackbox_input/Prover.toml +++ /dev/null @@ -1,4 +0,0 @@ -index = "1" -leaf = ["51", "109", "224", "175", "60", "42", "79", "222", "117", "255", "174", "79", "126", "242", "74", "34", "100", "35", "20", "200", "109", "89", "191", "219", "41", "10", "118", "217", "165", "224", "215", "109"] -path = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63"] -root = ["243", "212", "223", "132", "202", "119", "167", "60", "162", "158", "66", "192", "88", "114", "34", "191", "202", "195", "19", "102", "150", "88", "222", "176", "35", "51", "110", "97", "204", "224", "253", "171"] diff --git a/test_programs/execution_success/array_dynamic_blackbox_input/src/main.nr b/test_programs/execution_success/array_dynamic_blackbox_input/src/main.nr deleted file mode 100644 index aabf7fc9d5c..00000000000 --- a/test_programs/execution_success/array_dynamic_blackbox_input/src/main.nr +++ /dev/null @@ -1,27 +0,0 @@ -fn main(leaf: [u8; 32], path: [u8; 64], index: u32, root: [u8; 32]) { - compute_root(leaf, path, index, root); -} - -fn compute_root(leaf: [u8; 32], path: [u8; 64], _index: u32, root: [u8; 32]) { - let mut current = leaf; - let mut index = _index; - - for i in 0..2 { - let mut hash_input = [0; 64]; - let offset = i * 32; - let is_right = (index & 1) != 0; - let a = if is_right { 32 } else { 0 }; - let b = if is_right { 0 } else { 32 }; - - for j in 0..32 { - hash_input[j + a] = current[j]; - hash_input[j + b] = path[offset + j]; - } - - current = dep::std::hash::sha256(hash_input); - index = index >> 1; - } - - // Regression for issue #4258 - assert(root == current); -} \ No newline at end of file