Skip to content

Commit

Permalink
Release 2.0.5 (#59)
Browse files Browse the repository at this point in the history
* Backport size_on_disk to RPC call getblockchaininfo.

This commit is extracted from upstream PR:
bitcoin/bitcoin#11367

* Add size_on_disk test

Co-authored-by: Simon <simon@bitcartel.com>

* Rename methods to include Sprout

* Add benchmark for decrypting sapling notes

* Move reusable Sapling test setup to utiltest

* Move test SaplingNote creation to utiltest

* Add test method for generating master Sapling extended spending keys

* Include Sapling transactions in increment note witness benchmark

* Prevent header from being included multiple times

* benchmarks do not require updating network parameters

* FakeCoinsViewDB can inherit directly from CCoinsView

* Add a method for generating a test CKey

* Change to t->z transaction and create separate benchmark for sapling

* Renaming and other minor cleanup

* Improve some error messages when building a transaction fails

* redirect and update source documentation

* Update OpenSSL from 1.1.0h to 1.1.1a. #3786

* Update boost from v1.66.0 to v1.69.0. #3786

* Update Rust from v1.28.0 to v1.32.0. #3786

* Update Proton from 0.17.0 to 0.26.0. #3816, #3786

* Patch Proton for a minimal build. #3786

* Update of copyright year to 2019

* Add Sapling benchmarks to benchmark runner

* Add missing author aliases

* Correcting logo on README

* Simplify DisconnectBlock arguments/return value

DisconnectBlock currently has a complicated interface:

  Situation       Return value
                  pfClean != nullptr   pfClean == nullptr

  All good:       true                 true
  Failure:        false                false
  Unclean rewind: true                 false
                  with *pfClean=false

Change this to return a tristate enum instead. As an added bonus,
remove the ValidationState& argument which was unused.

* Add Sprout support to TransactionBuilder

* Split test in to multiple parts

* Use a custom error type if creating joinsplit descriptions fails

* detach wallet from miner

* fix GetScriptForMining() CReserveKey::keepKey() issue

* add CReserveScript to allow modular script keeping/returning

- use one CReserveScript per mining thread

* miner: rename UpdateRequestCount signal to ResetRequestCount

* test: Fetch coinbase address from coinbase UTXOs

After upstream PR bitcoin/bitcoin#5994, the first call to getnewaddress after
startup does not return the address being used by the miner.

* test: Make expected_utxos optional in get_coinbase_address()

* Add comments

* Move utiltest.cpp from wallet to common

This ensures it is accessible by the test suite when the wallet is
disabled.

* Move payment disclosure code and tests into wallet

The code was already compiled as part of the wallet, but the tests were
not, meaning that the tests would fail to compile when the wallet was
disabled.

* depends: Use full path to cargo binary

The native binaries generated in the depends system are available on the path,
but system binaries are still visible. This change ensures we use cargo from
the depends system rather than whatever might be installed locally.

* depends: Generalise the rust package cross-compilation functions

* depends: Add rust-std hash for aarch64-unknown-linux-gnu

Usage on Debian / Ubuntu:

> $ sudo apt install g++-aarch64-linux-gnu
> $ HOST=aarch64-linux-gnu ./zcutil/build.sh

Currently fails to cross-compile due to later configuration issues in
the depends system that need to be worked around.

* depends: Compile bdb with --disable-atomics on aarch64

This sidesteps the problem where the atomics check tries to run a test
binary, which cannot be performed during cross compilation. We should
replace this with a better solution in future.

Part of #3710.

* (testnet) Fall back to hardcoded shielded pool balance to avoid reorgs.

* (testnet) Reject blocks that result in turnstile violations

* depends: Update .gitignore

* configure: Guess -march for libsnark OPTFLAGS instead of hard-coding

When cross-compiling, this will remove the -march flag entirely unless
the user specifies CONFIGURE_FLAGS="--with-gcc-arch=<arch>".

* (testnet/regtest) Avoid mining transactions that would violate the turnstile.

* Update nMinimumChainWork using block 497000.

* Add checkpoint for block 497000.

* Fix tallying for Sprout/Sapling value pools.

* Consolidate logic to enable turnstile auditing for testnet/regtest/mainnet.

* Use existing chainparams variable

* Add newlines to turntile log messages for miner

* Check blockhash of fallback block for Sprout value pool balance

* Added documentation warnings about DNS rebinding attacks, issue #3841

* Added responsible disclosure statement for issue #3869

* Change SproutValuePoolCheckpointEnabled to ZIP209Activated

* Only enforce Sapling turnstile if balance values have been populated.

* Update COPYRIGHT_YEAR in clientversion.h to 2019

Update COPYRIGHT_YEAR in clientversion.h to 2019

* Do not enable ZIP209 on regtest right now.

* (minor) Remove added newline.

* Rename and update comment

* (wallet) Check that the commitment matches the note plaintext provided by the sender.

* Update release notes for 2.0.4

Co-authored-by: Jack Grigg <jack@z.cash>

* Electric Coin Company

* Minor speling changes

* make-release.py: Versioning changes for 2.0.4-rc1.

* make-release.py: Updated manpages for 2.0.4-rc1.

* make-release.py: Updated release notes and changelog for 2.0.4-rc1.

* Fix typo in release notes.

* Update _COPYRIGHT_YEAR in configure.ac to 2019

Update _COPYRIGHT_YEAR in configure.ac to 2019

* fix enable-debug build DB_COINS undefined

* Fix proton patch regression. #3916

* Fix OpenSSL reproducible build regression

* Patch out proton::url deprecation as workaround for build warnings

* make-release.py: Versioning changes for 2.0.4.

* make-release.py: Updated manpages for 2.0.4.

* make-release.py: Updated release notes and changelog for 2.0.4.

* Update company name.

* add -addressindex changes for bitcore insight block explorer

* tests: adds unit test for IsPayToPublicKeyHash method

* Add Blossom to upgrade list

* init: Fix new HD seed generation for previously-encrypted wallets

Closes #3607.

* Creates checklist template for new PRs being opened and addresses Str4d's suggestion for using GitHub handles

* Adding addressindex.h to Makefile.am

Co-authored by: Daira Hopwood <daira@jacaranda.org>

* Add testnet and regtest experimental feature: -developersetpoolsizezero

* add -spentindex changes for bitcore insight block explorer

* Update boost from v1.69.0 to v1.70.0. #3947

* Add qa test for experimental feature: -developersetpoolsizezero

* Enable ZIP209 on mainnet and set fallback Sprout pool balance.

* Enable experimental feature -developersetpoolsizezero on mainnet.

* Add rpc to enable and disable Sprout to Sapling migration

* Move migration logic to ChainTip

* Documentation cleanup

* Additional locking and race condition prevention

* Refactor wait_and_assert_operationid_status to allow returning the result

* Set min depth when selecting notes to migrate

* add -timestampindex for bitcore insight block explorer

* Check for full failure message in test case

* Add migration options to conf file

Co-authored-by: Simon <simon@bitcartel.com>

* remove extra hyphen

Co-Authored-By: Eirik0 <eirik@z.cash>

* Create method for getting HD seed in RPCs

* Add rpc to get Sprout to Sapling migration status

* Fix help message

* Test migration using both the parameter and the default Sapling address

* Fix typos and update documentation

* use -valueBalance rather than vpub_new to calculate migrated amount

* Do not look at vin/vout when determining migration txs and other cleanup

* Calculate the number of confimations in the canonical way

* Do not throw an exception if HD Seed is not found when exporting wallet

* 3873 z_setmigration cli bool enable arg conversion

* make-release.py: Versioning changes for 2.0.5-rc1.

* make-release.py: Updated manpages for 2.0.5-rc1.

* make-release.py: Updated release notes and changelog for 2.0.5-rc1.

* add curl to package list for gitian lxc container

* Update chain work and checkpoint using block 525000.

* Notable changes for v2.0.5

* Add missing word to release notes

* make-release.py: Versioning changes for 2.0.5.

* make-release.py: Updated manpages for 2.0.5.

* make-release.py: Updated release notes and changelog for 2.0.5.

* Correctly account for migration transactions in the mempool

Co-authored-by: LarryRuane <larry@z.cash>

* Store the migration operation id rather than the operation iteslf

* Rename variable and add comment

* Notable changes for v2.0.5-1

* Fix summing available funds

* Add the amount migrated to the operation's result

* coinsView is required when using TransactionBuilder if there may be Sprout change

* make-release.py: Versioning changes for 2.0.5-1.

* make-release.py: Updated manpages for 2.0.5-1.

* make-release.py: Updated release notes and changelog for 2.0.5-1.

* Remove unused specifier from format string.

The extra specifier meant that a runtime error would be thrown
during Sprout to Sapling migration if `zrpcunsafe` logging
was enabled:
"tinyformat: Too many conversion specifiers in format string"

* Don't allow migration when node is syncing at launch or after waking up.

* Generalize TransactionBuilder and CreateNewContextualCMutableTransaction to allow choosing the expiry delta.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>

* Repair calls to TransactionBuilder from tests.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>

* Change expiry delta for migration transactions to 450 blocks.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>

* Test the expiry height of migration transactions.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>

* Fix cosmetic spacing issue in z_setmigration help.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>

* Do not automatically remove async migration operations and return txids

* Add logging for Sprout to Sapling migration transaction generation

* Fix LogPrint statements

* Notable changes for v2.0.5-2

* Release notes wording and punctuation

* make-release.py: Versioning changes for 2.0.5-2.

* make-release.py: Updated manpages for 2.0.5-2.

* make-release.py: Updated release notes and changelog for 2.0.5-2.

* Update ZIP reference

* Set BitcoinZ version to 2.0.5

* Fixed merge bug

Let's use the chainparams passed into the function rather than the
static class instance.

* Support to reduce future block time window to 5 mins

Check timestamp is within the allowed 5 minute window to help decrease
effectiveness of timewarp attacks

* Added reorg protection

This commit implements some basic reorg protection by implementing
a rolling 10 block checkpoint. This limits the number of blocks that
a miner can mine in secret to a maximum of 10.

* Don't require flag to enable reorg projection

* Add disablereorgprotection flag

Use the -disablereorgprotection flag to disable reorg protection.

* Add checkpoints

* Zeuz Fingerz release to go live on block 364400

* ignore shutdown process when reorg > 100 blocks

* Set rolling checkpoint height to 6 blocks

* Set minimum protocol version to 77007
  • Loading branch information
renuzit committed May 31, 2019
1 parent 4503235 commit e864cba
Show file tree
Hide file tree
Showing 129 changed files with 5,422 additions and 1,899 deletions.
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
@@ -0,0 +1,5 @@
Please ensure this checklist is followed for any pull requests for this repo. This checklist must be checked by both the PR creator and by anyone who reviews the PR.
* [ ] Relevant documentation for this PR has to be completed and reviewed by the documentation team (@ioptio, @mdr0id, or @Eirik0) before the PR can be merged
* [ ] A test plan for the PR must be documented in the PR notes and included in the test plan for the next regular release

As a note, all buildbot tests need to be passing and all appropriate code reviews need to be done before this PR can be merged
6 changes: 3 additions & 3 deletions COPYING
@@ -1,6 +1,6 @@
Copyright (c) 2016-2018 The Zcash developers
Copyright (c) 2009-2018 The Bitcoin Core developers
Copyright (c) 2009-2018 Bitcoin Developers
Copyright (c) 2016-2019 The Zcash developers
Copyright (c) 2009-2019 The Bitcoin Core developers
Copyright (c) 2009-2019 Bitcoin Developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 1 addition & 2 deletions README.md
@@ -1,4 +1,3 @@
=======
# BitcoinZ
**Keep running wallet to strengthen the BitcoinZ network. Backup your wallet in many locations & keep your coins wallet offline.**

Expand All @@ -10,7 +9,7 @@ Install
-----------------
### Linux

### [Quick guide for beginners](https://github.com/bitcoinz-pod/bitcoinz/wiki/Quick-guide-for-beginners)
### [Quick guide for beginners](https://github.com/btcz/bitcoinz/wiki/Quick-guide-for-beginners)

Install required dependencies:
```{r, engine='bash'}
Expand Down
117 changes: 117 additions & 0 deletions build-aux/m4/ax_compiler_vendor.m4
@@ -0,0 +1,117 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_COMPILER_VENDOR
#
# DESCRIPTION
#
# Determine the vendor of the C, C++ or Fortran compiler. The vendor is
# returned in the cache variable $ax_cv_c_compiler_vendor for C,
# $ax_cv_cxx_compiler_vendor for C++ or $ax_cv_fc_compiler_vendor for
# (modern) Fortran. The value is one of "intel", "ibm", "pathscale",
# "clang" (LLVM), "cray", "fujitsu", "sdcc", "sx", "portland" (PGI), "gnu"
# (GCC), "sun" (Oracle Developer Studio), "hp", "dec", "borland",
# "comeau", "kai", "lcc", "sgi", "microsoft", "metrowerks", "watcom",
# "tcc" (Tiny CC) or "unknown" (if the compiler cannot be determined).
#
# To check for a Fortran compiler, you must first call AC_FC_PP_SRCEXT
# with an appropriate preprocessor-enabled extension. For example:
#
# AC_LANG_PUSH([Fortran])
# AC_PROG_FC
# AC_FC_PP_SRCEXT([F])
# AX_COMPILER_VENDOR
# AC_LANG_POP([Fortran])
#
# LICENSE
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2008 Matteo Frigo
# Copyright (c) 2018-19 John Zaitseff <J.Zaitseff@zap.org.au>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.

#serial 30

AC_DEFUN([AX_COMPILER_VENDOR], [dnl
AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor, [dnl
dnl If you modify this list of vendors, please add similar support
dnl to ax_compiler_version.m4 if at all possible.
dnl
dnl Note: Do NOT check for GCC first since some other compilers
dnl define __GNUC__ to remain compatible with it. Compilers that
dnl are very slow to start (such as Intel) are listed first.
vendors="
intel: __ICC,__ECC,__INTEL_COMPILER
ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__,__ibmxl__
pathscale: __PATHCC__,__PATHSCALE__
clang: __clang__
cray: _CRAYC
fujitsu: __FUJITSU
sdcc: SDCC,__SDCC
sx: _SX
portland: __PGI
gnu: __GNUC__
sun: __SUNPRO_C,__SUNPRO_CC,__SUNPRO_F90,__SUNPRO_F95
hp: __HP_cc,__HP_aCC
dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
borland: __BORLANDC__,__CODEGEARC__,__TURBOC__
comeau: __COMO__
kai: __KCC
lcc: __LCC__
sgi: __sgi,sgi
microsoft: _MSC_VER
metrowerks: __MWERKS__
watcom: __WATCOMC__
tcc: __TINYC__
unknown: UNKNOWN
"
for ventest in $vendors; do
case $ventest in
*:)
vendor=$ventest
continue
;;
*)
vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")"
;;
esac
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
#if !($vencpp)
thisisanerror;
#endif
]])], [break])
done
ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1`
])
])dnl

0 comments on commit e864cba

Please sign in to comment.