Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/circuits-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ on:
required: false
type: string
default: ''
run-id:
description: 'Run ID to download artifacts .'
required: false
type: string
default: ''
Comment on lines +23 to +27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix invalid expression for run-id input.

inputs.run-id is parsed as inputs.run - id, so the condition will never behave correctly and the download step passes an empty run ID. Use bracket notation for hyphenated workflow inputs.

-      run-id:
+      run-id:
         description: 'Run ID to download artifacts .'
         required: false
         type: string
         default: ''
…
-      - name: Download previous artifacts
-        if: github.event_name == 'workflow_dispatch' && inputs.run-id != ''
+      - name: Download previous artifacts
+        if: github.event_name == 'workflow_dispatch' && inputs['run-id'] != ''
         uses: dawidd6/action-download-artifact@v6
         with:
           name: circuits
           path: output/
-          run_id: ${{ inputs.run-id }}
+          run_id: ${{ inputs['run-id'] }}

Also applies to: 160-166

🤖 Prompt for AI Agents
In .github/workflows/circuits-build.yml around lines 23 to 27 (and also apply
the same change at lines 160-166), the workflow references the hyphenated input
as inputs.run-id which is parsed as inputs.run - id and yields incorrect/empty
values; update all expressions that reference this input to use bracket notation
inputs['run-id'] (and any other hyphenated input names) so the condition and
artifact download receive the correct run ID.


concurrency:
group: circuits-build-${{ github.workflow }}-${{ github.ref }}
Expand All @@ -30,6 +35,7 @@ jobs:
runs-on: ["128ram"]
permissions:
contents: read
actions: read
env:
CIRCOM_VERSION: "2.1.9"
CIRCOM_SHA256: "e5575829252d763b7818049df9de2ef9304df834697de77fa63ce7babc23c967"
Expand Down Expand Up @@ -151,12 +157,12 @@ jobs:
run: circom --version

- name: Download previous artifacts
if: github.event_name == 'workflow_dispatch' && (inputs.circuit-type != '' || inputs.circuit-name != '')
uses: actions/download-artifact@v4
if: github.event_name == 'workflow_dispatch' && inputs.run-id != ''
uses: dawidd6/action-download-artifact@v6
with:
name: circuits
path: output/
continue-on-error: true
run_id: ${{ inputs.run-id }}

- name: Build cpp circuits
run: |
Expand Down
7 changes: 4 additions & 3 deletions circuits/scripts/build/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ DSC_CIRCUITS=(
"dsc_sha512_ecdsa_secp521r1:true"
"dsc_sha512_rsa_65537_4096:true"
"dsc_sha512_rsapss_65537_64_4096:true"
"dsc_sha384_rsapss_65537_48_3072:true"
)

if [[ $1 == "register" ]]; then
Expand Down Expand Up @@ -163,9 +164,9 @@ for item in "${allowed_circuits[@]}"; do
circuit_name="${filename%.*}"
(
circom $filepath \
-l "node_modules" \
-l "node_modules/@zk-kit/binary-merkle-root.circom/src" \
-l "node_modules/circomlib/circuits" \
-l "circuits/node_modules" \
-l "circuits/node_modules/@zk-kit/binary-merkle-root.circom/src" \
-l "circuits/node_modules/circomlib/circuits" \
--O1 -c --output $output && \
cd $output/${circuit_name}_cpp && \
make
Expand Down
1 change: 1 addition & 0 deletions circuits/scripts/build/build_r1cs_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ DSC_CIRCUITS=(
"dsc_sha512_ecdsa_secp521r1:true"
"dsc_sha512_rsa_65537_4096:true"
"dsc_sha512_rsapss_65537_64_4096:true"
"dsc_sha384_rsapss_65537_48_3072:true"
)

if [[ $1 == "register" ]]; then
Expand Down
7 changes: 4 additions & 3 deletions circuits/scripts/build/build_single_circuit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ DSC_CIRCUITS=(
"dsc_sha512_ecdsa_secp521r1"
"dsc_sha512_rsa_65537_4096"
"dsc_sha512_rsapss_65537_64_4096"
"dsc_sha384_rsapss_65537_48_3072"
)

# Extract circuit type
Expand Down Expand Up @@ -226,9 +227,9 @@ fi

# Compile circuit and C++ code
circom "$filepath" \
-l "node_modules" \
-l "node_modules/@zk-kit/binary-merkle-root.circom/src" \
-l "node_modules/circomlib/circuits" \
-l "circuits/node_modules" \
-l "circuits/node_modules/@zk-kit/binary-merkle-root.circom/src" \
-l "circuits/node_modules/circomlib/circuits" \
--O1 -c --output "$output" && \
cd "$output/${CIRCUIT_NAME}_cpp" && \
make
Expand Down
Loading