Auto merge of #1919 - ebfull:abstract-verification, r=str4d

Isolate verification to a ProofVerifier context object that allows verification behavior to be tuned by the caller.

This is an alternative foundation for #1892, i.e., #1892 will have to be changed if this PR is accepted.

I think this is a safer approach because it allows us to isolate verification behavior to a single object. This will come in handy when @arielgabizon finishes the batching code.
This commit is contained in:
zkbot
2016-12-09 06:22:53 +00:00
13 changed files with 151 additions and 20 deletions

View File

@@ -2707,7 +2707,10 @@ Value zc_raw_joinsplit(const json_spirit::Array& params, bool fHelp)
vpub_old,
vpub_new);
assert(jsdesc.Verify(*pzcashParams, joinSplitPubKey));
{
auto verifier = libzcash::ProofVerifier::Strict();
assert(jsdesc.Verify(*pzcashParams, verifier, joinSplitPubKey));
}
mtx.vjoinsplit.push_back(jsdesc);