Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge v4.5.1-1 hotfix branch #5354

Merged
merged 23 commits into from Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
64ecf70
Add `listaddresses` RPC method.
nuttycom Oct 5, 2021
9a11ac7
Categorize listaddresses result by source type.
nuttycom Oct 6, 2021
a165733
Mark v5 transaction format as standard for NU5
str4d Oct 6, 2021
eb85b06
Fix comment
str4d Oct 6, 2021
6be880f
Correctly handle imported Sapling addresses
nuttycom Oct 7, 2021
33e449f
Apply suggestions from code review
nuttycom Oct 7, 2021
ee8a8e6
Merge pull request #5345 from str4d/nu5-standard-tx
daira Oct 7, 2021
f8350ce
Apply suggestions from code review
nuttycom Oct 7, 2021
6b1d290
Group legacy_hdseed Sapling addresses by account ID.
nuttycom Oct 7, 2021
7b40f87
Update release notes for v4.5.1-1 to reflect the addition of `listadd…
nuttycom Oct 7, 2021
9e83d28
Include `ImportedWatchOnly` as a PaymentAddressSource result.
nuttycom Oct 7, 2021
2221bf5
Add listaddresses check to wallet_addresses.py
nuttycom Oct 8, 2021
2350789
Consistently group Sapling addresses by IVK for every source.
nuttycom Oct 8, 2021
d867a8d
Use lowerCamelCase for listaddresses JSON
nuttycom Oct 8, 2021
59a75f9
Merge pull request #5343 from nuttycom/feature/listaddresses
str4d Oct 8, 2021
8f0f8b6
cargo update
str4d Oct 8, 2021
0263185
depends: Postpone dependency updates
str4d Oct 8, 2021
5860151
Merge pull request #5347 from str4d/dep-bumps-hotfix-v4.5.1-1
str4d Oct 8, 2021
a4419b5
make-release.py: Versioning changes for 4.5.1-1.
str4d Oct 8, 2021
3a20ade
make-release.py: Updated manpages for 4.5.1-1.
str4d Oct 8, 2021
e2abf34
make-release.py: Updated release notes and changelog for 4.5.1-1.
str4d Oct 8, 2021
d397f4e
Update v4.5.1-1 release notes with bugfix
str4d Oct 8, 2021
3ac39a5
Merge pull request #5349 from str4d/release-v4.5.1-1
str4d Oct 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 22 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
Zcash 4.5.1
Zcash 4.5.1-1
<img align="right" width="120" height="80" src="doc/imgs/logo.png">
===========

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 4)
define(_CLIENT_VERSION_MINOR, 5)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 50)
define(_CLIENT_VERSION_BUILD, 51)
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
@@ -1,3 +1,9 @@
zcash (4.5.1+1) stable; urgency=medium

* 4.5.1-1 release.

-- Electric Coin Company <team@electriccoin.co> Fri, 08 Oct 2021 17:03:31 +0000

zcash (4.5.1) stable; urgency=medium

* 4.5.1 release.
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-linux.yml
@@ -1,5 +1,5 @@
---
name: "zcash-4.5.1"
name: "zcash-4.5.1-1"
enable_cache: true
distro: "debian"
suites:
Expand Down
4 changes: 2 additions & 2 deletions doc/authors.md
@@ -1,12 +1,12 @@
Zcash Contributors
==================

Jack Grigg (1117)
Jack Grigg (1123)
Simon Liu (460)
Sean Bowe (367)
Daira Hopwood (270)
Eirik Ogilvie-Wigley (216)
Kris Nuttycombe (163)
Kris Nuttycombe (174)
Wladimir J. van der Laan (150)
Alfredo Garcia (116)
Taylor Hornby (114)
Expand Down
6 changes: 3 additions & 3 deletions doc/man/zcash-cli.1
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH ZCASH-CLI "1" "September 2021" "zcash-cli v4.5.1" "User Commands"
.TH ZCASH-CLI "1" "October 2021" "zcash-cli v4.5.1-1" "User Commands"
.SH NAME
zcash-cli \- manual page for zcash-cli v4.5.1
zcash-cli \- manual page for zcash-cli v4.5.1-1
.SH DESCRIPTION
Zcash RPC client version v4.5.1
Zcash RPC client version v4.5.1\-1
.PP
In order to ensure you are adequately protecting your privacy when using Zcash,
please see <https://z.cash/support/security/>.
Expand Down
6 changes: 3 additions & 3 deletions doc/man/zcash-tx.1
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH ZCASH-TX "1" "September 2021" "zcash-tx v4.5.1" "User Commands"
.TH ZCASH-TX "1" "October 2021" "zcash-tx v4.5.1-1" "User Commands"
.SH NAME
zcash-tx \- manual page for zcash-tx v4.5.1
zcash-tx \- manual page for zcash-tx v4.5.1-1
.SH DESCRIPTION
Zcash zcash\-tx utility version v4.5.1
Zcash zcash\-tx utility version v4.5.1\-1
.SS "Usage:"
.TP
zcash\-tx [options] <hex\-tx> [commands]
Expand Down
8 changes: 4 additions & 4 deletions doc/man/zcashd.1
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH ZCASHD "1" "September 2021" "zcashd v4.5.1" "User Commands"
.TH ZCASHD "1" "October 2021" "zcashd v4.5.1-1" "User Commands"
.SH NAME
zcashd \- manual page for zcashd v4.5.1
zcashd \- manual page for zcashd v4.5.1-1
.SH DESCRIPTION
Zcash Daemon version v4.5.1
Zcash Daemon version v4.5.1\-1
.PP
In order to ensure you are adequately protecting your privacy when using Zcash,
please see <https://z.cash/support/security/>.
Expand Down Expand Up @@ -84,7 +84,7 @@ Keep at most <n> unconnectable transactions in memory (default: 100)
.HP
\fB\-par=\fR<n>
.IP
Set the number of script verification threads (\fB\-6\fR to 16, 0 = auto, <0 =
Set the number of script verification threads (\fB\-16\fR to 16, 0 = auto, <0 =
leave that many cores free, default: 0)
.HP
\fB\-pid=\fR<file>
Expand Down
46 changes: 46 additions & 0 deletions doc/release-notes/release-notes-4.5.1-1.md
@@ -0,0 +1,46 @@
Notable changes
===============

Added v5 transactions to standard rules
---------------------------------------

In v4.5.0 we added the v5 transaction format to the NU5 consensus rules for
testnet. However, it was omitted from the standard rules, which meant that
`zcashd` testnet nodes would not accept v5 transactions into their mempools,
causing them to not be propagated or mined. This release updates the `zcashd`
standard rules to accept v5 transactions alongside v4 transactions.

New `listaddresses` RPC method
------------------------------

The `listaddresses` endpoint has been added to the RPC API. This method
allows the caller to obtain addresses managed by the wallet, grouped
by the source of the address, including both those addresses generated
by the wallet and those associated with imported viewing or spending
keys. This provides functionality that replaces and subsumes the
previously-removed `getaddressesbyaccount` method.

Changelog
=========

Jack Grigg (6):
Mark v5 transaction format as standard for NU5
Fix comment
cargo update
depends: Postpone dependency updates
make-release.py: Versioning changes for 4.5.1-1.
make-release.py: Updated manpages for 4.5.1-1.

Kris Nuttycombe (11):
Add `listaddresses` RPC method.
Categorize listaddresses result by source type.
Correctly handle imported Sapling addresses
Apply suggestions from code review
Apply suggestions from code review
Group legacy_hdseed Sapling addresses by account ID.
Update release notes for v4.5.1-1 to reflect the addition of `listaddresses`
Include `ImportedWatchOnly` as a PaymentAddressSource result.
Add listaddresses check to wallet_addresses.py
Consistently group Sapling addresses by IVK for every source.
Use lowerCamelCase for listaddresses JSON

9 changes: 9 additions & 0 deletions qa/rpc-tests/wallet_addresses.py
Expand Up @@ -27,6 +27,15 @@ def addr_checks(default_type):
assert_equal(res['type'], addr_type)
assert(addr in all_addresses)

listed_addresses = self.nodes[0].listaddresses()
legacy_random_src = next(src for src in listed_addresses if src['source'] == 'legacy_random')
legacy_hdseed_src = next(src for src in listed_addresses if src['source'] == 'legacy_hdseed')
for addr_type, addr in types_and_addresses:
if addr_type == 'sprout':
assert(addr in legacy_random_src['sprout']['addresses'])
if addr_type == 'sapling':
assert(addr in [x for obj in legacy_hdseed_src['sapling'] for x in obj['addresses']])

# Sanity-check the test harness
assert_equal(self.nodes[0].getblockcount(), 200)

Expand Down
22 changes: 12 additions & 10 deletions qa/zcash/postponed-updates.txt
Expand Up @@ -5,21 +5,23 @@
#

# Ccache 4.0 requires adding CMake to the depends system.
native_ccache 4.0 2021-10-01
native_ccache 4.1 2021-10-01
native_ccache 4.2 2021-10-01
native_ccache 4.2.1 2021-10-01
native_ccache 4.3 2021-10-01
native_ccache 4.4 2021-10-01
native_ccache 4.4.1 2021-10-01
native_ccache 4.4.2 2021-10-01
native_ccache 4.0 2021-11-01
native_ccache 4.1 2021-11-01
native_ccache 4.2 2021-11-01
native_ccache 4.2.1 2021-11-01
native_ccache 4.3 2021-11-01
native_ccache 4.4 2021-11-01
native_ccache 4.4.1 2021-11-01
native_ccache 4.4.2 2021-11-01

# Clang is currently pinned to LLVM 12
daira marked this conversation as resolved.
Show resolved Hide resolved
native_clang 13.0.0 2021-11-01
libcxx 13.0.0 2021-11-01

# Rust is currently pinned to 1.55.0

bdb 18.1.40 2022-02-01

# Google Test 1.10.0 requires adding CMake to the depends system.
googletest 1.10.0 2021-10-01
googletest 1.11.0 2021-10-01
googletest 1.10.0 2021-11-01
googletest 1.11.0 2021-11-01
2 changes: 1 addition & 1 deletion src/clientversion.h
Expand Up @@ -18,7 +18,7 @@
#define CLIENT_VERSION_MAJOR 4
#define CLIENT_VERSION_MINOR 5
#define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_BUILD 50
#define CLIENT_VERSION_BUILD 51

//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Expand Up @@ -1787,7 +1787,7 @@ bool AcceptToMemoryPool(
if (tx.IsCoinBase())
return state.DoS(100, false, REJECT_INVALID, "coinbase");

// Rather not work on nonstandard transactions (unless -testnet/-regtest)
// Rather not work on nonstandard transactions (unless -regtest)
string reason;
if (chainparams.RequireStandard() && !IsStandardTx(tx, reason, chainparams, nextBlockHeight))
return state.DoS(0, false, REJECT_NONSTANDARD, reason);
Expand Down
9 changes: 8 additions & 1 deletion src/policy/policy.cpp
Expand Up @@ -59,8 +59,15 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const CChainParam
{
bool overwinterActive = chainparams.GetConsensus().NetworkUpgradeActive(nHeight, Consensus::UPGRADE_OVERWINTER);
bool saplingActive = chainparams.GetConsensus().NetworkUpgradeActive(nHeight, Consensus::UPGRADE_SAPLING);
bool nu5Active = chainparams.GetConsensus().NetworkUpgradeActive(nHeight, Consensus::UPGRADE_NU5);

if (saplingActive) {
if (nu5Active) {
// NU5 standard rules apply
if (tx.nVersion > CTransaction::NU5_MAX_CURRENT_VERSION || tx.nVersion < CTransaction::NU5_MIN_CURRENT_VERSION) {
reason = "nu5-version";
return false;
}
} else if (saplingActive) {
// Sapling standard rules apply
if (tx.nVersion > CTransaction::SAPLING_MAX_CURRENT_VERSION || tx.nVersion < CTransaction::SAPLING_MIN_CURRENT_VERSION) {
reason = "sapling-version";
Expand Down
9 changes: 9 additions & 0 deletions src/primitives/transaction.h
Expand Up @@ -719,6 +719,8 @@ class CTransaction
static const int32_t OVERWINTER_MAX_CURRENT_VERSION = 3;
static const int32_t SAPLING_MIN_CURRENT_VERSION = 4;
static const int32_t SAPLING_MAX_CURRENT_VERSION = 4;
static const int32_t NU5_MIN_CURRENT_VERSION = 4;
static const int32_t NU5_MAX_CURRENT_VERSION = 5;

static_assert(SPROUT_MIN_CURRENT_VERSION >= SPROUT_MIN_TX_VERSION,
"standard rule for tx version should be consistent with network rule");
Expand All @@ -737,6 +739,13 @@ class CTransaction
SAPLING_MAX_CURRENT_VERSION >= SAPLING_MIN_CURRENT_VERSION),
"standard rule for tx version should be consistent with network rule");

static_assert(NU5_MIN_CURRENT_VERSION >= SAPLING_MIN_TX_VERSION,
"standard rule for tx version should be consistent with network rule");

static_assert( (NU5_MAX_CURRENT_VERSION <= ZIP225_MAX_TX_VERSION &&
NU5_MAX_CURRENT_VERSION >= NU5_MIN_CURRENT_VERSION),
"standard rule for tx version should be consistent with network rule");

// The local variables are made const to prevent unintended modification
// without updating the cached hash value. However, CTransaction is not
// actually immutable; deserialization and assignment are implemented,
Expand Down