Auto merge of #4501 - zcash:hotfix-v2.1.2-1, r=ebfull
Merge in hotfix v2.1.2-1 This PR brings our `v2.1.2-1` hotfix into master. **Please don't try/r+ this yet.**
This commit is contained in:
commit
38885ee9a8
|
@ -1,4 +1,4 @@
|
||||||
Zcash 2.1.2
|
Zcash 2.1.2-1
|
||||||
<img align="right" width="120" height="80" src="doc/imgs/logo.png">
|
<img align="right" width="120" height="80" src="doc/imgs/logo.png">
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ AC_PREREQ([2.60])
|
||||||
define(_CLIENT_VERSION_MAJOR, 2)
|
define(_CLIENT_VERSION_MAJOR, 2)
|
||||||
define(_CLIENT_VERSION_MINOR, 1)
|
define(_CLIENT_VERSION_MINOR, 1)
|
||||||
define(_CLIENT_VERSION_REVISION, 2)
|
define(_CLIENT_VERSION_REVISION, 2)
|
||||||
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(_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_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(_CLIENT_VERSION_IS_RELEASE, true)
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
zcash (2.1.2+1) stable; urgency=medium
|
||||||
|
|
||||||
|
* 2.1.2-1 release.
|
||||||
|
|
||||||
|
-- Electric Coin Company <team@electriccoin.co> Wed, 06 May 2020 10:52:57 -0600
|
||||||
|
|
||||||
zcash (2.1.2) stable; urgency=medium
|
zcash (2.1.2) stable; urgency=medium
|
||||||
|
|
||||||
* 2.1.2 release.
|
* 2.1.2 release.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
name: "zcash-2.1.2"
|
name: "zcash-2.1.2-1"
|
||||||
enable_cache: true
|
enable_cache: true
|
||||||
distro: "debian"
|
distro: "debian"
|
||||||
suites:
|
suites:
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
Zcash Contributors
|
Zcash Contributors
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Jack Grigg (1020)
|
Jack Grigg (1021)
|
||||||
Simon Liu (460)
|
Simon Liu (460)
|
||||||
Sean Bowe (306)
|
Sean Bowe (310)
|
||||||
Eirik Ogilvie-Wigley (214)
|
Eirik Ogilvie-Wigley (214)
|
||||||
Daira Hopwood (180)
|
Daira Hopwood (180)
|
||||||
Taylor Hornby (99)
|
Taylor Hornby (99)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||||
.TH ZCASH-CLI "1" "April 2020" "zcash-cli v2.1.2" "User Commands"
|
.TH ZCASH-CLI "1" "May 2020" "zcash-cli v2.1.2-1" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
zcash-cli \- manual page for zcash-cli v2.1.2
|
zcash-cli \- manual page for zcash-cli v2.1.2-1
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Zcash RPC client version v2.1.2
|
Zcash RPC client version v2.1.2\-1
|
||||||
.PP
|
.PP
|
||||||
In order to ensure you are adequately protecting your privacy when using Zcash,
|
In order to ensure you are adequately protecting your privacy when using Zcash,
|
||||||
please see <https://z.cash/support/security/>.
|
please see <https://z.cash/support/security/>.
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||||
.TH ZCASH-TX "1" "April 2020" "zcash-tx v2.1.2" "User Commands"
|
.TH ZCASH-TX "1" "May 2020" "zcash-tx v2.1.2-1" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
zcash-tx \- manual page for zcash-tx v2.1.2
|
zcash-tx \- manual page for zcash-tx v2.1.2-1
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Zcash zcash\-tx utility version v2.1.2
|
Zcash zcash\-tx utility version v2.1.2\-1
|
||||||
.SS "Usage:"
|
.SS "Usage:"
|
||||||
.TP
|
.TP
|
||||||
zcash\-tx [options] <hex\-tx> [commands]
|
zcash\-tx [options] <hex\-tx> [commands]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||||
.TH ZCASHD "1" "April 2020" "zcashd v2.1.2" "User Commands"
|
.TH ZCASHD "1" "May 2020" "zcashd v2.1.2-1" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
zcashd \- manual page for zcashd v2.1.2
|
zcashd \- manual page for zcashd v2.1.2-1
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Zcash Daemon version v2.1.2
|
Zcash Daemon version v2.1.2\-1
|
||||||
.PP
|
.PP
|
||||||
In order to ensure you are adequately protecting your privacy when using Zcash,
|
In order to ensure you are adequately protecting your privacy when using Zcash,
|
||||||
please see <https://z.cash/support/security/>.
|
please see <https://z.cash/support/security/>.
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
Notable changes
|
||||||
|
===============
|
||||||
|
|
||||||
|
This release fixes two issues that were identified by the Heartwood activation on testnet.
|
||||||
|
|
||||||
|
* v2.1.2 nodes that followed the Heartwood activation on testnet would crash on restart if, prior to shutdown, they had received a block from a miner that had not activated Heartwood, which is very likely. This release fixes that crash.
|
||||||
|
* Nodes that had not followed the Heartwood activation on testnet (by running a version prior to v2.1.2) but then tried to upgrade to v2.1.2 would have difficulty rolling back. In this release we have ensured that nodes will now roll back if necessary to follow the Heartwood activation on testnet.
|
||||||
|
|
||||||
|
Changelog
|
||||||
|
=========
|
||||||
|
|
||||||
|
Jack Grigg (1):
|
||||||
|
txdb/chain: Restrict Heartwood chain consistency check to block index objects that were created by Heartwood-unaware clients.
|
||||||
|
|
||||||
|
Sean Bowe (4):
|
||||||
|
Add the intended testnet activation block of Heartwood to our intended rewind logic.
|
||||||
|
Don't throw exception in PopHistoryNode when popping from empty tree.
|
||||||
|
make-release.py: Versioning changes for 2.1.2-1.
|
||||||
|
make-release.py: Updated manpages for 2.1.2-1.
|
||||||
|
|
|
@ -435,6 +435,12 @@ class CDiskBlockIndex : public CBlockIndex
|
||||||
public:
|
public:
|
||||||
uint256 hashPrev;
|
uint256 hashPrev;
|
||||||
|
|
||||||
|
// This is the serialized `nVersion` of the block index, which is only set
|
||||||
|
// after the (de)serialization routine is called. This should only be used
|
||||||
|
// in LoadBlockIndexGuts (which is the only place where we read block index
|
||||||
|
// objects from disk anyway).
|
||||||
|
int nClientVersion = 0;
|
||||||
|
|
||||||
CDiskBlockIndex() {
|
CDiskBlockIndex() {
|
||||||
hashPrev = uint256();
|
hashPrev = uint256();
|
||||||
}
|
}
|
||||||
|
@ -450,6 +456,7 @@ public:
|
||||||
int nVersion = s.GetVersion();
|
int nVersion = s.GetVersion();
|
||||||
if (!(s.GetType() & SER_GETHASH))
|
if (!(s.GetType() & SER_GETHASH))
|
||||||
READWRITE(VARINT(nVersion));
|
READWRITE(VARINT(nVersion));
|
||||||
|
nClientVersion = nVersion;
|
||||||
|
|
||||||
READWRITE(VARINT(nHeight));
|
READWRITE(VARINT(nHeight));
|
||||||
READWRITE(VARINT(nStatus));
|
READWRITE(VARINT(nStatus));
|
||||||
|
|
|
@ -325,6 +325,8 @@ public:
|
||||||
uint256S("00367515ef2e781b8c9358b443b6329572599edd02c59e8af67db9785122f298");
|
uint256S("00367515ef2e781b8c9358b443b6329572599edd02c59e8af67db9785122f298");
|
||||||
consensus.vUpgrades[Consensus::UPGRADE_HEARTWOOD].nProtocolVersion = 170010;
|
consensus.vUpgrades[Consensus::UPGRADE_HEARTWOOD].nProtocolVersion = 170010;
|
||||||
consensus.vUpgrades[Consensus::UPGRADE_HEARTWOOD].nActivationHeight = 903800;
|
consensus.vUpgrades[Consensus::UPGRADE_HEARTWOOD].nActivationHeight = 903800;
|
||||||
|
consensus.vUpgrades[Consensus::UPGRADE_HEARTWOOD].hashActivationBlock =
|
||||||
|
uint256S("05688d8a0e9ff7c04f6f05e6d695dc5ab43b9c4803342d77ae360b2b27d2468e");
|
||||||
consensus.vUpgrades[Consensus::UPGRADE_NU4].nProtocolVersion = 170012;
|
consensus.vUpgrades[Consensus::UPGRADE_NU4].nProtocolVersion = 170012;
|
||||||
consensus.vUpgrades[Consensus::UPGRADE_NU4].nActivationHeight =
|
consensus.vUpgrades[Consensus::UPGRADE_NU4].nActivationHeight =
|
||||||
Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT;
|
Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#define CLIENT_VERSION_MAJOR 2
|
#define CLIENT_VERSION_MAJOR 2
|
||||||
#define CLIENT_VERSION_MINOR 1
|
#define CLIENT_VERSION_MINOR 1
|
||||||
#define CLIENT_VERSION_REVISION 2
|
#define CLIENT_VERSION_REVISION 2
|
||||||
#define CLIENT_VERSION_BUILD 50
|
#define CLIENT_VERSION_BUILD 51
|
||||||
|
|
||||||
//! Set to true for release, false for prerelease or test build
|
//! Set to true for release, false for prerelease or test build
|
||||||
#define CLIENT_VERSION_IS_RELEASE true
|
#define CLIENT_VERSION_IS_RELEASE true
|
||||||
|
|
|
@ -506,9 +506,17 @@ void CCoinsViewCache::PopHistoryNode(uint32_t epochId) {
|
||||||
|
|
||||||
switch (historyCache.length) {
|
switch (historyCache.length) {
|
||||||
case 0:
|
case 0:
|
||||||
// Caller is not expected to pop from empty tree! Caller should
|
// Caller is generally not expected to pop from empty tree! Caller
|
||||||
// switch to previous epoch and pop history from there.
|
// should switch to previous epoch and pop history from there.
|
||||||
throw std::runtime_error("popping history node from empty history");
|
|
||||||
|
// If we are doing an expected rollback that changes the consensus
|
||||||
|
// branch ID for some upgrade (or introduces one that wasn't present
|
||||||
|
// at the equivalent height) this will occur because
|
||||||
|
// `SelectHistoryCache` selects the tree for the new consensus
|
||||||
|
// branch ID, not the one that existed on the chain being rolled
|
||||||
|
// back.
|
||||||
|
|
||||||
|
// Sensible action is to truncate the history cache:
|
||||||
case 1:
|
case 1:
|
||||||
// Just resetting tree to empty
|
// Just resetting tree to empty
|
||||||
historyCache.Truncate(0);
|
historyCache.Truncate(0);
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// Deprecation policy:
|
// Deprecation policy:
|
||||||
// * Shut down 16 weeks' worth of blocks after the estimated release block height.
|
// * Shut down 16 weeks' worth of blocks after the estimated release block height.
|
||||||
// * A warning is shown during the 2 weeks' worth of blocks prior to shut down.
|
// * A warning is shown during the 2 weeks' worth of blocks prior to shut down.
|
||||||
static const int APPROX_RELEASE_HEIGHT = 805837;
|
static const int APPROX_RELEASE_HEIGHT = 821903;
|
||||||
static const int WEEKS_UNTIL_DEPRECATION = 16;
|
static const int WEEKS_UNTIL_DEPRECATION = 16;
|
||||||
static const int DEPRECATION_HEIGHT = APPROX_RELEASE_HEIGHT + (WEEKS_UNTIL_DEPRECATION * 7 * 24 * 48);
|
static const int DEPRECATION_HEIGHT = APPROX_RELEASE_HEIGHT + (WEEKS_UNTIL_DEPRECATION * 7 * 24 * 48);
|
||||||
|
|
||||||
|
|
|
@ -4777,7 +4777,9 @@ bool RewindBlockIndex(const CChainParams& chainparams, bool& clearWitnessCaches)
|
||||||
(networkID == "test" && nHeight == 252500 && *phashFirstInsufValidated ==
|
(networkID == "test" && nHeight == 252500 && *phashFirstInsufValidated ==
|
||||||
uint256S("0018bd16a9c6f15795a754c498d2b2083ab78f14dae44a66a8d0e90ba8464d9c")) ||
|
uint256S("0018bd16a9c6f15795a754c498d2b2083ab78f14dae44a66a8d0e90ba8464d9c")) ||
|
||||||
(networkID == "test" && nHeight == 584000 && *phashFirstInsufValidated ==
|
(networkID == "test" && nHeight == 584000 && *phashFirstInsufValidated ==
|
||||||
uint256S("002e1d6daf4ab7b296e7df839dc1bee9d615583bb4bc34b1926ce78307532852"));
|
uint256S("002e1d6daf4ab7b296e7df839dc1bee9d615583bb4bc34b1926ce78307532852")) ||
|
||||||
|
(networkID == "test" && nHeight == 903800 && *phashFirstInsufValidated ==
|
||||||
|
uint256S("0044f3c696a242220ed608c70beba5aa804f1cfb8a20e32186727d1bec5dfa1e"));
|
||||||
|
|
||||||
clearWitnessCaches = (rewindLength > MAX_REORG_LENGTH && intendedRewind);
|
clearWitnessCaches = (rewindLength > MAX_REORG_LENGTH && intendedRewind);
|
||||||
if (clearWitnessCaches) {
|
if (clearWitnessCaches) {
|
||||||
|
|
10
src/txdb.cpp
10
src/txdb.cpp
|
@ -566,11 +566,15 @@ bool CBlockTreeDB::LoadBlockIndexGuts(
|
||||||
return error("LoadBlockIndex(): CheckProofOfWork failed: %s", pindexNew->ToString());
|
return error("LoadBlockIndex(): CheckProofOfWork failed: %s", pindexNew->ToString());
|
||||||
|
|
||||||
// ZIP 221 consistency checks
|
// ZIP 221 consistency checks
|
||||||
if (chainParams.GetConsensus().NetworkUpgradeActive(pindexNew->nHeight, Consensus::UPGRADE_HEARTWOOD)) {
|
// We assume block index objects on disk that are not at least
|
||||||
|
// CHAIN_HISTORY_ROOT_VERSION were created by nodes that were
|
||||||
|
// not Heartwood aware.
|
||||||
|
if (diskindex.nClientVersion >= CHAIN_HISTORY_ROOT_VERSION &&
|
||||||
|
chainParams.GetConsensus().NetworkUpgradeActive(pindexNew->nHeight, Consensus::UPGRADE_HEARTWOOD)) {
|
||||||
if (pindexNew->hashLightClientRoot != pindexNew->hashChainHistoryRoot) {
|
if (pindexNew->hashLightClientRoot != pindexNew->hashChainHistoryRoot) {
|
||||||
return error(
|
return error(
|
||||||
"LoadBlockIndex(): block index inconsistency detected (hashLightClientRoot != hashChainHistoryRoot): %s",
|
"LoadBlockIndex(): block index inconsistency detected (hashLightClientRoot %s != hashChainHistoryRoot %s): %s",
|
||||||
pindexNew->ToString());
|
pindexNew->hashLightClientRoot.ToString(), pindexNew->hashChainHistoryRoot.ToString(), pindexNew->ToString());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pindexNew->hashLightClientRoot != pindexNew->hashFinalSaplingRoot) {
|
if (pindexNew->hashLightClientRoot != pindexNew->hashFinalSaplingRoot) {
|
||||||
|
|
Loading…
Reference in New Issue