mirror of
https://github.com/logos-blockchain/logos-blockchain-pocs.git
synced 2026-02-09 15:43:23 +00:00
Asbtract witness generator compilation and bundling into action.
This commit is contained in:
parent
dfeaea6315
commit
f19f024ce4
115
.github/actions/compile-and-bundle/action.yml
vendored
Normal file
115
.github/actions/compile-and-bundle/action.yml
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
name: "Compile and Bundle Circuit"
|
||||
description: "Compiles and bundles the witness generator of a Circom Circuit"
|
||||
branding:
|
||||
icon: "package"
|
||||
color: "blue"
|
||||
|
||||
inputs:
|
||||
circuit-name-display:
|
||||
description: "The name of the Circom circuit to compile."
|
||||
required: true
|
||||
circuit-name-binary:
|
||||
description: "The final name of the compiled binary. The name should be extensionless."
|
||||
required: true
|
||||
repository-root-path:
|
||||
description: "The path to the repository root containing the Circom circuit."
|
||||
required: true
|
||||
repository-circuit-path:
|
||||
description: "The path to the Circom circuit file relative to the repository root."
|
||||
required: true
|
||||
version:
|
||||
description: "The version of the bundle. E.g.: v1.0.0."
|
||||
required: true
|
||||
os:
|
||||
description: "The target operating system for the bundle (linux, windows, macos)."
|
||||
required: true
|
||||
arch:
|
||||
description: "The target architecture for the bundle (x86_64, aarch64)."
|
||||
required: true
|
||||
|
||||
runs:
|
||||
name: Compile and Bundle ${{ inputs.circuit-name-display }}
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Parse Circuit Path
|
||||
id: parse-circuit-path
|
||||
env:
|
||||
REPOSITORY_ROOT_PATH: ${{ inputs.repository-root-path }}
|
||||
REPOSITORY_CIRCUIT_PATH: ${{ inputs.repository-circuit-path }}
|
||||
BUNDLE_TRIPLET: ${{ inputs.version }}-${{ inputs.os }}-${{ inputs.arch }}
|
||||
CIRCUIT_NAME_BINARY: ${{ inputs.circuit-name-binary }}
|
||||
OS: ${{ inputs.os }}
|
||||
run: |
|
||||
CIRCUIT_PATH="${REPOSITORY_ROOT_PATH}/${REPOSITORY_CIRCUIT_PATH}"
|
||||
CIRCUIT_DIRECTORY="$(dirname ${CIRCUIT_PATH})"
|
||||
CIRCUIT_FILENAME="$(basename ${CIRCUIT_PATH})"
|
||||
CIRCUIT_FILESTEM="${CIRCUIT_FILENAME%.circom}"
|
||||
CIRCUIT_CPP_DIRNAME="${CIRCUIT_FILESTEM}_cpp"
|
||||
RESOURCES_PATH="${REPOSITORY_ROOT_PATH}/.github/resources/"
|
||||
|
||||
platform_binary_name="${CIRCUIT_NAME_BINARY}"
|
||||
if [ "${OS}" = "windows" ]; then
|
||||
platform_binary_name="${platform_binary_name}.exe"
|
||||
fi
|
||||
|
||||
{
|
||||
echo "CIRCUIT_DIRECTORY=${CIRCUIT_DIRECTORY}"
|
||||
echo "CIRCUIT_FILENAME=${CIRCUIT_FILENAME}"
|
||||
echo "CIRCUIT_FILESTEM=${CIRCUIT_FILESTEM}"
|
||||
echo "CIRCUIT_CPP_DIRNAME=${CIRCUIT_CPP_DIRNAME}"
|
||||
echo "CIRCUIT_CPP_PATH=${CIRCUIT_DIRECTORY}/${CIRCUIT_CPP_DIRNAME}"
|
||||
echo "WITNESS_GENERATOR_RESOURCES_PATH=${RESOURCES_PATH}/witness-generator"
|
||||
echo "BUNDLE_TRIPLET=${BUNDLE_TRIPLET}"
|
||||
echo "PLATFORM_BINARY_NAME=${platform_binary_name}"
|
||||
} >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Generate ${{ inputs.circuit-name-display }}
|
||||
working-directory: ${{ steps.parse-circuit-path.outputs.CIRCUIT_DIRECTORY }}
|
||||
env:
|
||||
CIRCUIT_FILENAME: ${{ steps.parse-circuit-path.outputs.CIRCUIT_FILENAME }}
|
||||
run: circom --c --r1cs --no_asm --O2 "${CIRCUIT_FILENAME}"
|
||||
|
||||
# TODO: Instead of replace, make a fork that generates the appropriate Makefile
|
||||
- name: Replace ${{ inputs.circuit-name-display }}'s Makefile
|
||||
env:
|
||||
WITNESS_GENERATOR_RESOURCES_PATH: ${{ steps.parse-circuit-path.outputs.WITNESS_GENERATOR_RESOURCES_PATH }}
|
||||
CIRCUIT_CPP_PATH: ${{ steps.parse-circuit-path.outputs.CIRCUIT_CPP_PATH }}
|
||||
run: cp "${WITNESS_GENERATOR_RESOURCES_PATH}/Makefile" "${CIRCUIT_CPP_PATH}/Makefile"
|
||||
|
||||
# TODO: Instead of insertion, make a fork that includes the appropriate patch (or the actual fix)
|
||||
- name: Patch MacOS GMP
|
||||
if: ${{ inputs.os == 'macos' }}
|
||||
env:
|
||||
WITNESS_GENERATOR_RESOURCES_PATH: ${{ steps.parse-circuit-path.outputs.WITNESS_GENERATOR_RESOURCES_PATH }}
|
||||
CIRCUIT_CPP_PATH: ${{ steps.parse-circuit-path.outputs.CIRCUIT
|
||||
OS: ${{ inputs.os }}
|
||||
run: cp "${WITNESS_GENERATOR_RESOURCES_PATH}/${{ env.OS }}.gmp_patch.hpp" "${CIRCUIT_CPP_PATH}/gmp_patch.hpp"
|
||||
|
||||
- name: Compile ${{ inputs.circuit-name-display }}
|
||||
working-directory: ${{ steps.parse-circuit-path.outputs.CIRCUIT_CPP_PATH }}
|
||||
env:
|
||||
CIRCUIT_FILESTEM: ${{ steps.parse-circuit-path.outputs.CIRCUIT_FILESTEM }}
|
||||
OS: ${{ inputs.os }}
|
||||
run: make PROJECT="${CIRCUIT_FILESTEM}" "${OS}"
|
||||
|
||||
- name: Bundle ${{ inputs.circuit-name-display }}
|
||||
working-directory: ${{ inputs.repository-root-path }}
|
||||
env:
|
||||
CIRCUIT_NAME: ${{ steps.parse-circuit-path.outputs.CIRCUIT_FILESTEM }}
|
||||
PLATFORM_BINARY_NAME: ${{ steps.parse-circuit-path.outputs.PLATFORM_BINARY_NAME }}
|
||||
BUNDLE_NAME: ${{ inputs.circuit-name-binary }}-${{ steps.parse-circuit-path.outputs.BUNDLE_TRIPLET }}
|
||||
WITNESS_GENERATOR_DIR: ${{ steps.parse-circuit-path.outputs.CIRCUIT_CPP_PATH }}
|
||||
run: |
|
||||
BUNDLE_DIR="${BUNDLE_NAME}/witness-generator"
|
||||
mkdir -p "$BUNDLE_DIR"
|
||||
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}"
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}.dat" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}.dat"
|
||||
|
||||
tar -czf "${BUNDLE_NAME}.tar.gz" "${BUNDLE_NAME}"
|
||||
|
||||
- name: Upload ${{ inputs.circuit-name-display }}
|
||||
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
|
||||
with:
|
||||
name: ${{ inputs.circuit-name-binary }}-${{ steps.parse-circuit-path.outputs.BUNDLE_TRIPLET }}.tar.gz
|
||||
path: ${{ inputs.repository-root-path }}/${{ inputs.circuit-name-binary }}-${{ steps.parse-circuit-path.outputs.BUNDLE_TRIPLET }}.tar.gz
|
||||
389
.github/workflows/build-circuits.yml
vendored
389
.github/workflows/build-circuits.yml
vendored
@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- "circom_circuits-v*.*.*"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
@ -23,7 +24,8 @@ jobs:
|
||||
env:
|
||||
# Use the tag name if it is available, otherwise use the input version.
|
||||
# If neither is available, default to the commit hash.
|
||||
TAG: ${{ (github.ref_type == 'tag' && github.ref_name) || inputs.tag || '' }}
|
||||
# TAG: ${{ (github.ref_type == 'tag' && github.ref_name) || inputs.tag || '' }}
|
||||
TAG: ${{ (github.ref_type == 'tag' && github.ref_name) || inputs.tag || 'circom_circuits-v0.0.0' }}
|
||||
run: |
|
||||
if [ -z "$TAG" ]; then
|
||||
echo "Could not determine tag."
|
||||
@ -93,42 +95,6 @@ jobs:
|
||||
./build_gmp.sh host
|
||||
make host_linux_x86_64_static
|
||||
|
||||
- name: Generate PoL
|
||||
working-directory: repo/circom_circuits/Mantle
|
||||
run: circom --c --r1cs --no_asm --O2 pol.circom
|
||||
|
||||
- name: Replace PoL Makefile # TODO: Make a fork generate the appropriate Linux Makefile
|
||||
working-directory: repo
|
||||
run: cp .github/resources/witness-generator/Makefile circom_circuits/Mantle/pol_cpp/Makefile
|
||||
|
||||
- name: Compile PoL
|
||||
working-directory: repo/circom_circuits/Mantle/pol_cpp
|
||||
run: make PROJECT=pol linux
|
||||
|
||||
- name: Generate PoQ
|
||||
working-directory: repo/circom_circuits/Blend
|
||||
run: circom --c --r1cs --no_asm --O2 poq.circom
|
||||
|
||||
- name: Replace PoQ Makefile # TODO: Make a fork generate the appropriate Linux Makefile
|
||||
working-directory: repo
|
||||
run: cp .github/resources/witness-generator/Makefile circom_circuits/Blend/poq_cpp/Makefile
|
||||
|
||||
- name: Compile PoQ
|
||||
working-directory: repo/circom_circuits/Blend/poq_cpp
|
||||
run: make PROJECT=poq linux
|
||||
|
||||
- name: Generate ZKSign
|
||||
working-directory: repo/circom_circuits/Mantle
|
||||
run: circom --c --r1cs --no_asm --O2 signature.circom
|
||||
|
||||
- name: Replace ZKSign Makefile # TODO: Make a fork generate the appropriate Linux Makefile
|
||||
working-directory: repo
|
||||
run: cp .github/resources/witness-generator/Makefile circom_circuits/Mantle/signature_cpp/Makefile
|
||||
|
||||
- name: Compile ZKSign
|
||||
working-directory: repo/circom_circuits/Mantle/signature_cpp
|
||||
run: make PROJECT=signature linux
|
||||
|
||||
- name: Bundle Rapidsnark Prover
|
||||
working-directory: repo
|
||||
env:
|
||||
@ -157,55 +123,6 @@ jobs:
|
||||
|
||||
tar -czf "${BUNDLE_NAME}.tar.gz" "${BUNDLE_NAME}"
|
||||
|
||||
- name: Bundle PoL Witness Generator
|
||||
working-directory: repo
|
||||
env:
|
||||
CIRCUIT_NAME: pol
|
||||
PLATFORM_BINARY_NAME: pol
|
||||
BUNDLE_NAME: pol-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||
WITNESS_GENERATOR_DIR: circom_circuits/Mantle/pol_cpp
|
||||
run: |
|
||||
BUNDLE_DIR="${BUNDLE_NAME}/witness-generator"
|
||||
mkdir -p "$BUNDLE_DIR"
|
||||
|
||||
ls -la ${WITNESS_GENERATOR_DIR}
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}"
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}.dat" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}.dat"
|
||||
|
||||
tar -czf "${BUNDLE_NAME}.tar.gz" "${BUNDLE_NAME}"
|
||||
|
||||
- name: Bundle PoQ Witness Generator
|
||||
working-directory: repo
|
||||
env:
|
||||
CIRCUIT_NAME: poq
|
||||
PLATFORM_BINARY_NAME: poq
|
||||
BUNDLE_NAME: poq-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||
WITNESS_GENERATOR_DIR: circom_circuits/Blend/poq_cpp
|
||||
run: |
|
||||
BUNDLE_DIR="${BUNDLE_NAME}/witness-generator"
|
||||
mkdir -p "$BUNDLE_DIR"
|
||||
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}"
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}.dat" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}.dat"
|
||||
|
||||
tar -czf "${BUNDLE_NAME}.tar.gz" "${BUNDLE_NAME}"
|
||||
|
||||
- name: Bundle ZKSign Witness Generator
|
||||
working-directory: repo
|
||||
env:
|
||||
CIRCUIT_NAME: signature
|
||||
PLATFORM_BINARY_NAME: zksign
|
||||
BUNDLE_NAME: zksign-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||
WITNESS_GENERATOR_DIR: circom_circuits/Mantle/signature_cpp
|
||||
run: |
|
||||
BUNDLE_DIR="${BUNDLE_NAME}/witness-generator"
|
||||
mkdir -p "$BUNDLE_DIR"
|
||||
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}"
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}.dat" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}.dat"
|
||||
|
||||
tar -czf "${BUNDLE_NAME}.tar.gz" "${BUNDLE_NAME}"
|
||||
|
||||
- name: Upload Rapidsnark Prover
|
||||
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
|
||||
with:
|
||||
@ -218,23 +135,35 @@ jobs:
|
||||
name: verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
path: repo/verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
|
||||
- name: Upload PoL Witness Generator
|
||||
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
|
||||
- uses: ./.github/actions/compile-and-bundle
|
||||
with:
|
||||
name: pol-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
path: repo/pol-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
circuit-name-display: "PoL"
|
||||
circuit-name-binary: "pol"
|
||||
repository-root-path: "repo"
|
||||
repository-circuit-path: "circom_circuits/Mantle/pol.circom"
|
||||
version: ${{ env.VERSION }}
|
||||
os: ${{ env.OS }}
|
||||
arch: ${{ env.ARCH }}
|
||||
|
||||
- name: Upload PoQ Witness Generator
|
||||
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
|
||||
- uses: ./.github/actions/compile-and-bundle
|
||||
with:
|
||||
name: poq-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
path: repo/poq-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
circuit-name-display: "PoQ"
|
||||
circuit-name-binary: "poq"
|
||||
repository-root-path: "repo"
|
||||
repository-circuit-path: "circom_circuits/Blend/poq.circom"
|
||||
version: ${{ env.VERSION }}
|
||||
os: ${{ env.OS }}
|
||||
arch: ${{ env.ARCH }}
|
||||
|
||||
- name: Upload ZKSign Witness Generator
|
||||
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
|
||||
- uses: ./.github/actions/compile-and-bundle
|
||||
with:
|
||||
name: zksign-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
path: repo/zksign-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
circuit-name-display: "ZKSign"
|
||||
circuit-name-binary: "zksign"
|
||||
repository-root-path: "repo"
|
||||
repository-circuit-path: "circom_circuits/Mantle/signature.circom"
|
||||
version: ${{ env.VERSION }}
|
||||
os: ${{ env.OS }}
|
||||
arch: ${{ env.ARCH }}
|
||||
|
||||
build-windows:
|
||||
name: Build Windows Binaries (Native)
|
||||
@ -330,48 +259,6 @@ jobs:
|
||||
./build_gmp.sh host
|
||||
make host_windows_x86_64_static
|
||||
|
||||
- name: Generate PoL
|
||||
working-directory: repo/circom_circuits/Mantle
|
||||
run: circom --c --r1cs --no_asm pol.circom
|
||||
|
||||
- name: Replace PoL Makefile # TODO: Make a fork generate the appropriate Windows Makefile
|
||||
shell: msys2 {0}
|
||||
working-directory: repo
|
||||
run: cp .github/resources/witness-generator/Makefile circom_circuits/Mantle/pol_cpp/Makefile
|
||||
|
||||
- name: Compile PoL
|
||||
shell: msys2 {0}
|
||||
working-directory: repo/circom_circuits/Mantle/pol_cpp
|
||||
run: make PROJECT=pol windows
|
||||
|
||||
- name: Generate PoQ
|
||||
working-directory: repo/circom_circuits/Blend
|
||||
run: circom --c --r1cs --no_asm poq.circom
|
||||
|
||||
- name: Replace PoQ Makefile # TODO: Make a fork generate the appropriate Windows Makefile
|
||||
shell: msys2 {0}
|
||||
working-directory: repo
|
||||
run: cp .github/resources/witness-generator/Makefile circom_circuits/Blend/poq_cpp/Makefile
|
||||
|
||||
- name: Compile PoQ
|
||||
shell: msys2 {0}
|
||||
working-directory: repo/circom_circuits/Blend/poq_cpp
|
||||
run: make PROJECT=poq windows
|
||||
|
||||
- name: Generate ZKSign
|
||||
working-directory: repo/circom_circuits/Mantle
|
||||
run: circom --c --r1cs --no_asm signature.circom
|
||||
|
||||
- name: Replace ZKSign Makefile # TODO: Make a fork generate the appropriate Windows Makefile
|
||||
shell: msys2 {0}
|
||||
working-directory: repo
|
||||
run: cp .github/resources/witness-generator/Makefile circom_circuits/Mantle/signature_cpp/Makefile
|
||||
|
||||
- name: Compile ZKSign
|
||||
shell: msys2 {0}
|
||||
working-directory: repo/circom_circuits/Mantle/signature_cpp
|
||||
run: make PROJECT=signature windows
|
||||
|
||||
- name: Bundle Rapidsnark Prover
|
||||
shell: msys2 {0}
|
||||
working-directory: repo
|
||||
@ -402,57 +289,6 @@ jobs:
|
||||
|
||||
tar -czf "${BUNDLE_NAME}.tar.gz" "${BUNDLE_NAME}"
|
||||
|
||||
- name: Bundle PoL Witness Generator
|
||||
shell: msys2 {0}
|
||||
working-directory: repo
|
||||
env:
|
||||
CIRCUIT_NAME: pol
|
||||
PLATFORM_BINARY_NAME: pol.exe
|
||||
BUNDLE_NAME: pol-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||
WITNESS_GENERATOR_DIR: circom_circuits/Mantle/pol_cpp
|
||||
run: |
|
||||
BUNDLE_DIR="${BUNDLE_NAME}/witness-generator"
|
||||
mkdir -p "$BUNDLE_DIR"
|
||||
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}"
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}.dat" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}.dat"
|
||||
|
||||
tar -czf "${BUNDLE_NAME}.tar.gz" "${BUNDLE_NAME}"
|
||||
|
||||
- name: Bundle PoQ Witness Generator
|
||||
shell: msys2 {0}
|
||||
working-directory: repo
|
||||
env:
|
||||
CIRCUIT_NAME: poq
|
||||
PLATFORM_BINARY_NAME: poq.exe
|
||||
BUNDLE_NAME: poq-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||
WITNESS_GENERATOR_DIR: circom_circuits/Blend/poq_cpp
|
||||
run: |
|
||||
BUNDLE_DIR="${BUNDLE_NAME}/witness-generator"
|
||||
mkdir -p "$BUNDLE_DIR"
|
||||
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}"
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}.dat" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}.dat"
|
||||
|
||||
tar -czf "${BUNDLE_NAME}.tar.gz" "${BUNDLE_NAME}"
|
||||
|
||||
- name: Bundle ZKSign Witness Generator
|
||||
shell: msys2 {0}
|
||||
working-directory: repo
|
||||
env:
|
||||
CIRCUIT_NAME: signature
|
||||
PLATFORM_BINARY_NAME: zksign.exe
|
||||
BUNDLE_NAME: zksign-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||
WITNESS_GENERATOR_DIR: circom_circuits/Mantle/signature_cpp
|
||||
run: |
|
||||
BUNDLE_DIR="${BUNDLE_NAME}/witness-generator"
|
||||
mkdir -p "$BUNDLE_DIR"
|
||||
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}"
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}.dat" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}.dat"
|
||||
|
||||
tar -czf "${BUNDLE_NAME}.tar.gz" "${BUNDLE_NAME}"
|
||||
|
||||
- name: Upload Rapidsnark Prover
|
||||
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
|
||||
with:
|
||||
@ -465,23 +301,35 @@ jobs:
|
||||
name: verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
path: repo/verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
|
||||
- name: Upload PoL Witness Generator
|
||||
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
|
||||
- uses: ./.github/actions/compile-and-bundle
|
||||
with:
|
||||
name: pol-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
path: repo/pol-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
circuit-name-display: "PoL"
|
||||
circuit-name-binary: "pol"
|
||||
repository-root-path: "repo"
|
||||
repository-circuit-path: "circom_circuits/Mantle/pol.circom"
|
||||
version: ${{ env.VERSION }}
|
||||
os: ${{ env.OS }}
|
||||
arch: ${{ env.ARCH }}
|
||||
|
||||
- name: Upload PoQ Witness Generator
|
||||
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
|
||||
- uses: ./.github/actions/compile-and-bundle
|
||||
with:
|
||||
name: poq-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
path: repo/poq-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
circuit-name-display: "PoQ"
|
||||
circuit-name-binary: "poq"
|
||||
repository-root-path: "repo"
|
||||
repository-circuit-path: "circom_circuits/Blend/poq.circom"
|
||||
version: ${{ env.VERSION }}
|
||||
os: ${{ env.OS }}
|
||||
arch: ${{ env.ARCH }}
|
||||
|
||||
- name: Upload ZKSign Witness Generator
|
||||
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
|
||||
- uses: ./.github/actions/compile-and-bundle
|
||||
with:
|
||||
name: zksign-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
path: repo/zksign-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
circuit-name-display: "ZKSign"
|
||||
circuit-name-binary: "zksign"
|
||||
repository-root-path: "repo"
|
||||
repository-circuit-path: "circom_circuits/Mantle/signature.circom"
|
||||
version: ${{ env.VERSION }}
|
||||
os: ${{ env.OS }}
|
||||
arch: ${{ env.ARCH }}
|
||||
|
||||
build-macos:
|
||||
name: Build MacOS Binaries (Native)
|
||||
@ -490,7 +338,7 @@ jobs:
|
||||
- setup
|
||||
env:
|
||||
VERSION: ${{ needs.setup.outputs.version }}
|
||||
ARCH: arm64
|
||||
ARCH: aarch64
|
||||
OS: macos
|
||||
steps:
|
||||
- name: Install Rust Toolchain
|
||||
@ -531,54 +379,6 @@ jobs:
|
||||
./build_gmp.sh macos_arm64
|
||||
make macos_arm64
|
||||
|
||||
- name: Generate PoL
|
||||
working-directory: repo/circom_circuits/Mantle
|
||||
run: circom --c --r1cs --no_asm --O2 pol.circom
|
||||
|
||||
- name: Replace PoL's Makefile # TODO: Make a fork generate the appropriate MacOS Makefile
|
||||
working-directory: repo
|
||||
run: cp .github/resources/witness-generator/Makefile circom_circuits/Mantle/pol_cpp/Makefile
|
||||
|
||||
- name: Patch MacOS GMP
|
||||
working-directory: repo
|
||||
run: cp .github/resources/witness-generator/${{ env.OS }}.gmp_patch.hpp circom_circuits/Mantle/pol_cpp/gmp_patch.hpp
|
||||
|
||||
- name: Compile PoL
|
||||
working-directory: repo/circom_circuits/Mantle/pol_cpp
|
||||
run: make PROJECT=pol macos
|
||||
|
||||
- name: Generate PoQ
|
||||
working-directory: repo/circom_circuits/Blend
|
||||
run: circom --c --r1cs --no_asm --O2 poq.circom
|
||||
|
||||
- name: Replace PoQ's Makefile # TODO: Make a fork generate the appropriate MacOS Makefile
|
||||
working-directory: repo
|
||||
run: cp .github/resources/witness-generator/Makefile circom_circuits/Blend/poq_cpp/Makefile
|
||||
|
||||
- name: Patch MacOS GMP
|
||||
working-directory: repo
|
||||
run: cp .github/resources/witness-generator/${{ env.OS }}.gmp_patch.hpp circom_circuits/Blend/poq_cpp/gmp_patch.hpp
|
||||
|
||||
- name: Compile PoQ
|
||||
working-directory: repo/circom_circuits/Blend/poq_cpp
|
||||
run: make PROJECT=poq macos
|
||||
|
||||
- name: Generate ZKSign
|
||||
working-directory: repo/circom_circuits/Mantle
|
||||
run: circom --c --r1cs --no_asm --O2 signature.circom
|
||||
|
||||
- name: Replace ZKSign's Makefile # TODO: Make a fork generate the appropriate MacOS Makefile
|
||||
working-directory: repo
|
||||
run: cp .github/resources/witness-generator/Makefile circom_circuits/Mantle/signature_cpp/Makefile
|
||||
|
||||
- name: Patch MacOS GMP
|
||||
working-directory: repo
|
||||
run: cp .github/resources/witness-generator/${{ env.OS }}.gmp_patch.hpp circom_circuits/Mantle/signature_cpp/gmp_patch.hpp
|
||||
|
||||
- name: Compile ZKSign
|
||||
working-directory: repo/circom_circuits/Mantle/signature_cpp
|
||||
run: make PROJECT=signature macos
|
||||
|
||||
- name: Bundle Rapidsnark Prover
|
||||
working-directory: repo
|
||||
env:
|
||||
@ -607,55 +407,6 @@ jobs:
|
||||
|
||||
tar -czf "${BUNDLE_NAME}.tar.gz" "${BUNDLE_NAME}"
|
||||
|
||||
- name: Bundle PoL Witness Generator
|
||||
working-directory: repo
|
||||
env:
|
||||
CIRCUIT_NAME: pol
|
||||
PLATFORM_BINARY_NAME: pol
|
||||
BUNDLE_NAME: pol-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||
WITNESS_GENERATOR_DIR: circom_circuits/Mantle/pol_cpp
|
||||
run: |
|
||||
BUNDLE_DIR="${BUNDLE_NAME}/witness-generator"
|
||||
mkdir -p "$BUNDLE_DIR"
|
||||
|
||||
ls -la ${WITNESS_GENERATOR_DIR}
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}"
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}.dat" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}.dat"
|
||||
|
||||
tar -czf "${BUNDLE_NAME}.tar.gz" "${BUNDLE_NAME}"
|
||||
|
||||
- name: Bundle PoQ Witness Generator
|
||||
working-directory: repo
|
||||
env:
|
||||
CIRCUIT_NAME: poq
|
||||
PLATFORM_BINARY_NAME: poq
|
||||
BUNDLE_NAME: poq-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||
WITNESS_GENERATOR_DIR: circom_circuits/Blend/poq_cpp
|
||||
run: |
|
||||
BUNDLE_DIR="${BUNDLE_NAME}/witness-generator"
|
||||
mkdir -p "$BUNDLE_DIR"
|
||||
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}"
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}.dat" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}.dat"
|
||||
|
||||
tar -czf "${BUNDLE_NAME}.tar.gz" "${BUNDLE_NAME}"
|
||||
|
||||
- name: Bundle ZKSign Witness Generator
|
||||
working-directory: repo
|
||||
env:
|
||||
CIRCUIT_NAME: signature
|
||||
PLATFORM_BINARY_NAME: zksign
|
||||
BUNDLE_NAME: zksign-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}
|
||||
WITNESS_GENERATOR_DIR: circom_circuits/Mantle/signature_cpp
|
||||
run: |
|
||||
BUNDLE_DIR="${BUNDLE_NAME}/witness-generator"
|
||||
mkdir -p "$BUNDLE_DIR"
|
||||
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}"
|
||||
mv "${WITNESS_GENERATOR_DIR}/${CIRCUIT_NAME}.dat" "$BUNDLE_DIR/${PLATFORM_BINARY_NAME}.dat"
|
||||
|
||||
tar -czf "${BUNDLE_NAME}.tar.gz" "${BUNDLE_NAME}"
|
||||
|
||||
- name: Upload Rapidsnark Prover
|
||||
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
|
||||
with:
|
||||
@ -668,23 +419,35 @@ jobs:
|
||||
name: verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
path: repo/verifier-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
|
||||
- name: Upload PoL Witness Generator
|
||||
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
|
||||
- uses: ./.github/actions/compile-and-bundle
|
||||
with:
|
||||
name: pol-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
path: repo/pol-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
circuit-name-display: "PoL"
|
||||
circuit-name-binary: "pol"
|
||||
repository-root-path: "repo"
|
||||
repository-circuit-path: "circom_circuits/Mantle/pol.circom"
|
||||
version: ${{ env.VERSION }}
|
||||
os: ${{ env.OS }}
|
||||
arch: ${{ env.ARCH }}
|
||||
|
||||
- name: Upload PoQ Witness Generator
|
||||
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
|
||||
- uses: ./.github/actions/compile-and-bundle
|
||||
with:
|
||||
name: poq-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
path: repo/poq-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
circuit-name-display: "PoQ"
|
||||
circuit-name-binary: "poq"
|
||||
repository-root-path: "repo"
|
||||
repository-circuit-path: "circom_circuits/Blend/poq.circom"
|
||||
version: ${{ env.VERSION }}
|
||||
os: ${{ env.OS }}
|
||||
arch: ${{ env.ARCH }}
|
||||
|
||||
- name: Upload ZKSign Witness Generator
|
||||
uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8
|
||||
- uses: ./.github/actions/compile-and-bundle
|
||||
with:
|
||||
name: zksign-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
path: repo/zksign-${{ env.VERSION }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
|
||||
circuit-name-display: "ZKSign"
|
||||
circuit-name-binary: "zksign"
|
||||
repository-root-path: "repo"
|
||||
repository-circuit-path: "circom_circuits/Mantle/signature.circom"
|
||||
version: ${{ env.VERSION }}
|
||||
os: ${{ env.OS }}
|
||||
arch: ${{ env.ARCH }}
|
||||
|
||||
publish-release:
|
||||
name: Create Release
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
Cargo.lock
|
||||
target/
|
||||
.vscode.DS_Store
|
||||
.idea/
|
||||
Loading…
x
Reference in New Issue
Block a user