mirror of
https://github.com/logos-storage/logos-storage-proofs-circuits.git
synced 2026-01-02 13:33:07 +00:00
add witness computation graph extraction to the workflow
This commit is contained in:
parent
7f2d23a318
commit
180e00434c
@ -61,6 +61,7 @@ TODO:
|
||||
### Preliminaries
|
||||
|
||||
- install `circom`, `snarkjs`, `rapidsnark`: <https://docs.circom.io/getting-started/installation>
|
||||
- optionally install `circom-witnesscalc`: <https://github.com/iden3/circom-witnesscalc/>
|
||||
- install Nim: <https://nim-lang.org/>
|
||||
|
||||
Build the Nim cli proof input generator:
|
||||
@ -105,7 +106,12 @@ After that, the first real step is to create the main component:
|
||||
|
||||
Then compile the circuit:
|
||||
|
||||
$ circom --r1cs --wasm --O2 -l../../circuit proof_main.circom
|
||||
$ export CIRCUIT_LIBDIRS="-l../../circuit/lib -l../../circuit/poseidon2 -l../../circuit/codex"
|
||||
$ circom --r1cs --wasm --O2 ${CIRCUIT_LIBDIRS} proof_main.circom
|
||||
|
||||
### Optionally extract the witness computation graph
|
||||
|
||||
$ build-circuit proof_main.circom proof_main_graph.bin ${CIRCUIT_LIBDIRS}
|
||||
|
||||
### Do the circuit-specific setup
|
||||
|
||||
|
||||
@ -8,6 +8,17 @@ source ./cli_args.sh
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
# --- export the witness computation graph ---
|
||||
|
||||
if command -v build-circuit
|
||||
then
|
||||
CIRCUIT_INCLUDES="-l${CIRCUIT_LIB_DIR} -l${CIRCUIT_POS_DIR} -l${CIRCUIT_PRF_DIR}"
|
||||
build-circuit ${CIRCUIT_MAIN}.circom ${CIRCUIT_MAIN}_graph.bin ${CIRCUIT_INCLUDES}
|
||||
else
|
||||
echo " "
|
||||
echo "\`circom-witnesscalc\` not found; skipping graph extraction"
|
||||
fi
|
||||
|
||||
# --- generate input for the circuit ---
|
||||
|
||||
echo ""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user