Skip to content

Commit

Permalink
Merge pull request zcash#6730 from zcash/hotfix-5.6.1
Browse files Browse the repository at this point in the history
Back-merge of hotfix-5.6.1
  • Loading branch information
str4d committed Jun 22, 2023
2 parents 638abce + a8141ee commit 57c8385
Show file tree
Hide file tree
Showing 39 changed files with 338 additions and 149 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Zcash 5.6.0
Zcash 5.6.1
<img align="right" width="120" height="80" src="doc/imgs/logo.png">
===========

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 5)
define(_CLIENT_VERSION_MINOR, 6)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_REVISION, 1)
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)))
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 @@
zcash (5.6.1) stable; urgency=medium

* 5.6.1 release.

-- Electric Coin Company <team@electriccoin.co> Wed, 21 Jun 2023 14:41:09 -0600

zcash (5.6.0) stable; urgency=medium

* 5.6.0 release.
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-linux-parallel.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "zcash-5.6.0"
name: "zcash-5.6.1"
enable_cache: true
distro: "debian"
suites:
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: "zcash-5.6.0"
name: "zcash-5.6.1"
enable_cache: true
distro: "debian"
suites:
Expand Down
4 changes: 2 additions & 2 deletions doc/authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ Zcash Contributors
==================

Jack Grigg (1335)
Kris Nuttycombe (685)
Kris Nuttycombe (698)
Simon Liu (460)
Sean Bowe (403)
Sean Bowe (404)
Daira Hopwood (396)
Eirik Ogilvie-Wigley (216)
Greg Pfeil (208)
Expand Down
1 change: 1 addition & 0 deletions doc/book/src/user/release-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ time, and may shift due to changes in network solution power.
| 5.5.1 | 2023-05-16 | 2217487 | 2023-09-05 |
| 5.6.0-rc1 | 2023-06-08 | 2243024 | 2023-09-28 |
| 5.6.0 | 2023-06-14 | 2250924 | 2023-10-04 |
| 5.6.1 | 2023-06-21 | 2258800 | 2023-10-11 |
<!-- RELEASE_SCRIPT_END_MARKER -->
6 changes: 3 additions & 3 deletions doc/man/zcash-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.49.1.
.TH ZCASH-CLI "1" "June 2023" "zcash-cli v5.6.0" "User Commands"
.TH ZCASH-CLI "1" "June 2023" "zcash-cli v5.6.1" "User Commands"
.SH NAME
zcash-cli \- manual page for zcash-cli v5.6.0
zcash-cli \- manual page for zcash-cli v5.6.1
.SH DESCRIPTION
Zcash RPC client version v5.6.0
Zcash RPC client version v5.6.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
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.49.1.
.TH ZCASH-TX "1" "June 2023" "zcash-tx v5.6.0" "User Commands"
.TH ZCASH-TX "1" "June 2023" "zcash-tx v5.6.1" "User Commands"
.SH NAME
zcash-tx \- manual page for zcash-tx v5.6.0
zcash-tx \- manual page for zcash-tx v5.6.1
.SH DESCRIPTION
Zcash zcash\-tx utility version v5.6.0
Zcash zcash\-tx utility version v5.6.1
.SS "Usage:"
.TP
zcash\-tx [options] <hex\-tx> [commands]
Expand Down
4 changes: 2 additions & 2 deletions doc/man/zcashd-wallet-tool.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH ZCASHD-WALLET-TOOL "1" "June 2023" "zcashd-wallet-tool v5.6.0" "User Commands"
.TH ZCASHD-WALLET-TOOL "1" "June 2023" "zcashd-wallet-tool v5.6.1" "User Commands"
.SH NAME
zcashd-wallet-tool \- manual page for zcashd-wallet-tool v5.6.0
zcashd-wallet-tool \- manual page for zcashd-wallet-tool v5.6.1
.SH SYNOPSIS
.B zcashd-wallet-tool
[\fI\,OPTIONS\/\fR]
Expand Down
6 changes: 3 additions & 3 deletions doc/man/zcashd.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.49.1.
.TH ZCASHD "1" "June 2023" "zcashd v5.6.0" "User Commands"
.TH ZCASHD "1" "June 2023" "zcashd v5.6.1" "User Commands"
.SH NAME
zcashd \- manual page for zcashd v5.6.0
zcashd \- manual page for zcashd v5.6.1
.SH DESCRIPTION
Zcash Daemon version v5.6.0
Zcash Daemon version v5.6.1
.PP
In order to ensure you are adequately protecting your privacy when using Zcash,
please see <https://z.cash/support/security/>.
Expand Down
38 changes: 38 additions & 0 deletions doc/release-notes/release-notes-5.6.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Notable changes
===============

Fixes
-----

