You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main return value is usually used for two reasons:
to prove that a statement is true, in which case the return value should be true
to prove that the result was properly computed, in which case you do not know the result in advance.
However;
to properly generate the proof, the return value must be put inside the prover.toml, which means the prover has to compute its value, which can be annoying and error prone.
to properly verify the proof the return value must be put inside the verifier.toml, which the verifier cannot always do
To support the first case, the user must be able to set its own return value, for instance to ensure that the value must be true
To support the second case, we want to benefit from the fact that noir is computing the return value by using it in the prover.toml and verifier.toml
As result, when generating a proof;
if the return value IS defined in the prover.toml/verifier.toml, we should use this one.
if the return value is NOT defined in the prover.toml, we should write the value in prover.toml
if the return value is NOT defined in the verifier.toml, we should write the value in verifier.toml
In order to avoid user errors, the handling of the return value in .toml files should be explicit:
the return value should always be present, if not it would be an error (of course unless the noir program does not return a value)
the return value can then be either defined with a value,
or explicitly stated as undefined
The text was updated successfully, but these errors were encountered:
The main return value is usually used for two reasons:
However;
To support the first case, the user must be able to set its own return value, for instance to ensure that the value must be
true
To support the second case, we want to benefit from the fact that noir is computing the return value by using it in the prover.toml and verifier.toml
As result, when generating a proof;
In order to avoid user errors, the handling of the return value in .toml files should be explicit:
The text was updated successfully, but these errors were encountered: