From d670db7164c9c49eb43f10b40efc2adaa473422f Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 25 May 2018 16:05:25 +1200 Subject: [PATCH] Sapling testnet activation height --- doc/release-notes/release-notes-1.1.1.md | 2 +- src/chainparams.cpp | 3 +-- src/net.cpp | 4 ++-- src/version.h | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/release-notes/release-notes-1.1.1.md b/doc/release-notes/release-notes-1.1.1.md index 8ac49880e..90adec943 100644 --- a/doc/release-notes/release-notes-1.1.1.md +++ b/doc/release-notes/release-notes-1.1.1.md @@ -12,7 +12,7 @@ RPC is ongoing, and is expected to land in master over the next few weeks. The [Sapling MPC](https://blog.z.cash/announcing-the-sapling-mpc/) is currently working on producing the final Sapling parameters. In the meantime, Sapling will -activate on testnet with dummy Sapling parameters at height XXXXXX. This +activate on testnet with dummy Sapling parameters at height 252500. This activation will be temporary, and the testnet will be rolled back by version 2.0.0 so that both mainnet and testnet will be using the same parameters. Users who want to continue testing Overwinter should continue to run version diff --git a/src/chainparams.cpp b/src/chainparams.cpp index d75231ce3..aaad51639 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -266,8 +266,7 @@ public: consensus.vUpgrades[Consensus::UPGRADE_OVERWINTER].nProtocolVersion = 170003; consensus.vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight = 207500; consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nProtocolVersion = 170006; - consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight = - Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT; + consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight = 252500; pchMessageStart[0] = 0xfa; pchMessageStart[1] = 0x1a; diff --git a/src/net.cpp b/src/net.cpp index 8db963008..1269c8c25 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -820,7 +820,7 @@ static bool AttemptToEvictConnection(bool fPreferNewConnection) { } const Consensus::Params& params = Params().GetConsensus(); - int nActivationHeight = params.vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight; + int nActivationHeight = params.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight; if (nActivationHeight > 0 && height < nActivationHeight && @@ -828,7 +828,7 @@ static bool AttemptToEvictConnection(bool fPreferNewConnection) { { // Find any nodes which don't support Overwinter protocol version BOOST_FOREACH(const CNodeRef &node, vEvictionCandidates) { - if (node->nVersion < params.vUpgrades[Consensus::UPGRADE_OVERWINTER].nProtocolVersion) { + if (node->nVersion < params.vUpgrades[Consensus::UPGRADE_SAPLING].nProtocolVersion) { vTmpEvictionCandidates.push_back(node); } } diff --git a/src/version.h b/src/version.h index bf8c518d8..cf3e1ea4a 100644 --- a/src/version.h +++ b/src/version.h @@ -9,7 +9,7 @@ * network protocol versioning */ -static const int PROTOCOL_VERSION = 170005; +static const int PROTOCOL_VERSION = 170006; //! initial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 209;