Skip to content

Commit

Permalink
Merge pull request #101 from MarkLTZ/2.0.9-release
Browse files Browse the repository at this point in the history
Release v2.0.9
  • Loading branch information
MarkLTZ authored Aug 18, 2024
2 parents b0ee4cd + 19b51de commit 18ccb8f
Show file tree
Hide file tree
Showing 12 changed files with 175 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# BitcoinZ 2.0.9-rc2
# BitcoinZ 2.0.9
**Keep running wallet to strengthen the BitcoinZ network. Backup your wallet in many locations & keep your coins wallet offline.**

### Ports:
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 2)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 9)
define(_CLIENT_VERSION_BUILD, 26)
define(_CLIENT_VERSION_BUILD, 50)
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)
Expand Down
6 changes: 6 additions & 0 deletions contrib/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
bitcoinz (2.0.9) stable; urgency=medium

* 2.0.9 release.

-- The BitcoinZ Community <[email protected]> Aug 2024

bitcoinz (2.0.9-rc2) stable; urgency=medium

* 2.0.9-rc2 release.
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "bitcoinz-2.0.9-rc2"
name: "bitcoinz-2.0.9"
enable_cache: true
distro: "debian"
suites:
Expand Down
12 changes: 6 additions & 6 deletions contrib/gitian-descriptors/gitian-osx.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "bitcoin-osx-0.11"
name: "bitcoinz-osx-2.0.9"
enable_cache: true
suites:
- "trusty"
Expand All @@ -21,8 +21,8 @@ packages:
- "ca-certificates"
- "python"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
- "url": "https://github.com/btcz/bitcoinz.git"
"dir": "bitcoinz"
files:
- "Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz"
script: |
Expand Down Expand Up @@ -76,7 +76,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 bitcoinz
BASEPREFIX=`pwd`/depends
mkdir -p ${BASEPREFIX}/SDKs
Expand All @@ -95,14 +95,14 @@ 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 bitcoinz-*.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 bitcoinz-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
popd
ORIGPATH="$PATH"
Expand Down
14 changes: 7 additions & 7 deletions contrib/gitian-descriptors/gitian-win.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "bitcoin-win-0.11"
name: "bitcoinz-win-2.0.9"
enable_cache: true
suites:
- "trusty"
Expand All @@ -21,8 +21,8 @@ packages:
- "ca-certificates"
- "python"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
- "url": "https://github.com/btcz/bitcoinz.git"
"dir": "bitcoinz"
files: []
script: |
WRAP_DIR=$HOME/wrapped
Expand Down Expand Up @@ -100,7 +100,7 @@ script: |
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
create_per-host_linker_wrapper "2000-01-01 12:00:00"
cd bitcoin
cd bitcoinz
BASEPREFIX=`pwd`/depends
# Build dependencies for each host
for i in $HOSTS; do
Expand All @@ -116,14 +116,14 @@ 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 bitcoinz-*.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 bitcoinz-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
mkdir -p $OUTDIR/src
cp ../$SOURCEDIST $OUTDIR/src
popd
Expand All @@ -143,7 +143,7 @@ script: |
make ${MAKEOPTS} -C src check-security
make deploy
make install DESTDIR=${INSTALLPATH}
cp -f bitcoin-*setup*.exe $OUTDIR/
cp -f bitcoinz-*setup*.exe $OUTDIR/
cd installed
mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
find . -name "lib*.la" -delete
Expand Down
6 changes: 3 additions & 3 deletions doc/man/bitcoinz-cli.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH BITCOINZ-CLI "1" "July 2024" "bitcoinz-cli v2.0.9-rc2" "User Commands"
.TH BITCOINZ-CLI "1" "August 2024" "bitcoinz-cli v2.0.9" "User Commands"
.SH NAME
bitcoinz-cli \- manual page for bitcoinz-cli v2.0.9-rc2
bitcoinz-cli \- manual page for bitcoinz-cli v2.0.9
.SH DESCRIPTION
BitcoinZ RPC client version v2.0.9\-rc2
BitcoinZ RPC client version v2.0.9
.PP
In order to ensure you are adequately protecting your privacy when using
BitcoinZ, please see <https://z.cash/support/security/index.html>.
Expand Down
6 changes: 3 additions & 3 deletions doc/man/bitcoinz-tx.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH BITCOINZ-TX "1" "July 2024" "bitcoinz-tx v2.0.9-rc2" "User Commands"
.TH BITCOINZ-TX "1" "August 2024" "bitcoinz-tx v2.0.9" "User Commands"
.SH NAME
bitcoinz-tx \- manual page for bitcoinz-tx v2.0.9-rc2
bitcoinz-tx \- manual page for bitcoinz-tx v2.0.9
.SH DESCRIPTION
BitcoinZ bitcoinz\-tx utility version v2.0.9\-rc2
BitcoinZ bitcoinz\-tx utility version v2.0.9
.SS "Usage:"
.TP
bitcoinz\-tx [options] <hex\-tx> [commands]
Expand Down
6 changes: 3 additions & 3 deletions doc/man/bitcoinzd.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH BITCOINZD "1" "July 2024" "bitcoinzd v2.0.9-rc2" "User Commands"
.TH BITCOINZD "1" "August 2024" "bitcoinzd v2.0.9" "User Commands"
.SH NAME
bitcoinzd \- manual page for bitcoinzd v2.0.9-rc2
bitcoinzd \- manual page for bitcoinzd v2.0.9
.SH DESCRIPTION
BitcoinZ Daemon version v2.0.9\-rc2
BitcoinZ Daemon version v2.0.9
.PP
In order to ensure you are adequately protecting your privacy when using
BitcoinZ, please see <https://z.cash/support/security/>.
Expand Down
2 changes: 1 addition & 1 deletion doc/man/zcash-fetch-params.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH ZCASH-FETCH-PARAMS "1" "July 2024" "Zcash - zcash-fetch-params" "User Commands"
.TH ZCASH-FETCH-PARAMS "1" "August 2024" "Zcash - zcash-fetch-params" "User Commands"
.SH NAME
zcash-fetch-params \- Downloads the Zcash network parameters
.SH DESCRIPTION
Expand Down
142 changes: 142 additions & 0 deletions doc/release-notes/release-notes-2.0.9-rc2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
Notable changes
===============

DoS Mitigation: Mempool Size Limit and Random Drop
--------------------------------------------------

This release adds a mechanism for preventing nodes from running out of memory
in the situation where an attacker is trying to overwhelm the network with
transactions. This is achieved by keeping track of and limiting the total
`cost` and `evictionWeight` of all transactions in the mempool. The `cost` of a
transaction is determined by its size in bytes, and its `evictionWeight` is a
function of the transaction's `cost` and its fee. The maximum total cost is
configurable via the parameter `mempooltxcostlimit` which defaults to
80,000,000 (up to 20,000 txs). If a node's total mempool `cost` exceeds this
limit the node will evict a random transaction, preferentially picking larger
transactions and ones with below the standard fee. To prevent a node from
re-accepting evicted transactions, it keeps track of ones that it has evicted
recently. By default, a transaction will be considered recently evicted for 60
minutes, but this can be configured with the parameter
`mempoolevictionmemoryminutes`.

For full details see ZIP 401.

Asynchronous Operations Incorrectly Reporting Success
-----------------------------------------------------
We fixed an issue where asynchronous operations were sometimes reporting sucess
when they had actually failed. One way this could occur was when trying to use
`z_sendmany` to create a transaction spending coinbase funds in a way where
change would be generated (not a valid use of `z_sendmany`). In this case the
operation would erroneously report success, and the only way to see that the
transaction had actually failed was to look in the `debug.log` file. Such
operations will now correctly report that they have failed.

Fake chain detection during initial block download
--------------------------------------------------

One of the mechanisms that `bitcoinzd` uses to detect whether it is in "initial
block download" (IBD) mode is to compare the active chain's cumulative work
against a hard-coded "minimum chain work" value. This mechanism (inherited from
Bitcoin Core) means that once a node exits IBD mode, it is either on the main
chain, or a fake alternate chain with similar amounts of work. In the latter
case, the node has most likely become the victim of a 50% + 1 adversary.

Starting from this release, `bitcoinzd` additionally hard-codes the block hashes
for the activation blocks of each past network upgrade (NU). During initial
chain synchronization, and after the active chain has reached "minimum chain
work", the node checks the blocks at each NU activation height against the
hard-coded hashes. If any of them do not match, the node will immediately alert
the user and **shut down for safety**.

Disabling old Sprout proofs
---------------------------

As part of our ongoing work to clean up the codebase and minimise the security
surface of `bitcoinzd`, we are removing `libsnark` from the codebase, and dropping
support for creating and verifying old Sprout proofs. Funds stored in Sprout
addresses are not affected, as they are spent using the hybrid Sprout circuit
(built using `bellman`) that was deployed during the Sapling network upgrade.

This change has several implications:

- `bitcoinzd` no longer verifies old Sprout proofs, and will instead assume they
are valid. This has a minor implication for nodes: during initial block
download, an adversary could feed the node fake blocks containing invalid old
Sprout proofs, and the node would accept the fake chain as valid. However,
as soon as the active chain contains at least as much work as the hard-coded
"minimum chain work" value, the node will detect this situation and shut down.

- Shielded transactions can no longer be created before Sapling has activated.
This does not affect BitcoinZ itself, but will affect downstream codebases that
have not yet activated Sapling (or that start a new chain after this point and
do not activate Sapling from launch). Note that the old Sprout circuit is
[vulnerable to counterfeiting](https://z.cash/support/security/announcements/security-announcement-2019-02-05-cve-2019-7167/)
and should not be used in current deployments.

- Starting from this release, the circuit parameters from the original Sprout
MPC are no longer required to start `bitcoinzd`, and will not be downloaded by
`fetch-params.sh`. They are not being automatically deleted at this time.

Option parsing behavior
-----------------------

Command line options are now parsed strictly in the order in which they are
specified. It used to be the case that `-X -noX` ends up, unintuitively, with X
set, as `-X` had precedence over `-noX`. This is no longer the case. Like for
other software, the last specified value for an option will hold.

Low-level RPC changes
---------------------

- Bare multisig outputs to our keys are no longer automatically treated as
incoming payments. As this feature was only available for multisig outputs for
which you had all private keys in your wallet, there was generally no use for
them compared to single-key schemes. Furthermore, no address format for such
outputs is defined, and wallet software can't easily send to it. These outputs
will no longer show up in `listtransactions`, `listunspent`, or contribute to
your balance, unless they are explicitly watched (using `importaddress` or
`importmulti` with hex script argument). `signrawtransaction*` also still
works for them.

View shielded information in wallet transactions
------------------------------------------------

In previous `bitcoinzd` versions, to obtain information about shielded transactions
you would use either the `z_listreceivedbyaddress` RPC method (which returns all
notes received by an address) or `z_listunspent` (which returns unspent notes,
optionally filtered by addresses). There were no RPC methods that directly
returned details about spends, or anything equivalent to the `gettransaction`
method (which returns transparent information about in-wallet transactions).

This release introduces a new RPC method `z_viewtransaction` to fill that gap.
Given the ID of a transaction in the wallet, it decrypts the transaction and
returns detailed shielded information for all decryptable new and spent notes,
including:

- The address that each note belongs to.
- Values in both decimal ZEC and zatoshis.
- The ID of the transaction that each spent note was received in.
- An `outgoing` flag on each new note, which will be `true` if the output is not
for an address in the wallet.
- A `memoStr` field for each new note, containing its text memo (if its memo
field contains a valid UTF-8 string).

Information will be shown for any address that appears in `z_listaddresses`;
this includes watch-only addresses linked to viewing keys imported with
`z_importviewingkey`, as well as addresses with spending keys (both generated
with `z_getnewaddress` and imported with `z_importkey`).

Build system
------------

- The `--enable-lcov`, `--disable-tests`, and `--disable-mining` flags for
`zcutil/build.sh` have been removed. You can pass these flags instead by using
the `CONFIGURE_FLAGS` environment variable. For example, to enable coverage
instrumentation (thus enabling "make cov" to work), call:

```
CONFIGURE_FLAGS="--enable-lcov --disable-hardening" ./zcutil/build.sh
```

- The build system no longer defaults to verbose output. You can re-enable
verbose output with `./zcutil/build.sh V=1`
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 9
#define CLIENT_VERSION_BUILD 26
#define CLIENT_VERSION_BUILD 50

//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down

0 comments on commit 18ccb8f

Please sign in to comment.