diff --git a/README.md b/README.md index 886ff53d86..88c16f596e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,28 @@ -Zen 2.0.14-rc1 +Zen 2.0.14 ============== What is Zen? ---------------- A globally accessible and anonymous blockchain for censorship-resistant communications and economic activity. +Upgrading from 2.0.11 source +---------------- + +To upgrade from any version prior to 2.0.14 you will have to re-clone the repository, the [ZencashOfficial/zen](https://github.com/ZencashOfficial/zen) repository was replaced by a new repository based on Zcash upstream with a different commit history, merging/pulling is not possible without issues. +Assuming your current repository is stored at `~/zen`, do the following to upgrade: +```{r, engine='bash'} +# if you don't want to keep the old src around +rm -r ~/zen +# or if you do want to keep it +mv ~/zen ~/zen_archived +git clone https://github.com/ZencashOfficial/zen.git +cd ~/zen +``` +Now continue with building from source. + +Installing from source +---------------- + 1. Get dependencies: 1. Debian ```{r, engine='bash'} @@ -32,7 +50,7 @@ A globally accessible and anonymous blockchain for censorship-resistant communic sudo apt-get install \ build-essential pkg-config libc6-dev m4 g++-multilib-arm-linux-gnueabihf \ autoconf libtool ncurses-dev unzip git python \ - zlib1g-dev curl bsdmainutils automake cmake + zlib1g-dev curl bsdmainutils automake cmake cargo ``` * Install for linux @@ -73,7 +91,7 @@ ln -s /usr/bin/ranlib aarch64-unknown-linux-gnu-ranlib ln -s /usr/bin/strip aarch64-unknown-linux-gnu-strip PATH=$PATH:~/bin cd ~/zen/ -./zcutil/build-arm.sh --disable-rust -j$(nproc) +./zcutil/build-arm.sh -j$(nproc) ``` Instructions to redeem pre block 110,000 ZCL ------------- diff --git a/configure.ac b/configure.ac index 07bea9337c..9a6f8d912a 100644 --- a/configure.ac +++ b/configure.ac @@ -4,12 +4,12 @@ AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 2) define(_CLIENT_VERSION_MINOR, 0) define(_CLIENT_VERSION_REVISION, 14) -define(_CLIENT_VERSION_BUILD, 25) +define(_CLIENT_VERSION_BUILD, 50) # ZEN_MOD_END 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, true) -define(_COPYRIGHT_YEAR, 2017) +define(_COPYRIGHT_YEAR, 2018) 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]) @@ -471,12 +471,9 @@ if test x$use_hardening != xno; then if test x$TARGET_OS != xwindows; then # All windows code is PIC, forcing it on just adds useless compile warnings AX_CHECK_COMPILE_FLAG([-fPIE],[PIE_FLAGS="-fPIE"],[AC_MSG_ERROR(Cannot enable -fPIE)]) - # AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"],[AC_MSG_ERROR(Cannot enable -pie)]) - #if test x$BUILD_OS = xdarwin; then - # AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"],[AC_MSG_WARN(Cannot enable -pie)]) - #else - # AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"],[AC_MSG_ERROR(Cannot enable -pie)]) - #fi + if test x$BUILD_OS != xdarwin; then + AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"],[AC_MSG_WARN(Cannot enable -pie)]) + fi # ZEN_MOD_END else # These are only available on Windows. @@ -724,6 +721,18 @@ AX_OPENMP( AC_DEFINE(HAVE_OPENMP, 0, [Define if OpenMP is enabled]) AM_CONDITIONAL([HAVE_OPENMP], [false])]) +# ZEN_MOD_START +dnl detect aarch64 +case $host in + aarch64*) + AM_CONDITIONAL([IS_ARM64],[true]) + ;; + *) + AM_CONDITIONAL([IS_ARM64],[false]) + ;; +esac +# ZEN_MOD_END + # Gitian uses a config.site that sets depends_prefix, and then sets --prefix=/ # build.sh just uses --prefix if test x$depends_prefix != x; then diff --git a/contrib/debian/changelog b/contrib/debian/changelog index 606b33b906..c453f270c1 100644 --- a/contrib/debian/changelog +++ b/contrib/debian/changelog @@ -1,161 +1,5 @@ -zcash (1.0.14) stable; urgency=medium +zen (2.0.14) stable; urgency=medium - * 1.0.14 release. + * 2.0.14 release. - -- Zcash Company Wed, 03 Jan 2018 23:54:16 +0100 - -zcash (1.0.14~rc1) stable; urgency=medium - - * 1.0.14-rc1 release. - - -- Zcash Company Fri, 22 Dec 2017 10:12:41 +0000 - -zcash (1.0.13) stable; urgency=medium - - * 1.0.13 release. - - -- Zcash Company Mon, 20 Nov 2017 12:31:53 +0000 - -zcash (1.0.13~rc2) stable; urgency=medium - - * 1.0.13-rc2 release. - - -- Zcash Company Fri, 17 Nov 2017 18:01:08 +0000 - -zcash (1.0.13~rc1) stable; urgency=medium - - * 1.0.13-rc1 release. - - -- Zcash Company Wed, 15 Nov 2017 00:02:21 +0000 - -zcash (1.0.12) stable; urgency=medium - - * 1.0.12 release. - - -- Zcash Company Thu, 28 Sep 2017 01:26:44 +0100 - -zcash (1.0.12~rc1) stable; urgency=medium - - * 1.0.12-rc1 release. - - -- Zcash Company Sat, 23 Sep 2017 10:51:36 +0100 - -zcash (1.0.11) stable; urgency=medium - - * 1.0.11 release. - - -- Zcash Company Tue, 15 Aug 2017 10:06:25 +0100 - -zcash (1.0.11~rc1) stable; urgency=medium - - * 1.0.11-rc1 release. - - -- Zcash Company Tue, 01 Aug 2017 17:12:52 +0200 - -zcash (1.0.10+1) stable; urgency=medium - - * 1.0.10-1 release. - - -- Zcash Company Fri, 23 Jun 2017 19:50:41 -0700 - -zcash (1.0.10) stable; urgency=medium - - * 1.0.10 release. - - -- Zcash Company Thu, 22 Jun 2017 15:13:04 +1200 - -zcash (1.0.9) stable; urgency=medium - - * 1.0.9 release. - - -- Zcash Company Wed, 24 May 2017 12:51:06 -0700 - -zcash (1.0.8+1) jessie; urgency=high - - * 1.0.8-1 release. - - -- Zcash Company Thu, 13 Apr 2017 20:20:37 -0700 - -zcash (1.0.8) jessie; urgency=medium - - * 1.0.8 release. - - -- Zcash Company Mon, 27 Mar 2017 21:30:07 +0100 - -zcash (1.0.7+1) jessie; urgency=medium - - * 1.0.7-1 release. - - -- Zcash Company Wed, 08 Mar 2017 13:51:11 -0800 - -zcash (1.0.7) jessie; urgency=medium - - * 1.0.7 release. - - -- Zcash Company Fri, 03 Mar 2017 20:55:04 -0800 - -zcash (1.0.6) jessie; urgency=medium - - * 1.0.6 release. - - -- Zcash Company Fri, 10 Feb 2017 10:23:00 -0800 - -zcash (1.0.5) jessie; urgency=medium - - * 1.0.5 release. - - -- Zcash Company Thu, 19 Jan 2017 19:23:40 -0700 - -zcash (1.0.4) jessie; urgency=medium - - * 1.0.4 release. - - -- Zcash Company Thu, 15 Dec 2016 16:46:14 +1300 - -zcash (1.0.3) jessie; urgency=medium - - * 1.0.3 release. - - -- Zcash Company Wed, 17 Nov 2016 15:56:00 -0700 - -zcash (1.0.2) jessie; urgency=medium - - * 1.0.2 release. - - -- Zcash Company Mon, 07 Nov 2016 19:01:35 -0600 - -zcash (1.0.1) jessie; urgency=medium - - * 1.0.1 release. - - -- Zcash Company Thu, 03 Nov 2016 23:21:09 -0500 - -zcash (1.0.0-sprout) jessie; urgency=medium - - * 1.0.0 release. - - -- Zcash Company Fri, 28 Oct 2016 03:00:50 -0700 - -zcash (1.0.0-rc4) jessie; urgency=medium - - * 1.0.0-rc4 release. - - -- Zcash Company Thu, 27 Oct 2016 13:36:00 +0100 - -zcash (1.0.0-rc3) jessie; urgency=medium - - * 1.0.0-rc3 release. - - -- Zcash Company Wed, 26 Oct 2016 23:17:03 +0100 - -zcash (1.0.0-rc2) jessie; urgency=medium - - * 1.0.0-rc2 release. - - -- Zcash Company Sun, 23 Oct 2016 01:51:27 +0100 - -zcash (1.0.0-rc1) jessie; urgency=medium - - * Initial packaging for Debian. - - -- Zcash Company Mon, 17 Oct 2016 11:47:02 -0700 + -- Zen Blockchain Foundation Fri, 15 Jun 2018 04:00:00 +0200 diff --git a/contrib/debian/control b/contrib/debian/control index 90f1d8cb7d..a62b81ecac 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -1,8 +1,8 @@ -Source: zcash +Source: zen Section: utils Priority: optional -Maintainer: Zen Blockchain Foundation -Homepage: https://zensystem.io +Maintainer: Zen Blockchain Foundation +Homepage: https://zencash.com Build-Depends: autoconf, automake, bsdmainutils, build-essential, git, g++-multilib, libc6-dev, libtool, m4, ncurses-dev, pkg-config, python, @@ -11,6 +11,6 @@ Vcs-Git: https://github.com/ZencashOfficial/zen.git Vcs-Browser: https://github.com/ZencashOfficial/zen Package: zen -Architecture: amd64 +Architecture: any Depends: ${shlibs:Depends} -Description: Private and reliable transactions, communications, and publishing - zensystem.io +Description: Private and reliable transactions, communications, and publishing - zencash.com diff --git a/contrib/debian/copyright b/contrib/debian/copyright index ac2ccd76af..ca38f4e968 100644 --- a/contrib/debian/copyright +++ b/contrib/debian/copyright @@ -1,10 +1,10 @@ Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174 Upstream-Name: ZenCash -Upstream-Contact: ZenCash Team -Source: https://github.com/zencashofficial/zen +Upstream-Contact: ZenCash Team +Source: https://github.com/ZencashOfficial/zen Files: * -Copyright: 2016-2017, The Zen Blockchain Foundation +Copyright: 2016-2018, The Zen Blockchain Foundation 2016-2017, The Zcash developers 2009-2017, Bitcoin Core developers License: Expat diff --git a/contrib/debian/zcash.examples b/contrib/debian/zcash.examples deleted file mode 100644 index 924659c028..0000000000 --- a/contrib/debian/zcash.examples +++ /dev/null @@ -1 +0,0 @@ -DEBIAN/examples/zcash.conf diff --git a/contrib/debian/zcash.install b/contrib/debian/zcash.install deleted file mode 100644 index b39eaeeb3f..0000000000 --- a/contrib/debian/zcash.install +++ /dev/null @@ -1,3 +0,0 @@ -usr/bin/zcashd -usr/bin/zcash-cli -usr/bin/zcash-fetch-params diff --git a/contrib/debian/zcash.manpages b/contrib/debian/zcash.manpages deleted file mode 100644 index a1115f679e..0000000000 --- a/contrib/debian/zcash.manpages +++ /dev/null @@ -1,2 +0,0 @@ -DEBIAN/manpages/zcash-cli.1 -DEBIAN/manpages/zcashd.1 diff --git a/contrib/debian/zen.examples b/contrib/debian/zen.examples new file mode 100644 index 0000000000..edb0c4f242 --- /dev/null +++ b/contrib/debian/zen.examples @@ -0,0 +1 @@ +DEBIAN/examples/zen.conf diff --git a/contrib/debian/zen.install b/contrib/debian/zen.install new file mode 100644 index 0000000000..9726636d0d --- /dev/null +++ b/contrib/debian/zen.install @@ -0,0 +1,3 @@ +usr/bin/zend +usr/bin/zen-cli +usr/bin/zen-fetch-params diff --git a/contrib/debian/zen.manpages b/contrib/debian/zen.manpages new file mode 100644 index 0000000000..a99a3a50f8 --- /dev/null +++ b/contrib/debian/zen.manpages @@ -0,0 +1,2 @@ +DEBIAN/manpages/zen-cli.1 +DEBIAN/manpages/zend.1 diff --git a/contrib/zcash-cli.bash-completion b/contrib/zen-cli.bash-completion similarity index 85% rename from contrib/zcash-cli.bash-completion rename to contrib/zen-cli.bash-completion index 37fa1d1160..8e9ffd9c77 100644 --- a/contrib/zcash-cli.bash-completion +++ b/contrib/zen-cli.bash-completion @@ -1,10 +1,10 @@ -# bash programmable completion for zcash-cli(1) +# bash programmable completion for zen-cli(1) # Copyright (c) 2012-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -# call $zcash-cli for RPC -_zcash_rpc() { +# call $zen-cli for RPC +_zen_rpc() { # determine already specified args necessary for RPC local rpcargs=() for i in ${COMP_LINE}; do @@ -14,25 +14,25 @@ _zcash_rpc() { ;; esac done - $zcash_cli "${rpcargs[@]}" "$@" + $zen_cli "${rpcargs[@]}" "$@" } # Add wallet accounts to COMPREPLY -_zcash_accounts() { +_zen_accounts() { local accounts - # Accounts are deprecated in Zcash - #accounts=$(_zcash_rpc listaccounts | awk -F '"' '{ print $2 }') + # Accounts are deprecated in Zen + #accounts=$(_zen_rpc listaccounts | awk -F '"' '{ print $2 }') accounts="\\\"\\\"" COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) ) } -_zcash_cli() { +_zen_cli() { local cur prev words=() cword - local zcash_cli + local zen_cli - # save and use original argument to invoke zcash-cli for -help, help and RPC - # as zcash-cli might not be in $PATH - zcash_cli="$1" + # save and use original argument to invoke zen-cli for -help, help and RPC + # as zen-cli might not be in $PATH + zen_cli="$1" COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword @@ -62,7 +62,7 @@ _zcash_cli() { if ((cword > 3)); then case ${words[cword-3]} in addmultisigaddress) - _zcash_accounts + _zen_accounts return 0 ;; getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock) @@ -91,7 +91,7 @@ _zcash_cli() { return 0 ;; move|setaccount) - _zcash_accounts + _zen_accounts return 0 ;; esac @@ -107,7 +107,7 @@ _zcash_cli() { return 0 ;; getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany) - _zcash_accounts + _zen_accounts return 0 ;; esac @@ -131,12 +131,12 @@ _zcash_cli() { # only parse -help if senseful if [[ -z "$cur" || "$cur" =~ ^- ]]; then - helpopts=$($zcash_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) + helpopts=$($zen_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) fi # only parse help if senseful if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then - commands=$(_zcash_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') + commands=$(_zen_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') fi COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) ) @@ -149,7 +149,7 @@ _zcash_cli() { ;; esac } && -complete -F _zcash_cli zcash-cli +complete -F _zen_cli zen-cli # Local variables: # mode: shell-script diff --git a/contrib/zcash-tx.bash-completion b/contrib/zen-tx.bash-completion similarity index 75% rename from contrib/zcash-tx.bash-completion rename to contrib/zen-tx.bash-completion index e808f93cb9..5011d7103d 100644 --- a/contrib/zcash-tx.bash-completion +++ b/contrib/zen-tx.bash-completion @@ -1,15 +1,15 @@ -# bash programmable completion for zcash-tx(1) +# bash programmable completion for zen-tx(1) # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -_zcash_tx() { +_zen_tx() { local cur prev words=() cword - local zcash_tx + local zen_tx - # save and use original argument to invoke zcash-tx for -help + # save and use original argument to invoke zen-tx for -help # it might not be in $PATH - zcash_tx="$1" + zen_tx="$1" COMPREPLY=() _get_comp_words_by_ref -n =: cur prev words cword @@ -27,15 +27,15 @@ _zcash_tx() { if [[ "$cword" == 1 || ( "$prev" != "-create" && "$prev" == -* ) ]]; then # only options (or an uncompletable hex-string) allowed - # parse zcash-tx -help for options + # parse zen-tx -help for options local helpopts - helpopts=$($zcash_tx -help | sed -e '/^ -/ p' -e d ) + helpopts=$($zen_tx -help | sed -e '/^ -/ p' -e d ) COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) else # only commands are allowed # parse -help for commands local helpcmds - helpcmds=$($zcash_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d ) + helpcmds=$($zen_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d ) COMPREPLY=( $( compgen -W "$helpcmds" -- "$cur" ) ) fi @@ -46,7 +46,7 @@ _zcash_tx() { return 0 } && -complete -F _zcash_tx zcash-tx +complete -F _zen_tx zen-tx # Local variables: # mode: shell-script diff --git a/contrib/zcashd.bash-completion b/contrib/zend.bash-completion similarity index 82% rename from contrib/zcashd.bash-completion rename to contrib/zend.bash-completion index 3a2f091bdc..01a9e6099e 100644 --- a/contrib/zcashd.bash-completion +++ b/contrib/zend.bash-completion @@ -1,16 +1,16 @@ -# bash programmable completion for zcashd(1) +# bash programmable completion for zend(1) # Copyright (c) 2012-2017 The Bitcoin Core developers # Copyright (c) 2016-2017 The Zcash developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -_zcashd() { +_zend() { local cur prev words=() cword - local zcashd + local zend - # save and use original argument to invoke zcashd for -help + # save and use original argument to invoke zend for -help # it might not be in $PATH - zcashd="$1" + zend="$1" COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword @@ -34,7 +34,7 @@ _zcashd() { # only parse -help if senseful if [[ -z "$cur" || "$cur" =~ ^- ]]; then local helpopts - helpopts=$($zcashd -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) + helpopts=$($zend -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) fi @@ -46,7 +46,7 @@ _zcashd() { ;; esac } && -complete -F _zcashd zcashd +complete -F _zend zend # Local variables: # mode: shell-script diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk index e7e6bde29f..23d449ab7d 100644 --- a/depends/packages/openssl.mk +++ b/depends/packages/openssl.mk @@ -1,12 +1,8 @@ package=openssl -# ZEN_MOD_START -$(package)_version=1.1.0g -# ZEN_MOD_END +$(package)_version=1.1.0h $(package)_download_path=https://www.openssl.org/source $(package)_file_name=$(package)-$($(package)_version).tar.gz -# ZEN_MOD_START -$(package)_sha256_hash=de4d501267da39310905cb6dc8c6121f7a2cad45a7707f76df828fe1b85073af -# ZEN_MOD_END +$(package)_sha256_hash=5835626cde9e99656585fc7aaa2302a73a7e1340bf8c14fd635a62c66802a517 define $(package)_set_vars $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" diff --git a/doc/authors.md b/doc/authors.md index 4e3551ac5d..1e89112b31 100644 --- a/doc/authors.md +++ b/doc/authors.md @@ -1,18 +1,11 @@ Zcash Contributors ================== -<<<<<<< HEAD Jack Grigg (558) Simon Liu (286) Sean Bowe (193) Daira Hopwood (102) Wladimir J. van der Laan (71) -======= -Jack Grigg (387) -Simon Liu (254) -Sean Bowe (185) -Daira Hopwood (80) ->>>>>>> c782bcfe1... Change network identifier and versions Taylor Hornby (65) Nathan Wilcox (56) Jay Graber (53) @@ -28,12 +21,9 @@ MarcoFalke (7) Luke Dashjr (6) Johnathan Corgan (5) Gregory Maxwell (5) -<<<<<<< HEAD Ariel Gabizon (5) kozyilmaz (4) -======= Zclassic Team (4) ->>>>>>> c782bcfe1... Change network identifier and versions Philip Kaufmann (4) Peter Todd (4) Patrick Strateman (4) diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am index 27917a2084..b68911c830 100644 --- a/doc/man/Makefile.am +++ b/doc/man/Makefile.am @@ -1 +1 @@ -dist_man1_MANS=zcashd.1 zcash-cli.1 zcash-fetch-params.1 zcash-tx.1 +dist_man1_MANS=zend.1 zen-cli.1 zen-fetch-params.1 zen-tx.1 diff --git a/doc/man/zcash-cli.1 b/doc/man/zen-cli.1 similarity index 64% rename from doc/man/zcash-cli.1 rename to doc/man/zen-cli.1 index 7026c3366f..deadf4e7c8 100644 --- a/doc/man/zcash-cli.1 +++ b/doc/man/zen-cli.1 @@ -1,21 +1,18 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. -.TH ZCASH-CLI "1" "January 2018" "zcash-cli v1.0.14" "User Commands" +.TH ZEN-CLI "1" "June 2018" "zen-cli v2.0.14" "User Commands" .SH NAME -zcash-cli \- manual page for zcash-cli v1.0.14 +zen-cli \- manual page for zen-cli v2.0.14 .SH DESCRIPTION -Zcash RPC client version v1.0.14 -.PP -In order to ensure you are adequately protecting your privacy when using Zcash, -please see . +Zen RPC client version v2.0.14 .SS "Usage:" .TP -zcash\-cli [options] [params] -Send command to Zcash +zen\-cli [options] [params] +Send command to zen .TP -zcash\-cli [options] help +zen\-cli [options] help List commands .TP -zcash\-cli [options] help +zen\-cli [options] help Get help for a command .SH OPTIONS .HP @@ -25,7 +22,7 @@ This help message .HP \fB\-conf=\fR .IP -Specify configuration file (default: zcash.conf) +Specify configuration file (default: zen.conf) .HP \fB\-datadir=\fR .IP @@ -47,7 +44,7 @@ Send commands to node running on (default: 127.0.0.1) .HP \fB\-rpcport=\fR .IP -Connect to JSON\-RPC on (default: 8232 or testnet: 18232) +Connect to JSON\-RPC on (default: 8231 or testnet: 18231) .HP \fB\-rpcwait\fR .IP @@ -66,11 +63,11 @@ Password for JSON\-RPC connections Timeout in seconds during HTTP requests, or 0 for no timeout. (default: 900) .SH COPYRIGHT -Copyright \(co 2009\-2017 The Bitcoin Core Developers -Copyright \(co 2015\-2017 The Zcash Developers -Copyright \(co 2015\-2017 zdeveloper.org -Copyright \(co 2015\-2017 Zen Blockchain Foundation +Copyright (C) 2009-2017 The Bitcoin Core Developers +Copyright (C) 2015-2017 The Zcash Developers +Copyright (C) 2015-2017 Zdeveloper.org +Copyright (C) 2015-2017 Zen Blockchain Foundation This is experimental software. diff --git a/doc/man/zcash-fetch-params.1 b/doc/man/zen-fetch-params.1 similarity index 100% rename from doc/man/zcash-fetch-params.1 rename to doc/man/zen-fetch-params.1 diff --git a/doc/man/zcash-tx.1 b/doc/man/zen-tx.1 similarity index 79% rename from doc/man/zcash-tx.1 rename to doc/man/zen-tx.1 index a065ca04a2..589be3f7e5 100644 --- a/doc/man/zcash-tx.1 +++ b/doc/man/zen-tx.1 @@ -1,16 +1,16 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. -.TH ZCASH-TX "1" "January 2018" "zcash-tx v1.0.14" "User Commands" +.TH ZEN-TX "1" "June 2018" "zen-tx v2.0.14" "User Commands" .SH NAME -zcash-tx \- manual page for zcash-tx v1.0.14 +zen-tx \- manual page for zen-tx v2.0.14 .SH DESCRIPTION -Zcash zcash\-tx utility version v1.0.14 +Zencash zen\-tx utility version v2.0.14 .SS "Usage:" .TP -zcash\-tx [options] [commands] -Update hex\-encoded zcash transaction +zen\-tx [options] [commands] +Update hex\-encoded zencash transaction .TP -zcash\-tx [options] \fB\-create\fR [commands] -Create hex\-encoded zcash transaction +zen\-tx [options] \fB\-create\fR [commands] +Create hex\-encoded zencash transaction .SH OPTIONS .HP \-? @@ -85,11 +85,10 @@ set=NAME:JSON\-STRING Set register NAME to given JSON\-STRING .SH COPYRIGHT -In order to ensure you are adequately protecting your privacy when using Zcash, -please see . - Copyright (C) 2009-2017 The Bitcoin Core Developers Copyright (C) 2015-2017 The Zcash Developers +Copyright (C) 2015-2017 Zdeveloper.org +Copyright (C) 2015-2017 Zen Blockchain Foundation This is experimental software. diff --git a/doc/man/zcashd.1 b/doc/man/zend.1 similarity index 88% rename from doc/man/zcashd.1 rename to doc/man/zend.1 index b1e412e781..d84ba99fad 100644 --- a/doc/man/zcashd.1 +++ b/doc/man/zend.1 @@ -1,16 +1,13 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. -.TH ZCASHD "1" "January 2018" "zcashd v1.0.14" "User Commands" +.TH ZEND "1" "June 2018" "zend v2.0.14" "User Commands" .SH NAME -zcashd \- manual page for zcashd v1.0.14 +zend \- manual page for zend v2.0.14 .SH DESCRIPTION -Zcash Daemon version v1.0.14 -.PP -In order to ensure you are adequately protecting your privacy when using Zcash, -please see . +Zen Daemon version v2.0.14 .SS "Usage:" .TP -zcashd [options] -Start Zcash Daemon +zend [options] +Start Zen Daemon .SH OPTIONS .HP \-? @@ -41,7 +38,7 @@ How thorough the block verification of \fB\-checkblocks\fR is (0\-4, default: 3) .HP \fB\-conf=\fR .IP -Specify configuration file (default: zcash.conf) +Specify configuration file (default: zen.conf) .HP \fB\-daemon\fR .IP @@ -54,7 +51,7 @@ Specify data directory \fB\-disabledeprecation=\fR .IP Disable block\-height node deprecation and automatic shutdown (example: -\fB\-disabledeprecation\fR=\fI\,1\/\fR.0.14) +\fB\-disabledeprecation\fR=\fI\,2\/\fR.0.14) .HP \fB\-exportdir=\fR .IP @@ -79,12 +76,12 @@ mempool will accept (default: 0 = no limit applied) .HP \fB\-par=\fR .IP -Set the number of script verification threads (\fB\-2\fR to 16, 0 = auto, <0 = +Set the number of script verification threads (\fB\-8\fR to 16, 0 = auto, <0 = leave that many cores free, default: 0) .HP \fB\-pid=\fR .IP -Specify pid file (default: zcashd.pid) +Specify pid file (default: zend.pid) .HP \fB\-prune=\fR .IP @@ -189,7 +186,7 @@ Relay non\-P2SH multisig (default: 1) .HP \fB\-port=\fR .IP -Listen for connections on (default: 8233 or testnet: 18233) +Listen for connections on (default: 9033 or testnet: 19033) .HP \fB\-proxy=\fR .IP @@ -217,6 +214,27 @@ Tor control port to use if onion listening enabled (default: .IP Tor control port password (default: empty) .HP +\fB\-tlsvalidate=\fR<0 or 1> +.IP +Connect to peers only with valid certificates (default: 0) +.HP +\fB\-tlskeypath=\fR +.IP +Full path to a private key +.HP +\fB\-tlskeypwd=\fR +.IP +Password for a private key encryption (default: not set, i.e. private +key will be stored unencrypted) +.HP +\fB\-tlscertpath=\fR +.IP +Full path to a certificate +.HP +\fB\-tlstrustdir=\fR +.IP +Full path to a trusted certificates directory +.HP \fB\-whitebind=\fR .IP Bind to given address and whitelist peers connecting to it. Use @@ -241,7 +259,7 @@ Set key pool size to (default: 100) .HP \fB\-paytxfee=\fR .IP -Fee (in ZEC/kB) to add to transactions you send (default: 0.00) +Fee (in ZEN/kB) to add to transactions you send (default: 0.00) .HP \fB\-rescan\fR .IP @@ -266,7 +284,7 @@ confirmation on average within n blocks (default: 2) .HP \fB\-maxtxfee=\fR .IP -Maximum total fees (in ZEC) to use in a single wallet transaction; +Maximum total fees (in ZEN) to use in a single wallet transaction; setting this too low may abort large transactions (default: 0.10) .HP \fB\-upgradewallet\fR @@ -339,7 +357,7 @@ Prepend debug output with timestamp (default: 1) .HP \fB\-minrelaytxfee=\fR .IP -Fees (in ZEC/kB) smaller than this are considered zero fee for relaying +Fees (in ZEN/kB) smaller than this are considered zero fee for relaying (default: 0.000001) .HP \fB\-printtoconsole\fR @@ -350,6 +368,10 @@ Send trace/debug info to console instead of debug.log file .IP Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR) .HP +\fB\-limitdebuglogsize\fR +.IP +Limit the debug.log file size to 10Mb (default: 1 when no \fB\-debug\fR) +.HP \fB\-testnet\fR .IP Use the test network @@ -460,10 +482,11 @@ output (default: 1 if running in a console, 0 otherwise) Number of seconds between metrics refreshes (default: 1 if running in a console, 600 otherwise) .SH COPYRIGHT -Copyright \(co 2009\-2017 The Bitcoin Core Developers -Copyright \(co 2015\-2017 The Zcash Developers -Copyright \(co 2015\-2017 zdeveloper.org -Copyright \(co 2015\-2017 Zen Blockchain Foundation + +Copyright (C) 2009-2017 The Bitcoin Core Developers +Copyright (C) 2015-2017 The Zcash Developers +Copyright (C) 2015-2017 Zdeveloper.org +Copyright (C) 2015-2017 Zen Blockchain Foundation This is experimental software. diff --git a/doc/tor.md b/doc/tor.md index 5c93878a5f..8ce4fccf4c 100644 --- a/doc/tor.md +++ b/doc/tor.md @@ -139,11 +139,7 @@ In a typical situation, where you're only reachable via Tor, this should suffice listen on all devices and another node could establish a clearnet connection, when knowing your address. To mitigate this, additionally bind the address of your Tor proxy: -<<<<<<< HEAD - ./zcashd ... -bind=127.0.0.1 -======= ./zend ... -bind=127.0.0.1 ->>>>>>> 1462d9c3e... Zenify docs If you don't care too much about hiding your node, and want to be reachable on IPv4 as well, use `discover` instead: diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py index c7fc36861c..4c43e31587 100755 --- a/qa/rpc-tests/test_framework/test_framework.py +++ b/qa/rpc-tests/test_framework/test_framework.py @@ -142,8 +142,8 @@ def main(self): print("Note: bitcoinds were not stopped and may still be running") if not self.options.nocleanup and not self.options.noshutdown: - print("(NOT) Cleaning up") - #shutil.rmtree(self.options.tmpdir) + print("Cleaning up") + shutil.rmtree(self.options.tmpdir) if success: print("Tests successful") diff --git a/qa/zcash/full_test_suite.py b/qa/zcash/full_test_suite.py index 481a1550ae..087e79b7ed 100755 --- a/qa/zcash/full_test_suite.py +++ b/qa/zcash/full_test_suite.py @@ -65,23 +65,23 @@ def check_security_hardening(): # PIE, RELRO, Canary, and NX are tested by make check-security. ret &= subprocess.call(['make', '-C', repofile('src'), 'check-security']) == 0 - - ret &= test_rpath_runpath('src/zcashd') - ret &= test_rpath_runpath('src/zcash-cli') - ret &= test_rpath_runpath('src/zcash-gtest') - ret &= test_rpath_runpath('src/zcash-tx') +# ZEN_MOD_START + ret &= test_rpath_runpath('src/zend') + ret &= test_rpath_runpath('src/zen-cli') + ret &= test_rpath_runpath('src/zen-gtest') + ret &= test_rpath_runpath('src/zen-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. - ret &= test_fortify_source('src/zcashd') - ret &= test_fortify_source('src/zcash-cli') - ret &= test_fortify_source('src/zcash-gtest') - ret &= test_fortify_source('src/zcash-tx') + ret &= test_fortify_source('src/zend') + ret &= test_fortify_source('src/zen-cli') + ret &= test_fortify_source('src/zen-gtest') + ret &= test_fortify_source('src/zen-tx') ret &= test_fortify_source('src/test/test_bitcoin') ret &= test_fortify_source('src/zcash/GenerateParams') - +# ZEN_MOD_END return ret def ensure_no_dot_so_in_depends(): @@ -140,7 +140,9 @@ def util_test(): STAGE_COMMANDS = { 'btest': [repofile('src/test/test_bitcoin'), '-p'], - 'gtest': [repofile('src/zcash-gtest')], +# ZEN_MOD_START + 'gtest': [repofile('src/zen-gtest')], +# ZEN_MOD_END 'sec-hard': check_security_hardening, 'no-dot-so': ensure_no_dot_so_in_depends, 'util-test': util_test, diff --git a/src/Makefile.am b/src/Makefile.am index 1a76fd0221..b35198430c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -55,12 +55,18 @@ LIBSNARK_CONFIG_FLAGS = CURVE=ALT_BN128 NO_PROCPS=1 NO_DOCS=1 STATIC=1 NO_SUPERC if HAVE_OPENMP LIBSNARK_CONFIG_FLAGS += MULTICORE=1 endif +# ZEN_MOD_START +LIBSNARK_OPTFLAGS =-O2 +if !IS_ARM64 +LIBSNARK_OPTFLAGS +=-march=x86-64 +endif $(LIBSNARK): $(wildcard snark/src/*) - $(AM_V_at) CXXFLAGS="$(LIBSNARK_CXXFLAGS)" $(MAKE) $(AM_MAKEFLAGS) -C snark/ install PREFIX=$(srcdir)/build DEPINST="$(LIBSNARK_DEPINST)" $(LIBSNARK_CONFIG_FLAGS) OPTFLAGS="-O2 -march=x86-64" + $(AM_V_at) CXXFLAGS="$(LIBSNARK_CXXFLAGS)" $(MAKE) $(AM_MAKEFLAGS) -C snark/ install PREFIX=$(srcdir)/build DEPINST="$(LIBSNARK_DEPINST)" $(LIBSNARK_CONFIG_FLAGS) OPTFLAGS="$(LIBSNARK_OPTFLAGS)" libsnark-tests: $(wildcard snark/src/*) - $(AM_V_at) CXXFLAGS="$(LIBSNARK_CXXFLAGS)" $(MAKE) $(AM_MAKEFLAGS) -C snark/ check PREFIX=$(srcdir)/build DEPINST="$(LIBSNARK_DEPINST)" $(LIBSNARK_CONFIG_FLAGS) OPTFLAGS="-O2 -march=x86-64" + $(AM_V_at) CXXFLAGS="$(LIBSNARK_CXXFLAGS)" $(MAKE) $(AM_MAKEFLAGS) -C snark/ check PREFIX=$(srcdir)/build DEPINST="$(LIBSNARK_DEPINST)" $(LIBSNARK_CONFIG_FLAGS) OPTFLAGS="$(LIBSNARK_OPTFLAGS)" +# ZEN_MOD_END $(LIBUNIVALUE): $(wildcard univalue/lib/*) $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C univalue/ diff --git a/src/clientversion.h b/src/clientversion.h index bd3273d37c..60b37c9769 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -36,7 +36,7 @@ #define CLIENT_VERSION_MINOR 0 // ZEN_MOD_START #define CLIENT_VERSION_REVISION 14 -#define CLIENT_VERSION_BUILD 25 +#define CLIENT_VERSION_BUILD 50 // ZEN_MOD_END //! Set to true for release, false for prerelease or test build diff --git a/src/deprecation.cpp b/src/deprecation.cpp index 7f5749319c..527ff6581a 100644 --- a/src/deprecation.cpp +++ b/src/deprecation.cpp @@ -24,7 +24,9 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging) { if (blocksToDeprecation == 0 || forceLogging) { auto msg = strprintf(_("This version has been deprecated as of block height %d."), DEPRECATION_HEIGHT) + " " + - _("You should upgrade to the latest version of Zcash."); +// ZEN_MOD_START + _("You should upgrade to the latest version of Zen."); +// ZEN_MOD_END if (!disableDeprecation) { msg += " " + strprintf(_("To disable deprecation for this version, set %s%s."), "-disabledeprecation=", CLIENT_VERSION_STR); @@ -41,15 +43,19 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging) { if (disableDeprecation) { msg = strprintf(_("This version will be deprecated at block height %d."), DEPRECATION_HEIGHT) + " " + - _("You should upgrade to the latest version of Zcash."); +// ZEN_MOD_START + _("You should upgrade to the latest version of Zen."); +// ZEN_MOD_END } else { msg = strprintf(_("This version will be deprecated at block height %d, and will automatically shut down."), DEPRECATION_HEIGHT) + " " + - _("You should upgrade to the latest version of Zcash.") + " " + +// ZEN_MOD_START + _("You should upgrade to the latest version of Zen.") + " " + +// ZEN_MOD_END strprintf(_("To disable deprecation for this version, set %s%s."), "-disabledeprecation=", CLIENT_VERSION_STR); } LogPrintf("*** %s\n", msg); uiInterface.ThreadSafeMessageBox(msg, "", CClientUIInterface::MSG_WARNING); } -} \ No newline at end of file +} diff --git a/src/deprecation.h b/src/deprecation.h index 83357d16ad..def5a0b628 100644 --- a/src/deprecation.h +++ b/src/deprecation.h @@ -6,8 +6,8 @@ #define ZCASH_DEPRECATION_H // ZEN_MOD_START -static const int APPROX_RELEASE_HEIGHT = 260000; -static const int WEEKS_UNTIL_DEPRECATION = 18; +static const int APPROX_RELEASE_HEIGHT = 328000; +static const int WEEKS_UNTIL_DEPRECATION = 16; // ZEN_MOD_END static const int DEPRECATION_HEIGHT = APPROX_RELEASE_HEIGHT + (WEEKS_UNTIL_DEPRECATION * 7 * 24 * 24); diff --git a/src/gtest/test_forkmanager.cpp b/src/gtest/test_forkmanager.cpp index 87d2671729..5e9c7706f7 100644 --- a/src/gtest/test_forkmanager.cpp +++ b/src/gtest/test_forkmanager.cpp @@ -3,54 +3,167 @@ #include "chainparams.h" using namespace zen; -//TODO ADD TEST FOR THE SECURENODE AND SUPERNODE FUND ADDRESS AND REWARD -TEST(ForkManager, TestCommunityFundReward) { +TEST(ForkManager, TestCommunityFundRewardTestnet) { SelectParams(CBaseChainParams::TESTNET); CAmount fakeReward = (CAmount)1000L; EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(100,fakeReward, Fork::CommunityFundType::FOUNDATION),0); EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(70000,fakeReward, Fork::CommunityFundType::FOUNDATION),0); EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(70001,fakeReward, Fork::CommunityFundType::FOUNDATION),85); - EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(75000,fakeReward, Fork::CommunityFundType::FOUNDATION),85); - EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(90000,fakeReward, Fork::CommunityFundType::FOUNDATION),120); - EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(245100,fakeReward, Fork::CommunityFundType::FOUNDATION),100); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(85499,fakeReward, Fork::CommunityFundType::FOUNDATION),85); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(85500,fakeReward, Fork::CommunityFundType::FOUNDATION),120); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(260499,fakeReward, Fork::CommunityFundType::FOUNDATION),120); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(260500,fakeReward, Fork::CommunityFundType::FOUNDATION),100); } -TEST(ForkManager, TestReplayProtection) { +TEST(ForkManager, TestCommunityFundRewardMainnet) { + SelectParams(CBaseChainParams::MAIN); + CAmount fakeReward = (CAmount)1000L; + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(100,fakeReward, Fork::CommunityFundType::FOUNDATION),0); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(110000,fakeReward, Fork::CommunityFundType::FOUNDATION),0); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(110001,fakeReward, Fork::CommunityFundType::FOUNDATION),85); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(139199,fakeReward, Fork::CommunityFundType::FOUNDATION),85); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(139200,fakeReward, Fork::CommunityFundType::FOUNDATION),120); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(344699,fakeReward, Fork::CommunityFundType::FOUNDATION),120); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(344700,fakeReward, Fork::CommunityFundType::FOUNDATION),100); +} + +TEST(ForkManager, TestSecureNodeFundRewardTestnet) { + SelectParams(CBaseChainParams::TESTNET); + CAmount fakeReward = (CAmount)1000L; + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(260500,fakeReward, Fork::CommunityFundType::SECURENODE),100); +} + +TEST(ForkManager, TestSecureNodeFundRewardMainnet) { + SelectParams(CBaseChainParams::MAIN); + CAmount fakeReward = (CAmount)1000L; + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(344700,fakeReward, Fork::CommunityFundType::SECURENODE),100); +} + +TEST(ForkManager, TestSuperNodeFundRewardTestnet) { SelectParams(CBaseChainParams::TESTNET); + CAmount fakeReward = (CAmount)1000L; + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(260500,fakeReward, Fork::CommunityFundType::SUPERNODE),100); +} + +TEST(ForkManager, TestSuperNodeFundRewardMainnet) { + SelectParams(CBaseChainParams::MAIN); + CAmount fakeReward = (CAmount)1000L; + EXPECT_EQ(ForkManager::getInstance().getCommunityFundReward(344700,fakeReward, Fork::CommunityFundType::SUPERNODE),100); +} + +TEST(ForkManager, TestReplayProtectionTestnet) { + SelectParams(CBaseChainParams::TESTNET); + EXPECT_EQ(ForkManager::getInstance().getReplayProtectionLevel(100),RPLEVEL_NONE); + EXPECT_EQ(ForkManager::getInstance().getReplayProtectionLevel(72649),RPLEVEL_NONE); + EXPECT_EQ(ForkManager::getInstance().getReplayProtectionLevel(72650),RPLEVEL_BASIC); + EXPECT_EQ(ForkManager::getInstance().getReplayProtectionLevel(85499),RPLEVEL_BASIC); + EXPECT_EQ(ForkManager::getInstance().getReplayProtectionLevel(85500),RPLEVEL_FIXED); +} + +TEST(ForkManager, TestReplayProtectionMainnet) { + SelectParams(CBaseChainParams::MAIN); EXPECT_EQ(ForkManager::getInstance().getReplayProtectionLevel(100),RPLEVEL_NONE); - EXPECT_EQ(ForkManager::getInstance().getReplayProtectionLevel(70000),RPLEVEL_NONE); - EXPECT_EQ(ForkManager::getInstance().getReplayProtectionLevel(75000),RPLEVEL_BASIC); - EXPECT_EQ(ForkManager::getInstance().getReplayProtectionLevel(100000),RPLEVEL_FIXED); + EXPECT_EQ(ForkManager::getInstance().getReplayProtectionLevel(117575),RPLEVEL_NONE); + EXPECT_EQ(ForkManager::getInstance().getReplayProtectionLevel(117576),RPLEVEL_BASIC); + EXPECT_EQ(ForkManager::getInstance().getReplayProtectionLevel(139199),RPLEVEL_BASIC); + EXPECT_EQ(ForkManager::getInstance().getReplayProtectionLevel(139200),RPLEVEL_FIXED); } -TEST(ForkManager, TestTransparentCFAddress) { +TEST(ForkManager, TestTransparentCFAddressTestnet) { SelectParams(CBaseChainParams::TESTNET); EXPECT_TRUE(!ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(100)); - EXPECT_TRUE(!ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(70000)); - EXPECT_TRUE(!ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(75000)); - EXPECT_TRUE(ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(100000)); + EXPECT_TRUE(!ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(70001)); + EXPECT_TRUE(!ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(72650)); + EXPECT_TRUE(!ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(85499)); + EXPECT_TRUE(ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(85500)); + EXPECT_TRUE(ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(260500)); +} + +TEST(ForkManager, TestTransparentCFAddressMainnet) { + SelectParams(CBaseChainParams::MAIN); + EXPECT_TRUE(!ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(100)); + EXPECT_TRUE(!ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(110001)); + EXPECT_TRUE(!ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(117576)); + EXPECT_TRUE(!ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(139199)); + EXPECT_TRUE(ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(139200)); + EXPECT_TRUE(ForkManager::getInstance().canSendCommunityFundsToTransparentAddress(344700)); } TEST(ForkManager, SelectNetworkAfterChainsplit) { SelectParams(CBaseChainParams::REGTEST); - EXPECT_TRUE(ForkManager::getInstance().isAfterChainsplit(1)); + EXPECT_TRUE(ForkManager::getInstance().isAfterChainsplit(1)); + SelectParams(CBaseChainParams::TESTNET); + EXPECT_TRUE(!ForkManager::getInstance().isAfterChainsplit(0)); + EXPECT_TRUE(!ForkManager::getInstance().isAfterChainsplit(70000)); + EXPECT_TRUE(ForkManager::getInstance().isAfterChainsplit(70001)); + SelectParams(CBaseChainParams::MAIN); + EXPECT_TRUE(!ForkManager::getInstance().isAfterChainsplit(0)); + EXPECT_TRUE(!ForkManager::getInstance().isAfterChainsplit(110000)); + EXPECT_TRUE(ForkManager::getInstance().isAfterChainsplit(110001)); +} + +TEST(ForkManager, GetCommunityFundAddressTestnet) { + SelectParams(CBaseChainParams::TESTNET); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(70000,840000, Fork::CommunityFundType::FOUNDATION),""); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(70001,840000, Fork::CommunityFundType::FOUNDATION),"zrBAG3pXCTDq14nivNK9mW8SfwMNcdmMQpb"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(85499,840000, Fork::CommunityFundType::FOUNDATION),"zrRLwpYRYky4wsvwLVrDp8fs89EBTRhNMB1"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(85500,840000, Fork::CommunityFundType::FOUNDATION),"zrRBQ5heytPMN5nY3ssPf3cG4jocXeD8fm1"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(260499,840000, Fork::CommunityFundType::FOUNDATION),"zrRBQ5heytPMN5nY3ssPf3cG4jocXeD8fm1"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(260500,840000, Fork::CommunityFundType::FOUNDATION),"zrFzxutppvxEdjyu4QNjogBMjtC1py9Hp1S"); +} + +TEST(ForkManager, GetCommunityFundAddressMainnet) { + SelectParams(CBaseChainParams::MAIN); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(110000,840000, Fork::CommunityFundType::FOUNDATION),""); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(110001,840000, Fork::CommunityFundType::FOUNDATION),"zsmncLmwEUdVmAGPUrUnNKmPGXyej7mbmdM"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(122506,840000, Fork::CommunityFundType::FOUNDATION),"zsmncLmwEUdVmAGPUrUnNKmPGXyej7mbmdM"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(122507,840000, Fork::CommunityFundType::FOUNDATION),"zsfa9VVJCEdjfPbku4XrFcRR8kTDm2T64rz"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(139199,840000, Fork::CommunityFundType::FOUNDATION),"zsfa9VVJCEdjfPbku4XrFcRR8kTDm2T64rz"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(139200,840000, Fork::CommunityFundType::FOUNDATION),"zsyF68hcYYNLPj5i4PfQJ1kUY6nsFnZkc82"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(189199,840000, Fork::CommunityFundType::FOUNDATION),"zsyF68hcYYNLPj5i4PfQJ1kUY6nsFnZkc82"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(189200,840000, Fork::CommunityFundType::FOUNDATION),"zsfULrmbX7xbhqhAFRffVqCw9RyGv2hqNNG"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(239199,840000, Fork::CommunityFundType::FOUNDATION),"zsfULrmbX7xbhqhAFRffVqCw9RyGv2hqNNG"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(239200,840000, Fork::CommunityFundType::FOUNDATION),"zsoemTfqjicem2QVU8cgBHquKb1o9JR5p4Z"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(289199,840000, Fork::CommunityFundType::FOUNDATION),"zsoemTfqjicem2QVU8cgBHquKb1o9JR5p4Z"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(289200,840000, Fork::CommunityFundType::FOUNDATION),"zt339oiGL6tTgc9Q71f5g1sFTZf6QiXrRUr"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(339199,840000, Fork::CommunityFundType::FOUNDATION),"zt339oiGL6tTgc9Q71f5g1sFTZf6QiXrRUr"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(339200,840000, Fork::CommunityFundType::FOUNDATION),"zsyF68hcYYNLPj5i4PfQJ1kUY6nsFnZkc82"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(344699,840000, Fork::CommunityFundType::FOUNDATION),"zsyF68hcYYNLPj5i4PfQJ1kUY6nsFnZkc82"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(344700,840000, Fork::CommunityFundType::FOUNDATION),"zszpcLB6C5B8QvfDbF2dYWXsrpac5DL9WRk"); +} + +TEST(ForkManager, GetSecureNodeFundAddressTestnet) { + SelectParams(CBaseChainParams::TESTNET); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(260500,840000, Fork::CommunityFundType::SECURENODE),"zrS7QUB2eDbbKvyP43VJys3t7RpojW8GdxH"); +} + +TEST(ForkManager, GetSecureNodeFundAddressMainnet) { SelectParams(CBaseChainParams::MAIN); - EXPECT_TRUE(!ForkManager::getInstance().isAfterChainsplit(0)); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(344700,840000, Fork::CommunityFundType::SECURENODE),"zsxWnyDbU8pk2Vp98Uvkx5Nh33RFzqnCpWN"); } -TEST(ForkManager, GetCommunityFundAddress) { +TEST(ForkManager, GetSuperNodeFundAddressTestnet) { SelectParams(CBaseChainParams::TESTNET); - EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(60000,1000000000, Fork::CommunityFundType::FOUNDATION),""); - EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(70001,1000000000, Fork::CommunityFundType::FOUNDATION),"zrH8KT8KUcpKKNBu3fjH4hA84jZBCawErqn"); - EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(75000,1000000000, Fork::CommunityFundType::FOUNDATION),"zrH8KT8KUcpKKNBu3fjH4hA84jZBCawErqn"); - EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(90000,1000000000, Fork::CommunityFundType::FOUNDATION),"zrRBQ5heytPMN5nY3ssPf3cG4jocXeD8fm1"); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(260500,840000, Fork::CommunityFundType::SUPERNODE),"zrFr5HVm7woVq3oFzkMEdJdbfBchfPAPDsP"); +} + +TEST(ForkManager, GetSuperNodeFundAddressMainnet) { + SelectParams(CBaseChainParams::MAIN); + EXPECT_EQ(ForkManager::getInstance().getCommunityFundAddress(344700,840000, Fork::CommunityFundType::SUPERNODE),"zsnL6pKdzvZ1BPVzALUoqw2KsY966XFs5CE"); } -TEST(ForkManager, GetMinimumTime) { +TEST(ForkManager, GetMinimumTimeTestnet) { SelectParams(CBaseChainParams::TESTNET); EXPECT_EQ(ForkManager::getInstance().getMinimumTime(60000),0); EXPECT_EQ(ForkManager::getInstance().getMinimumTime(70000),0); EXPECT_EQ(ForkManager::getInstance().getMinimumTime(70001),1494616813); - EXPECT_EQ(ForkManager::getInstance().getMinimumTime(75000),1494616813); - EXPECT_EQ(ForkManager::getInstance().getMinimumTime(90000),1494616813); + EXPECT_EQ(ForkManager::getInstance().getMinimumTime(260500),1494616813); +} + +TEST(ForkManager, GetMinimumTimeMainnet) { + SelectParams(CBaseChainParams::MAIN); + EXPECT_EQ(ForkManager::getInstance().getMinimumTime(60000),0); + EXPECT_EQ(ForkManager::getInstance().getMinimumTime(110000),0); + EXPECT_EQ(ForkManager::getInstance().getMinimumTime(110001),1496187000); + EXPECT_EQ(ForkManager::getInstance().getMinimumTime(344700),1496187000); } diff --git a/zcutil/build-arm.sh b/zcutil/build-arm.sh index b2b2d43a2b..7f87284a37 100755 --- a/zcutil/build-arm.sh +++ b/zcutil/build-arm.sh @@ -2,12 +2,49 @@ set -eu -o pipefail -MAKE=make BUILD=aarch64-unknown-linux-gnu HOST=aarch64-unknown-linux-gnu CXX=aarch64-unknown-linux-gnu-g++ CC=aarch64-unknown-linux-gnu-gcc -PREFIX="$(pwd)/depends/$HOST" + +function cmd_pref() { + if type -p "$2" > /dev/null; then + eval "$1=$2" + else + eval "$1=$3" + fi +} + +# If a g-prefixed version of the command exists, use it preferentially. +function gprefix() { + cmd_pref "$1" "g$2" "$2" +} + +gprefix READLINK readlink +cd "$(dirname "$("$READLINK" -f "$0")")/.." + +# Allow user overrides to $MAKE. Typical usage for users who need it: +# MAKE=gmake ./zcutil/build.sh -j$(nproc) +if [[ -z "${MAKE-}" ]]; then + MAKE=make +fi + +# Allow overrides to $BUILD and $HOST for porters. Most users will not need it. +# BUILD=i686-pc-linux-gnu ./zcutil/build.sh +if [[ -z "${BUILD-}" ]]; then + BUILD="$(./depends/config.guess)" +fi +if [[ -z "${HOST-}" ]]; then + HOST="$BUILD" +fi + +# Allow override to $CC and $CXX for porters. Most users will not need it. +if [[ -z "${CC-}" ]]; then + CC=gcc +fi +if [[ -z "${CXX-}" ]]; then + CXX=g++ +fi if [ "x$*" = 'x--help' ] then @@ -17,9 +54,10 @@ Usage: $0 --help Show this help message and exit. -$0 [ --enable-lcov || --disable-tests ] [ --disable-mining ] [ --disable-rust ] [ MAKEARGS... ] - Build Zen and most of its transitive dependencies from - source. MAKEARGS are applied to both dependencies and Zen itself. +# ZEN_MOD_START +$0 [ --enable-lcov || --disable-tests ] [ --disable-mining ] [ --disable-rust ] [ --enable-proton ] [ --disable-libs ] [ MAKEARGS... ] + Build Zen and most of its transitive dependencies from + source. MAKEARGS are applied to both dependencies and Zen itself. If --enable-lcov is passed, Zen is configured to add coverage instrumentation, thus enabling "make cov" to work. @@ -29,13 +67,20 @@ $0 [ --enable-lcov || --disable-tests ] [ --disable-mining ] [ --disable-rust ] code. It must be passed after the test arguments, if present. If --disable-rust is passed, Zen is configured to not build any Rust language - assets. It must be passed after mining/test arguments, if present. + assets. It must be passed after test/mining arguments, if present. + + If --enable-proton is passed, Zen is configured to build the Apache Qpid Proton + library required for AMQP support. This library is not built by default. + It must be passed after the test/mining/Rust arguments, if present. + + If --disable-libs is passed, Zen is configured to not build any libraries like + 'libzcashconsensus'. EOF +# ZEN_MOD_END exit 0 fi set -x -cd "$(dirname "$(readlink -f "$0")")/.." # If --enable-lcov is the first argument, enable lcov coverage support: LCOV_ARG='' @@ -67,14 +112,32 @@ then RUST_ARG='--enable-rust=no' shift fi + +# If --enable-proton is the next argument, enable building Proton code: +PROTON_ARG='--enable-proton=no' +if [ "x${1:-}" = 'x--enable-proton' ] +then + PROTON_ARG='' + shift +fi + +# If --disable-libs is the next argument, build without libs: +LIBS_ARG='' +if [ "x${1:-}" = 'x--disable-libs' ] +then + LIBS_ARG='--without-libs' + shift +fi + PREFIX="$(pwd)/depends/$BUILD/" -#echo '================================================' -#echo "HOST=" "$HOST" "BUILD=" "$BUILD" "NO_RUST=" "$RUST_ARG" -#echo "$MAKE" "$@" "-C ./depends/ V=1" -#echo '================================================' +eval "$MAKE" --version +eval "$CC" --version +eval "$CXX" --version +as --version +ld -v -HOST="$HOST" BUILD="$BUILD" NO_RUST="$RUST_ARG" "$MAKE" "$@" -C ./depends/ V=1 +HOST="$HOST" BUILD="$BUILD" NO_RUST="$RUST_ARG" NO_PROTON="$PROTON_ARG" "$MAKE" "$@" -C ./depends/ V=1 ./autogen.sh -CC="$CC" CXX="$CXX" ./configure --prefix="${PREFIX}" --host="$HOST" --build="$BUILD" "$RUST_ARG" "$HARDENING_ARG" "$LCOV_ARG" "$TEST_ARG" "$MINING_ARG" CXXFLAGS='-fwrapv -fno-strict-aliasing -Wno-stack-protector ' +CC="$CC" CXX="$CXX" ./configure --prefix="${PREFIX}" --host="$HOST" --build="$BUILD" "$RUST_ARG" "$HARDENING_ARG" "$LCOV_ARG" "$TEST_ARG" "$MINING_ARG" "$PROTON_ARG" "$LIBS_ARG" --enable-werror CXXFLAGS='-fwrapv -fno-strict-aliasing -Wno-stack-protector -g' "$MAKE" "$@" V=1 diff --git a/zcutil/build-debian-package.sh b/zcutil/build-debian-package.sh index 0bd0ef2bda..7ce63fc926 100755 --- a/zcutil/build-debian-package.sh +++ b/zcutil/build-debian-package.sh @@ -27,6 +27,7 @@ fi # ZEN_MOD_START PACKAGE_VERSION=$($SRC_PATH/src/zend --version | grep version | cut -d' ' -f4 | tr -d v) +DEBVERSION=$(echo $PACKAGE_VERSION | sed 's/-beta/~beta/' | sed 's/-rc/~rc/' | sed 's/-/+/') BUILD_DIR="$BUILD_PATH/$PACKAGE_NAME-$PACKAGE_VERSION-$ARCH" # ZEN_MOD_END @@ -59,14 +60,14 @@ cp $SRC_DEB/copyright $DEB_DOC cp -r $SRC_DEB/examples $DEB_DOC # Copy manpages # ZEN_MOD_START -cp $SRC_DOC/man/zcashd.1 $DEB_MAN/zend.1 -cp $SRC_DOC/man/zcash-cli.1 $DEB_MAN/zen-cli.1 -cp $SRC_DOC/man/zcash-fetch-params.1 $DEB_MAN/zen-fetch-params.1 +cp $SRC_DOC/man/zend.1 $DEB_MAN/zend.1 +cp $SRC_DOC/man/zen-cli.1 $DEB_MAN/zen-cli.1 +cp $SRC_DOC/man/zen-fetch-params.1 $DEB_MAN/zen-fetch-params.1 # ZEN_MOD_END # Copy bash completion files # ZEN_MOD_START -cp $SRC_PATH/contrib/zcashd.bash-completion $DEB_CMP/zend -cp $SRC_PATH/contrib/zcash-cli.bash-completion $DEB_CMP/zen-cli +cp $SRC_PATH/contrib/zend.bash-completion $DEB_CMP/zend +cp $SRC_PATH/contrib/zen-cli.bash-completion $DEB_CMP/zen-cli # ZEN_MOD_END # Gzip files gzip --best -n $DEB_DOC/changelog @@ -83,8 +84,8 @@ cd $SRC_PATH/contrib # Create the control file # ZEN_MOD_START dpkg-shlibdeps $DEB_BIN/zend $DEB_BIN/zen-cli -dpkg-gencontrol -v$PACKAGE_VERSION -P$BUILD_DIR # ZEN_MOD_END +dpkg-gencontrol -P$BUILD_DIR -v$DEBVERSION # Create the Debian package fakeroot dpkg-deb --build $BUILD_DIR