Improve/Fix variable names

ZCProof was too general. pubKeyHash was actually the JoinSplit pubkey
itself.
This commit is contained in:
Ariel Gabizon
2018-06-09 20:27:07 -07:00
parent 847df81f09
commit e1a3461cc2
13 changed files with 82 additions and 81 deletions

View File

@@ -21,7 +21,7 @@ static constexpr size_t GROTH_PROOF_SIZE = (
48); // π_C
typedef std::array<unsigned char, GROTH_PROOF_SIZE> GrothProof;
typedef boost::variant<ZCProof, GrothProof> SproutProof;
typedef boost::variant<PHGRProof, GrothProof> SproutProof;
class JSInput {
public:
@@ -64,9 +64,10 @@ public:
static uint256 h_sig(const uint256& randomSeed,
const std::array<uint256, NumInputs>& nullifiers,
const uint256& pubKeyHash
const uint256& joinSplitPubKey
);
// Compute nullifiers, macs, note commitments & encryptions, and SNARK proof
virtual SproutProof prove(
bool makeGrothProof,
const std::array<JSInput, NumInputs>& inputs,
@@ -74,7 +75,7 @@ public:
std::array<SproutNote, NumOutputs>& out_notes,
std::array<ZCNoteEncryption::Ciphertext, NumOutputs>& out_ciphertexts,
uint256& out_ephemeralKey,
const uint256& pubKeyHash,
const uint256& joinSplitPubKey,
uint256& out_randomSeed,
std::array<uint256, NumInputs>& out_hmacs,
std::array<uint256, NumInputs>& out_nullifiers,
@@ -90,9 +91,9 @@ public:
) = 0;
virtual bool verify(
const ZCProof& proof,
const PHGRProof& proof,
ProofVerifier& verifier,
const uint256& pubKeyHash,
const uint256& joinSplitPubKey,
const uint256& randomSeed,
const std::array<uint256, NumInputs>& hmacs,
const std::array<uint256, NumInputs>& nullifiers,