Fixes an issue introduced in v5.6.0 that could cause loss of data from the
wallet's Orchard note commitment tree. Users upgrading directly from v5.5.0
should upgrade directly to v5.6.1. Wallets that were previously upgraded to
v5.6.0 whose wallets contained unspent Orchard notes at the time of the upgrade
will be automatically re-scanned on startup to repair the corrupted note
commitment tree.

Also, the `height` parameter to the `getblocksubsidy` RPC call had accidentally
been made required instead of optional as part of the v5.5.0 upgrade. This
hotfix restores `height` to being treated as an optional parameter.

Changelog
=========

Kris Nuttycombe (13):
Add `getblocksubsidy` checks to `nuparams` test.
Restore `height` parameter to being optional in `getblocksubsidy` RPC.
Re-create serialized v5.5.0 Orchard wallet state.
Remove -regtestwalletsetbestchaineveryblock after golden state generation.
Enable mining to Orchard on regtest
Add persistent example of corrupted Orchard wallet state post v5.6.0
Update wallet_golden_5_6_0 test to fail due to Orchard wallet parsing errors.
Add a test demonstrating inability to spend from the tarnished state.
Fix Orchard bridgetree parsing.
Trigger a rescan on wallet load if spend information is missing from the wallet.
Update changelog & postpone updates for v5.6.1 hotfix.
make-release.py: Versioning changes for 5.6.1.
make-release.py: Updated manpages for 5.6.1.

Sean Bowe (1):
Add sapling.h and rpc/common.h to makefile sources.

1 change: 1 addition & 0 deletions qa/pull-tester/rpc-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
'wallet_listnotes.py',
'wallet_listunspent.py',
'wallet_golden_5_6_0.py',
'wallet_tarnished_5_6_0.py',
# vv Tests less than 60s vv
'orchard_reorg.py',
'fundrawtransaction.py',
Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/cache/golden-v5.6.0/cache_config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"cache_time": 1685221175.7769258
"cache_time": 1687296923.7459898
}
Binary file modified qa/rpc-tests/cache/golden-v5.6.0/chain_cache.tar.gz
Binary file not shown.
Binary file modified qa/rpc-tests/cache/golden-v5.6.0/node0_wallet.tar.gz
Binary file not shown.
Binary file modified qa/rpc-tests/cache/golden-v5.6.0/node1_wallet.tar.gz
Binary file not shown.
Binary file modified qa/rpc-tests/cache/golden-v5.6.0/node2_wallet.tar.gz
Binary file not shown.
Binary file modified qa/rpc-tests/cache/golden-v5.6.0/node3_wallet.tar.gz
Binary file not shown.
3 changes: 3 additions & 0 deletions qa/rpc-tests/cache/tarnished-v5.6.0/cache_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cache_time": 1687307359.731706
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
61 changes: 41 additions & 20 deletions qa/rpc-tests/nuparams.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
CANOPY_BRANCH_ID,
NU5_BRANCH_ID,
)
from decimal import Decimal


class NuparamsTest(BitcoinTestFramework):
Expand All @@ -31,8 +32,9 @@ def __init__(self):

def setup_network(self, split=False):
args = [[
nuparams(HEARTWOOD_BRANCH_ID, 3),
nuparams(NU5_BRANCH_ID, 5),
nuparams(BLOSSOM_BRANCH_ID, 3),
nuparams(CANOPY_BRANCH_ID, 5),
nuparams(NU5_BRANCH_ID, 7),
] * self.num_nodes]
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, args)
self.is_network_split = False
Expand Down Expand Up @@ -62,7 +64,7 @@ def run_test(self):

heartwood = upgrades[nustr(HEARTWOOD_BRANCH_ID)]
assert_equal(heartwood['name'], 'Heartwood')
assert_equal(heartwood['activationheight'], 3)
assert_equal(heartwood['activationheight'], 5)
assert_equal(heartwood['status'], 'pending')

canopy = upgrades[nustr(CANOPY_BRANCH_ID)]
Expand All @@ -72,12 +74,15 @@ def run_test(self):

nu5 = upgrades[nustr(NU5_BRANCH_ID)]
assert_equal(nu5['name'], 'NU5')
assert_equal(nu5['activationheight'], 5)
assert_equal(nu5['activationheight'], 7)
assert_equal(nu5['status'], 'pending')

# Initial subsidy at the genesis block is 12.5 ZEC
assert_equal(node.getblocksubsidy()["miner"], Decimal("12.5"))

# start_node() hardcodes Sapling and Overwinter to activate at height 1
node.generate(1)

# start_node() hardcodes Sapling and Overwinter to activate a height 1
bci = node.getblockchaininfo()
assert_equal(bci['blocks'], 1)
upgrades = bci['upgrades']
Expand All @@ -99,7 +104,7 @@ def run_test(self):

heartwood = upgrades[nustr(HEARTWOOD_BRANCH_ID)]
assert_equal(heartwood['name'], 'Heartwood')
assert_equal(heartwood['activationheight'], 3)
assert_equal(heartwood['activationheight'], 5)
assert_equal(heartwood['status'], 'pending')

