File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,6 +108,13 @@ runs:
108108 shell : bash
109109 run : npm install -g @lightprotocol/zk-compression-cli
110110
111+ - name : Cache Powers of Tau file
112+ if : inputs.install-circom == 'true'
113+ uses : actions/cache@v4
114+ with :
115+ path : ${{ inputs.example }}/pot/powersOfTau28_hez_final_16.ptau
116+ key : ptau-powersOfTau28_hez_final_16-v1
117+
111118 - name : Cache circom installation
112119 if : inputs.install-circom == 'true'
113120 id : cache-circom
Original file line number Diff line number Diff line change 169169# Contribute to the ceremony
170170echo " "
171171echo " Contributing to the ceremony..."
172+ # Generate real randomness from /dev/urandom combined with system entropy
173+ # This creates 256 bits of entropy for the contribution
174+ RANDOM_ENTROPY=$( head -c 32 /dev/urandom | xxd -p -c 256)
175+ SYSTEM_ENTROPY=" ${RANDOM}${RANDOM}${RANDOM} $( date +%s%N) $( uname -a | sha256sum | cut -d' ' -f1) "
176+ COMBINED_ENTROPY=" ${RANDOM_ENTROPY}${SYSTEM_ENTROPY} "
177+
172178npx snarkjs zkey contribute \
173179 build/circuit_0000.zkey \
174180 build/compressed_account_merkle_proof_final.zkey \
175181 --name=" First contribution" \
176182 -v \
177- -e=" $( date +%s ) "
183+ -e=" $COMBINED_ENTROPY "
178184
179185if [ $? -eq 0 ]; then
180186 echo -e " ${GREEN} ✓${NC} Contribution complete"
You can’t perform that action at this time.
0 commit comments