Skip to content

Commit

Permalink
Merge pull request #235 from BTCPrivate/diffbomb-removal
Browse files Browse the repository at this point in the history
Diffbomb removal
  • Loading branch information
interbiznw authored Sep 17, 2019
2 parents 7266d7a + ad4f3e3 commit f247a95
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017-2018 The Bitcoin Private developers
Copyright (c) 2017-2019 The Bitcoin Private developers
Copyright (c) 2016-2017 The Zclassic developers
Copyright (c) 2016-2017 The Zcash developers
Copyright (c) 2009-2017 The Bitcoin Core developers
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Bitcoin Private
----------------

**Bitcoin Private v1.0.13**
**Bitcoin Private v1.0.14**

P2P Port: 7933

Expand Down
4 changes: 2 additions & 2 deletions btcputil/fetch-params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ fi

SPROUT_PKEY_NAME='sprout-proving.key'
SPROUT_VKEY_NAME='sprout-verifying.key'
SPROUT_PKEY_URL="https://storage.googleapis.com/btcp-sprout-key/$SPROUT_PKEY_NAME"
SPROUT_VKEY_URL="https://storage.googleapis.com/btcp-sprout-key/$SPROUT_VKEY_NAME"
SPROUT_PKEY_URL="https://params.btcprivate.org/$SPROUT_PKEY_NAME"
SPROUT_VKEY_URL="https://params.btcprivate.org/$SPROUT_VKEY_NAME"

SHA256CMD="$(command -v sha256sum || echo shasum)"
SHA256ARGS="$(command -v sha256sum >/dev/null || echo '-a 256')"
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, 1)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 13)
define(_CLIENT_VERSION_REVISION, 14)
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
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: "BTCP-1.0.13"
name: "BTCP-1.0.14"
enable_cache: true
distro: "debian"
suites:
Expand Down
5 changes: 5 additions & 0 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ class CMainParams : public CChainParams {
consensus.nPowMaxAdjustUp = 16; // 16% adjustment up
consensus.nPowTargetSpacing = 2.5 * 60;
consensus.fPowAllowMinDifficultyBlocks = false;

consensus.nPowDifficultyBombHeight = 600000;
consensus.nHeightDiffBombRemoved = 599999;

consensus.nRuleChangeActivationThreshold = 1916; // 95% of 2016
consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing
Expand Down Expand Up @@ -183,6 +185,7 @@ class CTestNetParams : public CMainParams {
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008

consensus.nPowDifficultyBombHeight = 600000;
consensus.nHeightDiffBombRemoved = 599999;

consensus.nUnmovedBurnHeight = 480000;
consensus.zResetHeight = 455500;
Expand Down Expand Up @@ -272,6 +275,8 @@ class CRegTestParams : public CTestNetParams {
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 999999999999ULL;

consensus.nPowDifficultyBombHeight = 600000;
consensus.nHeightDiffBombRemoved = 599999;

consensus.nUnmovedBurnHeight = 480000;
consensus.zResetHeight = 455500;

Expand Down
4 changes: 2 additions & 2 deletions src/clientversion.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2016-2017 The Zcash developers
// Copyright (c) 2016-2017 The Zclassic developers
// Copyright (c) 2017-2018 The Bitcoin Private developers
// Copyright (c) 2017-2019 The Bitcoin Private developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand All @@ -19,7 +19,7 @@
//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 13
#define CLIENT_VERSION_REVISION 14
#define CLIENT_VERSION_BUILD 50

//! Set to true for release, false for prerelease or test build
Expand Down
1 change: 1 addition & 0 deletions src/consensus/params.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ struct Params {
int64_t nPowTargetSpacing;

int nPowDifficultyBombHeight;
int nHeightDiffBombRemoved;
int nUnmovedBurnHeight;
int zResetHeight;

Expand Down
6 changes: 1 addition & 5 deletions src/pow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
proofOfWorkLimit = UintToArith256(params.powLimit);

unsigned int nProofOfWorkLimit = proofOfWorkLimit.GetCompact();
unsigned int nProofOfWorkBomb = UintToArith256(uint256S("000000000000000000000000000000000000000000000000000000000000ffff")).GetCompact();

// Genesis block
if (pindexLast == NULL)
Expand All @@ -45,10 +44,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
// right post fork
else if(!isForkBlock(nHeight) && isForkBlock(nHeight - params.nPowAveragingWindow))
return nProofOfWorkLimit;

// difficulty bomb
else if(pindexLast->nHeight > params.nPowDifficultyBombHeight)
return nProofOfWorkBomb;


// Find the first block in the averaging interval
const CBlockIndex* pindexFirst = pindexLast;
Expand Down
4 changes: 2 additions & 2 deletions src/sendalert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ void ThreadSendAlert()

// These versions are protocol versions
// 170002 : 1.0.0
alert.nMinVer = 170002;
alert.nMaxVer = 180004;
alert.nMinVer = 170005;
alert.nMaxVer = 180005;

//
// main.cpp:
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* network protocol versioning
*/

static const int PROTOCOL_VERSION = 180004;
static const int PROTOCOL_VERSION = 180005;

//! initial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
Expand All @@ -18,7 +18,7 @@ static const int INIT_PROTO_VERSION = 209;
static const int GETHEADERS_VERSION = 31800;

//! disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION = 180003;
static const int MIN_PEER_PROTO_VERSION = 180005;

//! nTime field added to CAddress, starting with this version;
//! if possible, avoid requesting addresses nodes older than this
Expand Down

0 comments on commit f247a95

Please sign in to comment.