From d707438c725f14c833a4c7f013ed0d2c9a7db95f Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 7 Oct 2016 03:06:03 -0700 Subject: [PATCH 01/17] Updates Linux gitian descriptor file for Zcash --- contrib/gitian-descriptors/gitian-linux.yml | 27 ++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index fbaf4c89a..dc77abd78 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -1,25 +1,30 @@ --- -name: "bitcoin-linux-0.11" +name: "zcash-1.0.0-rc1" enable_cache: true suites: - "trusty" architectures: - "amd64" packages: -- "g++-multilib" -- "git-core" -- "pkg-config" - "autoconf" -- "libtool" - "automake" -- "faketime" - "bsdmainutils" - "binutils-gold" - "ca-certificates" +- "g++-multilib" +- "git-core" +- "libc6-dev" +- "libtool" +- "m4" +- "ncurses-dev" +- "pkg-config" - "python" +- "unzip" +- "wget" +- "zlib1g-dev" remotes: -- "url": "https://github.com/bitcoin/bitcoin.git" - "dir": "bitcoin" +- "url": "https://github.com/zcash/zcash.git" + "dir": "zcash" files: [] script: | WRAP_DIR=$HOME/wrapped @@ -73,7 +78,7 @@ script: | create_global_faketime_wrappers "2000-01-01 12:00:00" create_per-host_faketime_wrappers "2000-01-01 12:00:00" - cd bitcoin + cd zcash BASEPREFIX=`pwd`/depends # Build dependencies for each host for i in $HOSTS; do @@ -88,13 +93,13 @@ script: | ./autogen.sh CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/ make dist - SOURCEDIST=`echo bitcoin-*.tar.gz` + SOURCEDIST=`echo zcash-*.tar.gz` DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'` # Correct tar file order mkdir -p temp pushd temp tar xf ../$SOURCEDIST - find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST + find zcash* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST popd ORIGPATH="$PATH" From 4d0ee1b227f30bd7a1a5a39672af797a8992aa4c Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Sat, 8 Oct 2016 11:21:06 -0700 Subject: [PATCH 02/17] Updates trusty -> jessie in Gitian Linux descriptor --- contrib/gitian-descriptors/gitian-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index dc77abd78..b89bcd359 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -2,7 +2,7 @@ name: "zcash-1.0.0-rc1" enable_cache: true suites: -- "trusty" +- "jessie" architectures: - "amd64" packages: From 993682d88f05c9dafa6b4826512643598734a600 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Mon, 10 Oct 2016 11:09:40 -0700 Subject: [PATCH 03/17] Adds distro: debian to gitian-linux.yml --- contrib/gitian-descriptors/gitian-linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index b89bcd359..130673715 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -1,6 +1,7 @@ --- name: "zcash-1.0.0-rc1" enable_cache: true +distro: "debian" suites: - "jessie" architectures: From 9c61dc4b00699eb07c5a53695ae41a404ff40075 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Mon, 10 Oct 2016 18:33:00 -0700 Subject: [PATCH 04/17] Updates Gitian descriptor for Zcash --- contrib/gitian-descriptors/gitian-linux.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 130673715..9d847762a 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -29,15 +29,15 @@ remotes: files: [] script: | WRAP_DIR=$HOME/wrapped - HOSTS="i686-pc-linux-gnu x86_64-unknown-linux-gnu" - CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests" + HOSTS="x86_64-unknown-linux-gnu" + CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests --with-gui=no --enable-hardening" FAKETIME_HOST_PROGS="" FAKETIME_PROGS="date ar ranlib nm strip objcopy" - HOST_CFLAGS="-O2 -g" - HOST_CXXFLAGS="-O2 -g" + HOST_CFLAGS="-fwrapv -fno-strict-aliasing -Werror -g" + HOST_CXXFLAGS="-fwrapv -fno-strict-aliasing -Werror -g" HOST_LDFLAGS=-static-libstdc++ - export QT_RCC_TEST=1 + export QT_RCC_TEST=0 export GZIP="-9n" export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME"" export TZ="UTC" @@ -83,7 +83,7 @@ script: | BASEPREFIX=`pwd`/depends # Build dependencies for each host for i in $HOSTS; do - make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}" + make ${MAKEOPTS} -C ${BASEPREFIX} V=1 NO_QT=1 HOST="${i}" done # Faketime for binaries @@ -131,7 +131,5 @@ script: | mkdir -p $OUTDIR/src mv $SOURCEDIST $OUTDIR/src mv ${OUTDIR}/${DISTNAME}-x86_64-*-debug.tar.gz ${OUTDIR}/${DISTNAME}-linux64-debug.tar.gz - mv ${OUTDIR}/${DISTNAME}-i686-*-debug.tar.gz ${OUTDIR}/${DISTNAME}-linux32-debug.tar.gz mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-linux64.tar.gz - mv ${OUTDIR}/${DISTNAME}-i686-*.tar.gz ${OUTDIR}/${DISTNAME}-linux32.tar.gz From 3bccc064c631971378bfa7c11af2cca567c8021a Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 14 Oct 2016 00:32:04 -0700 Subject: [PATCH 05/17] Removes Windows and OSX packaging from EXTRA_DIST --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 266c75b43..0f14676ff 100644 --- a/Makefile.am +++ b/Makefile.am @@ -261,7 +261,7 @@ endif dist_noinst_SCRIPTS = autogen.sh -EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests qa/zcash $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS) +EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests qa/zcash $(DIST_DOCS) $(BIN_CHECKS) CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER) From c06664fb8f51a2088d89db0272f4092f58a2c43a Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 14 Oct 2016 20:04:08 -0500 Subject: [PATCH 06/17] Fix Makefiles so "make dist" will run --- Makefile.am | 3 +-- src/Makefile.am | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 0f14676ff..09cd9b92e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,8 +31,7 @@ BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \ WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \ $(top_srcdir)/share/pixmaps/nsis-header.bmp \ - $(top_srcdir)/share/pixmaps/nsis-wizard.bmp \ - $(top_srcdir)/doc/README_windows.txt + $(top_srcdir)/share/pixmaps/nsis-wizard.bmp OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) $(OSX_BASE_LPROJ_DIR) \ $(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_IMAGE) \ diff --git a/src/Makefile.am b/src/Makefile.am index e82754e00..8c1d17cea 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -69,9 +69,8 @@ if BUILD_BITCOIN_UTILS bin_PROGRAMS += zcash-cli bitcoin-tx endif -# TODO: rename to libzcash LIBZCASH_H = \ - zcash/IncrementalMerkleTree.h \ + zcash/IncrementalMerkleTree.hpp \ zcash/NoteEncryption.hpp \ zcash/Address.hpp \ zcash/JoinSplit.hpp \ From 6fe11af7b5f01b907c6c63e9ea6fd20f49ec9484 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 14 Oct 2016 20:05:08 -0500 Subject: [PATCH 07/17] Render full version correctly in configure.ac Required in order for "make dist" to generate the correct filename --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7662c22e3..b1ec277ac 100644 --- a/configure.ac +++ b/configure.ac @@ -4,9 +4,11 @@ define(_CLIENT_VERSION_MAJOR, 1) define(_CLIENT_VERSION_MINOR, 0) define(_CLIENT_VERSION_REVISION, 0) define(_CLIENT_VERSION_BUILD, 1) +define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50))) +define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1))) define(_CLIENT_VERSION_IS_RELEASE, false) define(_COPYRIGHT_YEAR, 2016) -AC_INIT([Zcash],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/zcash/zcash/issues],[zcash]) +AC_INIT([Zcash],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_SUFFIX(_ZC_BUILD_VAL)],[https://github.com/zcash/zcash/issues],[zcash]) AC_CONFIG_SRCDIR([src/main.cpp]) AC_CONFIG_HEADERS([src/config/bitcoin-config.h]) AC_CONFIG_AUX_DIR([build-aux]) From a9f33db1ae3f5494c0d2d48e7529ce7a34a56a54 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 14 Oct 2016 18:14:32 -0700 Subject: [PATCH 08/17] Moves V=1 and NO_QT=1 to MAKEOPTS --- contrib/gitian-descriptors/gitian-linux.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 9d847762a..55538398f 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -31,6 +31,7 @@ script: | WRAP_DIR=$HOME/wrapped HOSTS="x86_64-unknown-linux-gnu" CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests --with-gui=no --enable-hardening" + MAKEOPTS="V=1 NO_QT=1" FAKETIME_HOST_PROGS="" FAKETIME_PROGS="date ar ranlib nm strip objcopy" HOST_CFLAGS="-fwrapv -fno-strict-aliasing -Werror -g" @@ -83,7 +84,7 @@ script: | BASEPREFIX=`pwd`/depends # Build dependencies for each host for i in $HOSTS; do - make ${MAKEOPTS} -C ${BASEPREFIX} V=1 NO_QT=1 HOST="${i}" + make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}" done # Faketime for binaries From 74dcb5ff055e7743f5826b92c31fcd63c6b1e387 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 14 Oct 2016 19:25:09 -0700 Subject: [PATCH 09/17] Include contrib/devtools/split-debug.sh from upstream --- contrib/devtools/split-debug.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 contrib/devtools/split-debug.sh diff --git a/contrib/devtools/split-debug.sh b/contrib/devtools/split-debug.sh new file mode 100755 index 000000000..16fda3005 --- /dev/null +++ b/contrib/devtools/split-debug.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ $# -ne 3 ]; + then echo "usage: $0 " +fi + +/usr/bin/objcopy --enable-deterministic-archives -p --only-keep-debug $1 $3 +/usr/bin/objcopy --enable-deterministic-archives -p --strip-debug $1 $2 +/usr/bin/strip --enable-deterministic-archives -p -s $2 +/usr/bin/objcopy --enable-deterministic-archives -p --add-gnu-debuglink=$3 $2 From 558081c98c707494c9028126029fcd8311729ef5 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 14 Oct 2016 19:27:25 -0700 Subject: [PATCH 10/17] Adds faketime to Gitian build dependencies --- contrib/gitian-descriptors/gitian-linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 55538398f..7a006b343 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -12,6 +12,7 @@ packages: - "bsdmainutils" - "binutils-gold" - "ca-certificates" +- "faketime" - "g++-multilib" - "git-core" - "libc6-dev" From 60157808cd1364d9506e0093a6910cbd5f17fccb Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 14 Oct 2016 21:19:21 -0700 Subject: [PATCH 11/17] Inlude crypto/equihash.tcc in list of sources for dist --- src/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.am b/src/Makefile.am index 8c1d17cea..48b8a85c9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -245,6 +245,7 @@ crypto_libbitcoin_crypto_a_SOURCES = \ crypto/common.h \ crypto/equihash.cpp \ crypto/equihash.h \ + crypto/equihash.tcc \ crypto/hmac_sha256.cpp \ crypto/hmac_sha256.h \ crypto/hmac_sha512.cpp \ From cc552e4db8fc652c9dbe2748ee3791e713d9b52f Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 14 Oct 2016 21:27:32 -0700 Subject: [PATCH 12/17] Adds zcash/Zcash.h to LIBZCASH sources --- src/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 48b8a85c9..85e2042aa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -76,7 +76,8 @@ LIBZCASH_H = \ zcash/JoinSplit.hpp \ zcash/Note.hpp \ zcash/prf.h \ - zcash/util.h + zcash/util.h \ + zcash/Zcash.h .PHONY: FORCE check-symbols check-security # bitcoin core # From 9ffe371d09de57420942b83ce24448837f270db2 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 14 Oct 2016 21:36:54 -0700 Subject: [PATCH 13/17] Adds zcash/Proof.hpp to LIBZCASH_H --- src/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.am b/src/Makefile.am index 85e2042aa..3850b802d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -76,6 +76,7 @@ LIBZCASH_H = \ zcash/JoinSplit.hpp \ zcash/Note.hpp \ zcash/prf.h \ + zcash/Proof.hpp \ zcash/util.h \ zcash/Zcash.h From 7553b173b7acb65f91f351e331cd044d3889bea8 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 14 Oct 2016 21:48:18 -0700 Subject: [PATCH 14/17] Add alertkeys.h to libbitcoin_server_a_SOURCES --- src/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.am b/src/Makefile.am index 3850b802d..e3ca4587b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -195,6 +195,7 @@ libbitcoin_server_a_SOURCES = \ sendalert.cpp \ addrman.cpp \ alert.cpp \ + alertkeys.h \ asyncrpcoperation.cpp \ asyncrpcqueue.cpp \ bloom.cpp \ From 58d09f27f5874d15585e2c48c4f5eb29ac7975eb Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 14 Oct 2016 22:03:30 -0700 Subject: [PATCH 15/17] Adds files in src/zcash/circuit to libzcash_a_SOURCES --- src/Makefile.am | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index e3ca4587b..6dd614c2d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -423,7 +423,13 @@ libzcash_a_SOURCES = \ zcash/Proof.cpp \ zcash/Note.cpp \ zcash/prf.cpp \ - zcash/util.cpp + zcash/util.cpp \ + zcash/circuit/commitment.tcc \ + zcash/circuit/gadget.tcc \ + zcash/circuit/merkle.tcc \ + zcash/circuit/note.tcc \ + zcash/circuit/prfs.tcc \ + zcash/circuit/utils.tcc libzcash_a_CPPFLAGS = -DMULTICORE -fopenmp -fPIC -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS $(HARDENED_CPPFLAGS) -pipe -O1 -g -Wstack-protector -fstack-protector-all -fPIE -fvisibility=hidden -DSTATIC $(BITCOIN_INCLUDES) From 2f3ecb4422d6976967090f35a030339049b5a823 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 14 Oct 2016 22:15:56 -0700 Subject: [PATCH 16/17] Adds zcbenchmarks.h to libbitcoin_wallet_a_SOURCES --- src/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.am b/src/Makefile.am index 6dd614c2d..9f8a18189 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -231,6 +231,7 @@ libbitcoin_server_a_SOURCES = \ libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES) libbitcoin_wallet_a_SOURCES = \ zcbenchmarks.cpp \ + zcbenchmarks.h \ wallet/asyncrpcoperation_sendmany.cpp \ wallet/crypter.cpp \ wallet/db.cpp \ From b2ba9d64ed545c01618622137c0f68a320df1fa1 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Fri, 14 Oct 2016 22:37:43 -0700 Subject: [PATCH 17/17] Adds json_test_vectors.h to zcash_gtest_SOURCES --- src/Makefile.gtest.include | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.gtest.include b/src/Makefile.gtest.include index d08b7d607..d68c9a98a 100644 --- a/src/Makefile.gtest.include +++ b/src/Makefile.gtest.include @@ -6,6 +6,7 @@ zcash_gtest_SOURCES = \ gtest/main.cpp \ gtest/test_checktransaction.cpp \ gtest/json_test_vectors.cpp \ + gtest/json_test_vectors.h \ gtest/test_foundersreward.cpp \ gtest/test_wallet_zkeys.cpp \ gtest/test_jsonspirit.cpp \