-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it necessary to add an enabled
signal for outputUTXO to support the situation where there is only one output UTXO?
#55
Comments
enabled
signal for outputUTXO to support the situation where there is only one output UTXO?
Thanks @yushihang for the question. I assume you were referring to the The circuit itself always needs to be parameterized with the size of the inputs, because a ZKP circuit must always result in the same amount of computation regardless of the different combination of input values. This means we have a dilemma between efficiency of the circuits vs. complexity of the circuit maintenance. We could have different circuits for the different combinations of input sizes:
But this makes code maintenance much harder. So instead today we have a single circuit with 2 inputs and 2 outputs that supports the different combinations. This means the |
@jimthematrix Thank you very much for your response. I understand that maintaining multiple circuits as listed below will increase complexity:
Since the current circuits provide an enabled signal for the nullifier of the input, my understanding is that we could use the same circuit to achieve:
However, in some cases, we also have the need for the following situations: Circuit 1: 1 input, 1 output For example, Alice uses two UTXOs/nullifiers with both value of 1 as inputs, and then generates a UTXO with a value of 2 to transfer to Bob. In this case, because two output UTXOs are required in the circuit, I have to generate a UTXO with a value of 0 as the second output UTXO to send back to Alice herself when writing test cases. (I'm not sure if there are other methods that could better achieve this requirement.) This might increase the complexity when verifying the ZKP in the contract and consume more gas. So I was wondering if we could also introduce an
I’m not sure if my understanding of zeto is correct. If there are any errors, please help me correct them. Thank you very much! |
zeto/zkp/circuits/anon_enc_nullifier.circom
Line 44 in 8547ca5
The text was updated successfully, but these errors were encountered: