Jack Grigg
6 years ago
6 changed files with 0 additions and 96 deletions
@ -1,28 +0,0 @@ |
|||||
noinst_PROGRAMS += \
|
|
||||
zcash/GenerateParams \
|
|
||||
zcash/CreateJoinSplit |
|
||||
|
|
||||
# tool for generating our public parameters
|
|
||||
zcash_GenerateParams_SOURCES = zcash/GenerateParams.cpp |
|
||||
zcash_GenerateParams_CPPFLAGS = $(AM_CPPFLAGS) |
|
||||
zcash_GenerateParams_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) |
|
||||
zcash_GenerateParams_LDADD = \
|
|
||||
$(BOOST_LIBS) \
|
|
||||
$(LIBZCASH) \
|
|
||||
$(LIBSNARK) \
|
|
||||
$(LIBBITCOIN_UTIL) \
|
|
||||
$(LIBBITCOIN_CRYPTO) \
|
|
||||
$(LIBZCASH_LIBS) |
|
||||
|
|
||||
# tool for profiling the creation of joinsplits
|
|
||||
zcash_CreateJoinSplit_SOURCES = zcash/CreateJoinSplit.cpp |
|
||||
zcash_CreateJoinSplit_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) |
|
||||
zcash_CreateJoinSplit_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) |
|
||||
zcash_CreateJoinSplit_LDADD = \
|
|
||||
$(LIBBITCOIN_COMMON) \
|
|
||||
$(LIBZCASH) \
|
|
||||
$(LIBSNARK) \
|
|
||||
$(LIBBITCOIN_UTIL) \
|
|
||||
$(LIBBITCOIN_CRYPTO) \
|
|
||||
$(BOOST_LIBS) \
|
|
||||
$(LIBZCASH_LIBS) |
|
@ -1,36 +0,0 @@ |
|||||
// Copyright (c) 2016 The Zcash developers
|
|
||||
// Distributed under the MIT software license, see the accompanying
|
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
||||
|
|
||||
#include "../util.h" |
|
||||
#include "primitives/transaction.h" |
|
||||
#include "zcash/JoinSplit.hpp" |
|
||||
|
|
||||
#include <libsnark/common/profiling.hpp> |
|
||||
|
|
||||
using namespace libzcash; |
|
||||
|
|
||||
int main(int argc, char **argv) |
|
||||
{ |
|
||||
libsnark::start_profiling(); |
|
||||
|
|
||||
auto p = ZCJoinSplit::Prepared((ZC_GetParamsDir() / "sprout-verifying.key").string(), |
|
||||
(ZC_GetParamsDir() / "sprout-proving.key").string()); |
|
||||
|
|
||||
// construct a proof.
|
|
||||
|
|
||||
for (int i = 0; i < 5; i++) { |
|
||||
uint256 anchor = ZCIncrementalMerkleTree().root(); |
|
||||
uint256 pubKeyHash; |
|
||||
|
|
||||
JSDescription jsdesc(*p, |
|
||||
pubKeyHash, |
|
||||
anchor, |
|
||||
{JSInput(), JSInput()}, |
|
||||
{JSOutput(), JSOutput()}, |
|
||||
0, |
|
||||
0); |
|
||||
} |
|
||||
|
|
||||
delete p; // not that it matters
|
|
||||
} |
|
@ -1,24 +0,0 @@ |
|||||
#include "zcash/JoinSplit.hpp" |
|
||||
|
|
||||
#include <iostream> |
|
||||
#include "crypto/common.h" |
|
||||
|
|
||||
int main(int argc, char **argv) |
|
||||
{ |
|
||||
if (init_and_check_sodium() == -1) { |
|
||||
return 1; |
|
||||
} |
|
||||
|
|
||||
if(argc != 4) { |
|
||||
std::cerr << "Usage: " << argv[0] << " provingKeyFileName verificationKeyFileName r1csFileName" << std::endl; |
|
||||
return 1; |
|
||||
} |
|
||||
|
|
||||
std::string pkFile = argv[1]; |
|
||||
std::string vkFile = argv[2]; |
|
||||
std::string r1csFile = argv[3]; |
|
||||
|
|
||||
ZCJoinSplit::Generate(r1csFile, vkFile, pkFile); |
|
||||
|
|
||||
return 0; |
|
||||
} |
|
Loading…
Reference in new issue