Browse Source

Remove obsolete CreateJoinSplit and GenerateParams binaries

pull/4/head
Jack Grigg 6 years ago
parent
commit
11aa594440
No known key found for this signature in database GPG Key ID: 665DBCD284F7DAFF
  1. 4
      .gitignore
  2. 2
      qa/zcash/full_test_suite.py
  3. 2
      src/Makefile.am
  4. 28
      src/Makefile.zcash.include
  5. 36
      src/zcash/CreateJoinSplit.cpp
  6. 24
      src/zcash/GenerateParams.cpp

4
.gitignore

@ -8,10 +8,6 @@ src/zcash-gtest
src/zcash-tx
src/test/test_bitcoin
# Zcash utilities
src/zcash/GenerateParams
src/zcash/CreateJoinSplit
*zcashTest.pk
*zcashTest.vk

2
qa/zcash/full_test_suite.py

@ -67,7 +67,6 @@ def check_security_hardening():
ret &= test_rpath_runpath('src/zcash-gtest')
ret &= test_rpath_runpath('src/zcash-tx')
ret &= test_rpath_runpath('src/test/test_bitcoin')
ret &= test_rpath_runpath('src/zcash/GenerateParams')
# NOTE: checksec.sh does not reliably determine whether FORTIFY_SOURCE
# is enabled for the entire binary. See issue #915.
@ -76,7 +75,6 @@ def check_security_hardening():
ret &= test_fortify_source('src/zcash-gtest')
ret &= test_fortify_source('src/zcash-tx')
ret &= test_fortify_source('src/test/test_bitcoin')
ret &= test_fortify_source('src/zcash/GenerateParams')
return ret

2
src/Makefile.am

@ -610,5 +610,3 @@ if ENABLE_TESTS
include Makefile.test.include
include Makefile.gtest.include
endif
include Makefile.zcash.include

28
src/Makefile.zcash.include

@ -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)

36
src/zcash/CreateJoinSplit.cpp

@ -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
}

24
src/zcash/GenerateParams.cpp

@ -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…
Cancel
Save