mirror of
https://github.com/logos-storage/logos-storage-proofs-circuits.git
synced 2026-01-03 05:53:11 +00:00
ci: lets bring back final version
This commit is contained in:
parent
7712303990
commit
1e0c510224
59
.github/workflows/generate.yml
vendored
59
.github/workflows/generate.yml
vendored
@ -1,6 +1,5 @@
|
||||
name: Generates circuit assets
|
||||
on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
maxDepth:
|
||||
@ -38,10 +37,10 @@ on:
|
||||
nCells:
|
||||
description: 'Number of cells in this slot'
|
||||
default: '512'
|
||||
#
|
||||
# ceremonyContribution:
|
||||
# description: 'Input into the circuit ceremony setup'
|
||||
# default: 'Let the Codex rock!'
|
||||
|
||||
ceremonyContribution:
|
||||
description: 'Input into the circuit ceremony setup'
|
||||
default: 'Let the Codex rock!'
|
||||
|
||||
env:
|
||||
nim_version: 1.6.14
|
||||
@ -81,7 +80,7 @@ jobs:
|
||||
|
||||
- name: Setup CLI arguments
|
||||
run: |
|
||||
ENTROPY="asdf"
|
||||
ENTROPY="${{ github.run_id }}-${{ github.run_attempt }}"
|
||||
echo "Entropy: $ENTROPY"
|
||||
echo "CLI_ARGS=--maxDepth=${{ github.event.inputs.maxDepth }} --maxSlots=${{ github.event.inputs.maxSlots }} --cellSize=${{ github.event.inputs.cellSize }} --blockSize=${{ github.event.inputs.blockSize }} --nSamples=${{ github.event.inputs.nSamples }} --entropy=$ENTROPY --seed=${{ github.event.inputs.seed }} --nSlots=${{ github.event.inputs.nSlots }} --slotIndex=${{ github.event.inputs.slotIndex }} --nCells=${{ github.event.inputs.nCells }}" >> $GITHUB_ENV
|
||||
|
||||
@ -90,26 +89,28 @@ jobs:
|
||||
cd reference/nim/proof_input/
|
||||
nimble -y build -d:release cli
|
||||
cd ../../../
|
||||
#
|
||||
# - name: Compile the circuit
|
||||
# run: |
|
||||
# mkdir -p workflow/build
|
||||
# cd workflow/build
|
||||
# ../../reference/nim/proof_input/cli $CLI_ARGS -v --circom="proof_main.circom"
|
||||
# circom --r1cs --wasm --O2 -l../../circuit proof_main.circom
|
||||
#
|
||||
# - name: Circuit setup
|
||||
# run: |
|
||||
# wget -O ceremony.ptau -P .. ${{ env.ceremony_source }}
|
||||
# NODE_OPTIONS="--max-old-space-size=8192" snarkjs groth16 setup proof_main.r1cs ../ceremony.ptau proof_main_0000.zkey
|
||||
# mv proof_main_0000.zkey proof_main.zkey
|
||||
# snarkjs zkey export verificationkey proof_main.zkey proof_main_verification_key.json
|
||||
# snarkjs zkey export solidityverifier proof_main.zkey verifier.sol
|
||||
# cd ..
|
||||
#
|
||||
# - name: Upload artifact
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: circuit-assets
|
||||
# path: build/
|
||||
# retention-days: 5
|
||||
|
||||
- name: Compile the circuit
|
||||
run: |
|
||||
mkdir -p workflow/build
|
||||
cd workflow/build
|
||||
../../reference/nim/proof_input/cli $CLI_ARGS -v --circom="proof_main.circom"
|
||||
circom --r1cs --wasm --O2 -l../../circuit proof_main.circom
|
||||
|
||||
- name: Circuit setup
|
||||
run: |
|
||||
wget -O ceremony.ptau -P .. ${{ env.ceremony_source }}
|
||||
NODE_OPTIONS="--max-old-space-size=8192" snarkjs groth16 setup proof_main.r1cs ../ceremony.ptau proof_main_0000.zkey
|
||||
NODE_OPTIONS="--max-old-space-size=8192" snarkjs zkey contribute proof_main_0000.zkey proof_main_0001.zkey --name="External Contribution" -e="${{ github.event.inputs.ceremonyContribution }}"
|
||||
rm proof_main_0000.zkey
|
||||
mv proof_main_0001.zkey proof_main.zkey
|
||||
snarkjs zkey export verificationkey proof_main.zkey proof_main_verification_key.json
|
||||
snarkjs zkey export solidityverifier proof_main.zkey verifier.sol
|
||||
cd ..
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: circuit-assets
|
||||
path: build/
|
||||
retention-days: 5
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user