mirror of
https://github.com/tornadocash/tornado-nova
synced 2024-02-02 14:53:56 +01:00
remove obsolete circuit inputs
This commit is contained in:
parent
d4b381a0a2
commit
0ea12fc209
@ -36,8 +36,6 @@ template Transaction(levels, nIns, nOuts, zeroLeaf) {
|
||||
signal private input outAmount[nOuts];
|
||||
signal private input outBlinding[nOuts];
|
||||
signal private input outPubkey[nOuts];
|
||||
signal private input outPathIndices;
|
||||
signal private input outPathElements[levels - 1];
|
||||
|
||||
component inKeypair[nIns];
|
||||
component inUtxoHasher[nIns];
|
||||
|
@ -42,9 +42,6 @@ async function getProof({ inputs, outputs, tree, extAmount, fee, recipient, rela
|
||||
output.index = tree.elements().length
|
||||
tree.insert(output.getCommitment())
|
||||
}
|
||||
const outputIndex = tree.elements().length - 1
|
||||
const outputPath = tree.path(outputIndex).pathElements
|
||||
const outputBatchBits = Math.log2(outputs.length)
|
||||
|
||||
const extData = {
|
||||
recipient: toFixedHex(recipient, 20),
|
||||
@ -75,8 +72,6 @@ async function getProof({ inputs, outputs, tree, extAmount, fee, recipient, rela
|
||||
outAmount: outputs.map((x) => x.amount),
|
||||
outBlinding: outputs.map((x) => x.blinding),
|
||||
outPubkey: outputs.map((x) => x.keypair.pubkey),
|
||||
outPathIndices: outputIndex >> outputBatchBits,
|
||||
outPathElements: outputPath.slice(outputBatchBits),
|
||||
}
|
||||
|
||||
const proof = await prove(input, `./artifacts/circuits/transaction${inputs.length}`)
|
||||
|
Loading…
Reference in New Issue
Block a user