From f9e7f8855ab6d63553ccd8c93d3cec12fd6f22a8 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 25 Jan 2024 15:28:30 +0100 Subject: [PATCH] Move profiling circuits to a separate repo --- Nargo.toml | 6 +----- circuits/profiling/keccak/Nargo.toml | 3 --- circuits/profiling/keccak/Prover.toml | 1 - circuits/profiling/keccak/Verifier.toml | 0 circuits/profiling/keccak/src/main.nr | 8 -------- circuits/profiling/keccak_2x/Nargo.toml | 3 --- circuits/profiling/keccak_2x/Prover.toml | 1 - circuits/profiling/keccak_2x/Verifier.toml | 0 circuits/profiling/keccak_2x/src/main.nr | 11 ----------- circuits/profiling/poseidon/Nargo.toml | 3 --- circuits/profiling/poseidon/Prover.toml | 1 - circuits/profiling/poseidon/Verifier.toml | 0 circuits/profiling/poseidon/src/main.nr | 7 ------- circuits/profiling/rlp/Nargo.toml | 6 ------ circuits/profiling/rlp/Prover.toml | 3 --- circuits/profiling/rlp/Verifier.toml | 0 circuits/profiling/rlp/src/main.nr | 10 ---------- 17 files changed, 1 insertion(+), 62 deletions(-) delete mode 100644 circuits/profiling/keccak/Nargo.toml delete mode 100644 circuits/profiling/keccak/Prover.toml delete mode 100644 circuits/profiling/keccak/Verifier.toml delete mode 100644 circuits/profiling/keccak/src/main.nr delete mode 100644 circuits/profiling/keccak_2x/Nargo.toml delete mode 100644 circuits/profiling/keccak_2x/Prover.toml delete mode 100644 circuits/profiling/keccak_2x/Verifier.toml delete mode 100644 circuits/profiling/keccak_2x/src/main.nr delete mode 100644 circuits/profiling/poseidon/Nargo.toml delete mode 100644 circuits/profiling/poseidon/Prover.toml delete mode 100644 circuits/profiling/poseidon/Verifier.toml delete mode 100644 circuits/profiling/poseidon/src/main.nr delete mode 100644 circuits/profiling/rlp/Nargo.toml delete mode 100644 circuits/profiling/rlp/Prover.toml delete mode 100644 circuits/profiling/rlp/Verifier.toml delete mode 100644 circuits/profiling/rlp/src/main.nr diff --git a/Nargo.toml b/Nargo.toml index 7d42f0062..8fec931ce 100644 --- a/Nargo.toml +++ b/Nargo.toml @@ -1,9 +1,5 @@ [workspace] members = [ - "circuits/main", - "circuits/profiling/poseidon", - "circuits/profiling/keccak", - "circuits/profiling/keccak_2x", - "circuits/profiling/rlp" + "circuits/main" ] default-member = "circuits/main" \ No newline at end of file diff --git a/circuits/profiling/keccak/Nargo.toml b/circuits/profiling/keccak/Nargo.toml deleted file mode 100644 index 97a085d2c..000000000 --- a/circuits/profiling/keccak/Nargo.toml +++ /dev/null @@ -1,3 +0,0 @@ -[package] -name = "keccak" -type = "bin" diff --git a/circuits/profiling/keccak/Prover.toml b/circuits/profiling/keccak/Prover.toml deleted file mode 100644 index 74213d097..000000000 --- a/circuits/profiling/keccak/Prover.toml +++ /dev/null @@ -1 +0,0 @@ -x = 0 \ No newline at end of file diff --git a/circuits/profiling/keccak/Verifier.toml b/circuits/profiling/keccak/Verifier.toml deleted file mode 100644 index e69de29bb..000000000 diff --git a/circuits/profiling/keccak/src/main.nr b/circuits/profiling/keccak/src/main.nr deleted file mode 100644 index 10c56dad3..000000000 --- a/circuits/profiling/keccak/src/main.nr +++ /dev/null @@ -1,8 +0,0 @@ -use dep::std; - -fn main(x: u8) { - let array: [u8; 1000] = [x; 1000]; - let hash = std::hash::keccak256(array, 1000); - std::println(f"hash = {hash}"); - assert(hash[0] == 174); -} diff --git a/circuits/profiling/keccak_2x/Nargo.toml b/circuits/profiling/keccak_2x/Nargo.toml deleted file mode 100644 index d3f502a5e..000000000 --- a/circuits/profiling/keccak_2x/Nargo.toml +++ /dev/null @@ -1,3 +0,0 @@ -[package] -name = "keccak_2x" -type = "bin" diff --git a/circuits/profiling/keccak_2x/Prover.toml b/circuits/profiling/keccak_2x/Prover.toml deleted file mode 100644 index 74213d097..000000000 --- a/circuits/profiling/keccak_2x/Prover.toml +++ /dev/null @@ -1 +0,0 @@ -x = 0 \ No newline at end of file diff --git a/circuits/profiling/keccak_2x/Verifier.toml b/circuits/profiling/keccak_2x/Verifier.toml deleted file mode 100644 index e69de29bb..000000000 diff --git a/circuits/profiling/keccak_2x/src/main.nr b/circuits/profiling/keccak_2x/src/main.nr deleted file mode 100644 index d87568ca6..000000000 --- a/circuits/profiling/keccak_2x/src/main.nr +++ /dev/null @@ -1,11 +0,0 @@ -use dep::std; - -fn main(x: u8) { - let array: [u8; 1000] = [x; 1000]; - let hash = std::hash::keccak256(array, 1000); - let hash2 = std::hash::keccak256(array, 999); - std::println(f"hash = {hash}"); - std::println(f"hash2 = {hash2}"); - assert(hash[0] == 174); - assert(hash2[0] == 10); -} diff --git a/circuits/profiling/poseidon/Nargo.toml b/circuits/profiling/poseidon/Nargo.toml deleted file mode 100644 index 028bc5310..000000000 --- a/circuits/profiling/poseidon/Nargo.toml +++ /dev/null @@ -1,3 +0,0 @@ -[package] -name = "poseidon" -type = "bin" diff --git a/circuits/profiling/poseidon/Prover.toml b/circuits/profiling/poseidon/Prover.toml deleted file mode 100644 index 4452ec679..000000000 --- a/circuits/profiling/poseidon/Prover.toml +++ /dev/null @@ -1 +0,0 @@ -x = 42 \ No newline at end of file diff --git a/circuits/profiling/poseidon/Verifier.toml b/circuits/profiling/poseidon/Verifier.toml deleted file mode 100644 index e69de29bb..000000000 diff --git a/circuits/profiling/poseidon/src/main.nr b/circuits/profiling/poseidon/src/main.nr deleted file mode 100644 index ee3543ae7..000000000 --- a/circuits/profiling/poseidon/src/main.nr +++ /dev/null @@ -1,7 +0,0 @@ -use dep::std; - -fn main(x: Field) { - let hash = std::hash::poseidon::bn254::hash_1([x]); - std::println(f"hash = {hash}"); - assert(hash == 0x1b408dafebeddf0871388399b1e53bd065fd70f18580be5cdde15d7eb2c52743); -} diff --git a/circuits/profiling/rlp/Nargo.toml b/circuits/profiling/rlp/Nargo.toml deleted file mode 100644 index 98ca4a3eb..000000000 --- a/circuits/profiling/rlp/Nargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "rlp" -type = "bin" - -[dependencies] -proof = { tag = "v0.1.0", git = "https://github.com/aragonzkresearch/noir-trie-proofs", directory = "lib" } \ No newline at end of file diff --git a/circuits/profiling/rlp/Prover.toml b/circuits/profiling/rlp/Prover.toml deleted file mode 100644 index 546c51718..000000000 --- a/circuits/profiling/rlp/Prover.toml +++ /dev/null @@ -1,3 +0,0 @@ -block_header = [ - 249, 2, 17, 160, 10, 210, 58, 71, 229, 91, 254, 185, 245, 139, 35, 127, 191, 50, 125, 165, 19, 165, 59, 86, 127, 77, 226, 197, 94, 143, 9, 69, 104, 149, 113, 39, 160, 164, 115, 165, 166, 228, 180, 44, 203, 222, 52, 48, 157, 214, 190, 69, 130, 116, 84, 133, 170, 215, 193, 212, 152, 106, 149, 100, 253, 145, 220, 246, 94, 160, 69, 11, 1, 238, 164, 195, 225, 91, 51, 198, 134, 50, 21, 34, 253, 120, 157, 26, 173, 81, 148, 24, 94, 179, 165, 5, 99, 85, 90, 78, 104, 180, 160, 82, 128, 145, 254, 48, 73, 106, 165, 234, 223, 46, 5, 168, 79, 141, 218, 64, 98, 200, 87, 199, 28, 213, 222, 164, 182, 145, 219, 253, 186, 121, 39, 160, 167, 139, 46, 219, 193, 195, 174, 240, 47, 40, 188, 121, 97, 50, 227, 220, 35, 99, 122, 36, 94, 78, 156, 78, 197, 54, 232, 163, 249, 213, 16, 58, 160, 111, 180, 73, 26, 200, 238, 6, 49, 66, 159, 230, 23, 226, 13, 10, 230, 7, 51, 103, 45, 139, 187, 57, 125, 86, 1, 146, 77, 200, 196, 223, 158, 160, 55, 41, 196, 37, 89, 112, 4, 6, 183, 246, 239, 121, 175, 146, 171, 71, 19, 99, 239, 56, 75, 116, 235, 20, 239, 208, 243, 25, 211, 222, 248, 120, 160, 203, 87, 65, 73, 168, 197, 46, 86, 209, 173, 204, 46, 232, 157, 204, 145, 75, 151, 105, 166, 72, 142, 173, 255, 186, 120, 43, 121, 104, 228, 130, 134, 160, 150, 115, 130, 186, 247, 99, 108, 21, 244, 243, 60, 208, 96, 34, 93, 32, 175, 77, 181, 18, 59, 49, 192, 153, 255, 123, 231, 108, 251, 75, 134, 92, 160, 78, 107, 27, 31, 43, 92, 213, 101, 63, 87, 83, 248, 163, 19, 104, 103, 84, 248, 119, 180, 32, 209, 82, 52, 250, 148, 101, 219, 76, 194, 160, 125, 160, 83, 37, 183, 243, 189, 9, 79, 122, 28, 120, 150, 139, 190, 225, 222, 184, 206, 225, 117, 233, 244, 162, 244, 212, 38, 220, 37, 129, 215, 25, 93, 53, 160, 229, 6, 255, 207, 78, 120, 107, 238, 212, 128, 106, 189, 84, 39, 136, 172, 149, 67, 89, 238, 163, 122, 88, 90, 149, 80, 59, 121, 249, 7, 238, 1, 160, 81, 214, 156, 64, 149, 165, 65, 36, 216, 223, 167, 73, 213, 180, 230, 230, 32, 106, 193, 147, 176, 40, 93, 119, 210, 13, 1, 159, 16, 112, 114, 103, 160, 211, 15, 4, 49, 74, 86, 24, 146, 109, 246, 80, 207, 194, 97, 226, 153, 241, 94, 43, 233, 192, 2, 152, 171, 150, 86, 26, 250, 234, 179, 74, 156, 160, 175, 157, 156, 73, 109, 26, 48, 12, 182, 175, 211, 173, 181, 241, 131, 247, 105, 98, 255, 101, 7, 227, 21, 63, 78, 41, 155, 58, 231, 222, 15, 141, 160, 219, 213, 163, 116, 191, 119, 232, 215, 182, 77, 130, 102, 90, 48, 66, 197, 228, 202, 43, 169, 232, 246, 11, 23, 100, 50, 211, 205, 202, 115, 60, 49, 128 -] \ No newline at end of file diff --git a/circuits/profiling/rlp/Verifier.toml b/circuits/profiling/rlp/Verifier.toml deleted file mode 100644 index e69de29bb..000000000 diff --git a/circuits/profiling/rlp/src/main.nr b/circuits/profiling/rlp/src/main.nr deleted file mode 100644 index 6082289f5..000000000 --- a/circuits/profiling/rlp/src/main.nr +++ /dev/null @@ -1,10 +0,0 @@ -use dep::std; -use dep::proof::rlp; - -global MAX_HEADER_RLP_SIZE = 532; -global HEADER_FIELDS_COUNT = 17; - -fn main(block_header: [u8; MAX_HEADER_RLP_SIZE]) { - let decoded: rlp::RLP_List = rlp::decode1(block_header); - std::println(decoded); -}