From b11032e520438f2bebe0752fd78c287e9ed625f3 Mon Sep 17 00:00:00 2001 From: Waylon Jepsen Date: Mon, 4 Nov 2024 15:52:51 +0700 Subject: [PATCH] chore: new other build files creates two new builds for 512 bytes and 256 bytes. Also runs wit calc in the CI tests whereas before it was just being installed in the artifacts jobs and being used. I double checked the artifact Job and the make file and believe that they will both correctly make separate zips for each build. There was also one miscellaneous empty file with a .built extension that i assumed was a mistake so i removed it. --- .github/workflows/artifacts.yaml | 7 ------- .github/workflows/test.yml | 13 ++++++++++++- .../http_parse_and_lock_start_line_1024b.built | 0 builds/target_256b/aes_gctr_nivc_256b.circom | 6 ++++++ builds/target_256b/http_body_mask_256b.circom | 6 ++++++ builds/target_256b/http_lock_header_256b.circom | 5 +++++ .../http_parse_and_lock_start_line_256b.circom | 5 +++++ builds/target_256b/json_extract_value_256b.circom | 5 +++++ .../target_256b/json_mask_array_index_256b.circom | 5 +++++ builds/target_256b/json_mask_object_256b.circom | 5 +++++ builds/target_256b/json_parse_256b.circom | 6 ++++++ builds/target_512b/aes_gctr_nivc_512b.circom | 6 ++++++ builds/target_512b/http_body_mask_512b.circom | 6 ++++++ builds/target_512b/http_lock_header_512b.circom | 5 +++++ .../http_parse_and_lock_start_line_512b.circom | 5 +++++ builds/target_512b/json_extract_value_512b.circom | 5 +++++ .../target_512b/json_mask_array_index_512b.circom | 5 +++++ builds/target_512b/json_mask_object_512b.circom | 5 +++++ builds/target_512b/json_parse_512b.circom | 6 ++++++ 19 files changed, 98 insertions(+), 8 deletions(-) delete mode 100644 builds/target_1024b/http_parse_and_lock_start_line_1024b.built create mode 100644 builds/target_256b/aes_gctr_nivc_256b.circom create mode 100644 builds/target_256b/http_body_mask_256b.circom create mode 100644 builds/target_256b/http_lock_header_256b.circom create mode 100644 builds/target_256b/http_parse_and_lock_start_line_256b.circom create mode 100644 builds/target_256b/json_extract_value_256b.circom create mode 100644 builds/target_256b/json_mask_array_index_256b.circom create mode 100644 builds/target_256b/json_mask_object_256b.circom create mode 100644 builds/target_256b/json_parse_256b.circom create mode 100644 builds/target_512b/aes_gctr_nivc_512b.circom create mode 100644 builds/target_512b/http_body_mask_512b.circom create mode 100644 builds/target_512b/http_lock_header_512b.circom create mode 100644 builds/target_512b/http_parse_and_lock_start_line_512b.circom create mode 100644 builds/target_512b/json_extract_value_512b.circom create mode 100644 builds/target_512b/json_mask_array_index_512b.circom create mode 100644 builds/target_512b/json_mask_object_512b.circom create mode 100644 builds/target_512b/json_parse_512b.circom diff --git a/.github/workflows/artifacts.yaml b/.github/workflows/artifacts.yaml index 06c5daa..30cda10 100644 --- a/.github/workflows/artifacts.yaml +++ b/.github/workflows/artifacts.yaml @@ -69,13 +69,6 @@ jobs: sudo mv circom /usr/local/bin/ circom --version - - name: Install circom-witnesscalc - run: | - cd .. && git clone https://github.com/pluto/circom-witnesscalc.git - cd circom-witnesscalc - cargo install --path . - echo $(which build-circuit) - - name: Install Node.js dependencies run: | npm ci diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f89936c..7e112e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,4 +36,15 @@ jobs: circom --version - name: Run tests - run: npm run test \ No newline at end of file + run: npm run test + + - name: Install circom-witnesscalc + run: | + cd .. && git clone https://github.com/pluto/circom-witnesscalc.git + cd circom-witnesscalc + cargo install --path . + echo $(which build-circuit) + + - name: Run build-circuit on target files + run: | + build-circuit builds/target_256b/*.circom \ No newline at end of file diff --git a/builds/target_1024b/http_parse_and_lock_start_line_1024b.built b/builds/target_1024b/http_parse_and_lock_start_line_1024b.built deleted file mode 100644 index e69de29..0000000 diff --git a/builds/target_256b/aes_gctr_nivc_256b.circom b/builds/target_256b/aes_gctr_nivc_256b.circom new file mode 100644 index 0000000..478c4b2 --- /dev/null +++ b/builds/target_256b/aes_gctr_nivc_256b.circom @@ -0,0 +1,6 @@ +pragma circom 2.1.9; + +include "../../circuits/aes-gcm/nivc/aes-gctr-nivc.circom"; + +// the circomkit tests become unhappy when there is a main. +component main { public [step_in] } = AESGCTRFOLD(256, 10); \ No newline at end of file diff --git a/builds/target_256b/http_body_mask_256b.circom b/builds/target_256b/http_body_mask_256b.circom new file mode 100644 index 0000000..ffb3b7e --- /dev/null +++ b/builds/target_256b/http_body_mask_256b.circom @@ -0,0 +1,6 @@ +pragma circom 2.1.9; + +include "../../circuits/http/nivc/body_mask.circom"; + +component main { public [step_in] } = HTTPMaskBodyNIVC(512, 10); + diff --git a/builds/target_256b/http_lock_header_256b.circom b/builds/target_256b/http_lock_header_256b.circom new file mode 100644 index 0000000..02d9dc9 --- /dev/null +++ b/builds/target_256b/http_lock_header_256b.circom @@ -0,0 +1,5 @@ +pragma circom 2.1.9; + +include "../../circuits/http/nivc/lock_header.circom"; + +component main { public [step_in] } = LockHeader(512, 10, 50, 100); \ No newline at end of file diff --git a/builds/target_256b/http_parse_and_lock_start_line_256b.circom b/builds/target_256b/http_parse_and_lock_start_line_256b.circom new file mode 100644 index 0000000..92c2bc8 --- /dev/null +++ b/builds/target_256b/http_parse_and_lock_start_line_256b.circom @@ -0,0 +1,5 @@ +pragma circom 2.1.9; + +include "../../circuits/http/nivc/parse_and_lock_start_line.circom"; + +component main { public [step_in] } = ParseAndLockStartLine(512, 10, 20, 20, 20); \ No newline at end of file diff --git a/builds/target_256b/json_extract_value_256b.circom b/builds/target_256b/json_extract_value_256b.circom new file mode 100644 index 0000000..da8db1f --- /dev/null +++ b/builds/target_256b/json_extract_value_256b.circom @@ -0,0 +1,5 @@ +pragma circom 2.1.9; + +include "../../circuits/json/nivc/extractor.circom"; + +component main { public [step_in] } = MaskExtractFinal(256, 10, 50); \ No newline at end of file diff --git a/builds/target_256b/json_mask_array_index_256b.circom b/builds/target_256b/json_mask_array_index_256b.circom new file mode 100644 index 0000000..83ebb08 --- /dev/null +++ b/builds/target_256b/json_mask_array_index_256b.circom @@ -0,0 +1,5 @@ +pragma circom 2.1.9; + +include "../../circuits/json/nivc/masker.circom"; + +component main { public [step_in] } = JsonMaskArrayIndexNIVC(256, 10); \ No newline at end of file diff --git a/builds/target_256b/json_mask_object_256b.circom b/builds/target_256b/json_mask_object_256b.circom new file mode 100644 index 0000000..b6bb1ef --- /dev/null +++ b/builds/target_256b/json_mask_object_256b.circom @@ -0,0 +1,5 @@ +pragma circom 2.1.9; + +include "../../circuits/json/nivc/masker.circom"; + +component main { public [step_in] } = JsonMaskObjectNIVC(256, 10, 10); diff --git a/builds/target_256b/json_parse_256b.circom b/builds/target_256b/json_parse_256b.circom new file mode 100644 index 0000000..c0f5e8c --- /dev/null +++ b/builds/target_256b/json_parse_256b.circom @@ -0,0 +1,6 @@ +pragma circom 2.1.9; + +include "../../circuits/json/nivc/parse.circom"; + +component main { public [step_in] } = JsonParseNIVC(256, 10); + diff --git a/builds/target_512b/aes_gctr_nivc_512b.circom b/builds/target_512b/aes_gctr_nivc_512b.circom new file mode 100644 index 0000000..07939ff --- /dev/null +++ b/builds/target_512b/aes_gctr_nivc_512b.circom @@ -0,0 +1,6 @@ +pragma circom 2.1.9; + +include "../../circuits/aes-gcm/nivc/aes-gctr-nivc.circom"; + +// the circomkit tests become unhappy when there is a main. +component main { public [step_in] } = AESGCTRFOLD(512, 10); \ No newline at end of file diff --git a/builds/target_512b/http_body_mask_512b.circom b/builds/target_512b/http_body_mask_512b.circom new file mode 100644 index 0000000..ffb3b7e --- /dev/null +++ b/builds/target_512b/http_body_mask_512b.circom @@ -0,0 +1,6 @@ +pragma circom 2.1.9; + +include "../../circuits/http/nivc/body_mask.circom"; + +component main { public [step_in] } = HTTPMaskBodyNIVC(512, 10); + diff --git a/builds/target_512b/http_lock_header_512b.circom b/builds/target_512b/http_lock_header_512b.circom new file mode 100644 index 0000000..02d9dc9 --- /dev/null +++ b/builds/target_512b/http_lock_header_512b.circom @@ -0,0 +1,5 @@ +pragma circom 2.1.9; + +include "../../circuits/http/nivc/lock_header.circom"; + +component main { public [step_in] } = LockHeader(512, 10, 50, 100); \ No newline at end of file diff --git a/builds/target_512b/http_parse_and_lock_start_line_512b.circom b/builds/target_512b/http_parse_and_lock_start_line_512b.circom new file mode 100644 index 0000000..92c2bc8 --- /dev/null +++ b/builds/target_512b/http_parse_and_lock_start_line_512b.circom @@ -0,0 +1,5 @@ +pragma circom 2.1.9; + +include "../../circuits/http/nivc/parse_and_lock_start_line.circom"; + +component main { public [step_in] } = ParseAndLockStartLine(512, 10, 20, 20, 20); \ No newline at end of file diff --git a/builds/target_512b/json_extract_value_512b.circom b/builds/target_512b/json_extract_value_512b.circom new file mode 100644 index 0000000..a7fa283 --- /dev/null +++ b/builds/target_512b/json_extract_value_512b.circom @@ -0,0 +1,5 @@ +pragma circom 2.1.9; + +include "../../circuits/json/nivc/extractor.circom"; + +component main { public [step_in] } = MaskExtractFinal(512, 10, 50); \ No newline at end of file diff --git a/builds/target_512b/json_mask_array_index_512b.circom b/builds/target_512b/json_mask_array_index_512b.circom new file mode 100644 index 0000000..ec72dc7 --- /dev/null +++ b/builds/target_512b/json_mask_array_index_512b.circom @@ -0,0 +1,5 @@ +pragma circom 2.1.9; + +include "../../circuits/json/nivc/masker.circom"; + +component main { public [step_in] } = JsonMaskArrayIndexNIVC(512, 10); \ No newline at end of file diff --git a/builds/target_512b/json_mask_object_512b.circom b/builds/target_512b/json_mask_object_512b.circom new file mode 100644 index 0000000..3bd0e31 --- /dev/null +++ b/builds/target_512b/json_mask_object_512b.circom @@ -0,0 +1,5 @@ +pragma circom 2.1.9; + +include "../../circuits/json/nivc/masker.circom"; + +component main { public [step_in] } = JsonMaskObjectNIVC(512, 10, 10); diff --git a/builds/target_512b/json_parse_512b.circom b/builds/target_512b/json_parse_512b.circom new file mode 100644 index 0000000..a48a10b --- /dev/null +++ b/builds/target_512b/json_parse_512b.circom @@ -0,0 +1,6 @@ +pragma circom 2.1.9; + +include "../../circuits/json/nivc/parse.circom"; + +component main { public [step_in] } = JsonParseNIVC(512, 10); +