canopy = upgrades[nustr(CANOPY_BRANCH_ID)]
Expand All @@ -109,12 +114,17 @@ def run_test(self):

nu5 = upgrades[nustr(NU5_BRANCH_ID)]
assert_equal(nu5['name'], 'NU5')
assert_equal(nu5['activationheight'], 5)
assert_equal(nu5['activationheight'], 7)
assert_equal(nu5['status'], 'pending')

node.generate(1)
# After the genesis block the founders' reward consumes 20% of the block
# subsidy, so the miner subsidy is 10 ZEC
assert_equal(node.getblocksubsidy()["miner"], Decimal("10"))

# Activate Blossom
node.generate(2)
bci = node.getblockchaininfo()
assert_equal(bci['blocks'], 2)
assert_equal(bci['blocks'], 3)
upgrades = bci['upgrades']

overwinter = upgrades[nustr(OVERWINTER_BRANCH_ID)]
Expand All @@ -130,11 +140,11 @@ def run_test(self):
blossom = upgrades[nustr(BLOSSOM_BRANCH_ID)]
assert_equal(blossom['name'], 'Blossom')
assert_equal(blossom['activationheight'], 3)
assert_equal(blossom['status'], 'pending')
assert_equal(blossom['status'], 'active')

heartwood = upgrades[nustr(HEARTWOOD_BRANCH_ID)]
assert_equal(heartwood['name'], 'Heartwood')
assert_equal(heartwood['activationheight'], 3)
assert_equal(heartwood['activationheight'], 5)
assert_equal(heartwood['status'], 'pending')

canopy = upgrades[nustr(CANOPY_BRANCH_ID)]
Expand All @@ -144,12 +154,16 @@ def run_test(self):

nu5 = upgrades[nustr(NU5_BRANCH_ID)]
assert_equal(nu5['name'], 'NU5')
assert_equal(nu5['activationheight'], 5)
assert_equal(nu5['activationheight'], 7)
assert_equal(nu5['status'], 'pending')

# Block subsidy halves at Blossom due to block time halving
assert_equal(node.getblocksubsidy()["miner"], Decimal("5"))

# Activate Heartwood & Canopy
node.generate(2)
bci = node.getblockchaininfo()
assert_equal(bci['blocks'], 4)
assert_equal(bci['blocks'], 5)
upgrades = bci['upgrades']

overwinter = upgrades[nustr(OVERWINTER_BRANCH_ID)]
Expand All @@ -169,22 +183,27 @@ def run_test(self):

heartwood = upgrades[nustr(HEARTWOOD_BRANCH_ID)]
assert_equal(heartwood['name'], 'Heartwood')
assert_equal(heartwood['activationheight'], 3)
assert_equal(heartwood['activationheight'], 5)
assert_equal(heartwood['status'], 'active')

canopy = upgrades[nustr(CANOPY_BRANCH_ID)]
assert_equal(canopy['name'], 'Canopy')
assert_equal(canopy['activationheight'], 5)
assert_equal(canopy['status'], 'pending')
assert_equal(canopy['status'], 'active')

nu5 = upgrades[nustr(NU5_BRANCH_ID)]
assert_equal(nu5['name'], 'NU5')
assert_equal(nu5['activationheight'], 5)
assert_equal(nu5['activationheight'], 7)
assert_equal(nu5['status'], 'pending')

node.generate(1)
# The founders' reward ends at Canopy and there are no funding streams
# configured by default for regtest. On mainnet, the halving activated
# coincident with Canopy, but on regtest the two are independent.
assert_equal(node.getblocksubsidy()["miner"], Decimal("6.25"))

node.generate(2)
bci = node.getblockchaininfo()
assert_equal(bci['blocks'], 5)
assert_equal(bci['blocks'], 7)
upgrades = bci['upgrades']

overwinter = upgrades[nustr(OVERWINTER_BRANCH_ID)]
Expand All @@ -204,7 +223,7 @@ def run_test(self):

heartwood = upgrades[nustr(HEARTWOOD_BRANCH_ID)]
assert_equal(heartwood['name'], 'Heartwood')
assert_equal(heartwood['activationheight'], 3)
assert_equal(heartwood['activationheight'], 5)
assert_equal(heartwood['status'], 'active')

canopy = upgrades[nustr(CANOPY_BRANCH_ID)]
Expand All @@ -214,9 +233,11 @@ def run_test(self):

nu5 = upgrades[nustr(NU5_BRANCH_ID)]
assert_equal(nu5['name'], 'NU5')
assert_equal(nu5['activationheight'], 5)
assert_equal(nu5['activationheight'], 7)
assert_equal(nu5['status'], 'active')

# Block subsidy remains the same after NU5
assert_equal(node.getblocksubsidy()["miner"], Decimal("6.25"))

if __name__ == '__main__':
NuparamsTest().main()
Loading

0 comments on commit 57c8385

Please sign in to comment.