Merge pull request #15 from peppersec/audit-circuit

Circuit audit fixes
This commit is contained in:
Roman Semenov 2019-11-06 12:31:23 +03:00 committed by GitHub
commit b000e66899
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 81 deletions

View file

@ -150,7 +150,7 @@ contract('ETHMixer', accounts => {
refund,
secret: deposit.secret,
pathElements: path_elements,
pathIndex: path_index,
pathIndices: path_index,
})
let proofData = await websnarkUtils.genWitnessAndProve(groth16, input, circuit, proving_key)
@ -210,7 +210,7 @@ contract('ETHMixer', accounts => {
nullifier: deposit.nullifier,
secret: deposit.secret,
pathElements: path_elements,
pathIndex: path_index,
pathIndices: path_index,
})
@ -265,7 +265,7 @@ contract('ETHMixer', accounts => {
refund,
secret: deposit.secret,
pathElements: path_elements,
pathIndex: path_index,
pathIndices: path_index,
})
const proofData = await websnarkUtils.genWitnessAndProve(groth16, input, circuit, proving_key)
const { proof, publicSignals } = websnarkUtils.toSolidityInput(proofData)
@ -291,7 +291,7 @@ contract('ETHMixer', accounts => {
refund,
secret: deposit.secret,
pathElements: path_elements,
pathIndex: path_index,
pathIndices: path_index,
})
const proofData = await websnarkUtils.genWitnessAndProve(groth16, input, circuit, proving_key)
const { proof, publicSignals } = websnarkUtils.toSolidityInput(proofData)
@ -317,7 +317,7 @@ contract('ETHMixer', accounts => {
refund,
secret: deposit.secret,
pathElements: path_elements,
pathIndex: path_index,
pathIndices: path_index,
})
const proofData = await websnarkUtils.genWitnessAndProve(groth16, input, circuit, proving_key)
@ -343,7 +343,7 @@ contract('ETHMixer', accounts => {
refund,
secret: deposit.secret,
pathElements: path_elements,
pathIndex: path_index,
pathIndices: path_index,
})
const dummyRoot = randomHex(32)
@ -372,7 +372,7 @@ contract('ETHMixer', accounts => {
refund,
secret: deposit.secret,
pathElements: path_elements,
pathIndex: path_index,
pathIndices: path_index,
})
const proofData = await websnarkUtils.genWitnessAndProve(groth16, input, circuit, proving_key)
let { proof, publicSignals } = websnarkUtils.toSolidityInput(proofData)
@ -424,7 +424,7 @@ contract('ETHMixer', accounts => {
refund: bigInt(1),
secret: deposit.secret,
pathElements: path_elements,
pathIndex: path_index,
pathIndices: path_index,
})
const proofData = await websnarkUtils.genWitnessAndProve(groth16, input, circuit, proving_key)