Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

Commit

Permalink
Merge tag '1.4.0' of https://github.com/btcz/bitcoinz
Browse files Browse the repository at this point in the history
  • Loading branch information
renuzit committed Jun 15, 2018
2 parents edc7fd4 + 0b774f3 commit e698d4c
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 21 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 3)
define(_CLIENT_VERSION_MINOR, 4)
define(_CLIENT_VERSION_REVISION, 0)
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: 3 additions & 3 deletions contrib/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bitcoinz (1.3.0) stable; urgency=medium
bitcoinz (1.4.0) stable; urgency=high

* 1.3.0 release.
* 1.4.0 release.

-- The BitcoinZ Community <[email protected]> Sat, 10 June 2018 00:15:00 +0100
-- The BitcoinZ Community <[email protected]> Fri, 15 June 2018 00:15:00 +0100
2 changes: 1 addition & 1 deletion contrib/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Vcs-Git: https://github.com/btcz/bitcoinz.git
Vcs-Browser: https://github.com/btcz

Package: bitcoinz
Version: 1.3.0
Version: 1.4.0
Depends: ${shlibs:Depends}
Architecture: all
Description: BitcoinZ is a decentralized community project based on the Bitcoin and Zcash codebase.
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: "bitcoinz-1.3.0"
name: "bitcoinz-1.4.0"
enable_cache: true
distro: "debian"
suites:
Expand Down
6 changes: 3 additions & 3 deletions doc/man/bitcoinz-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.47.3.
.TH BITCOINZ-CLI "1" "June 2018" "bitcoinz-cli v1.3.0" "User Commands"
.TH BITCOINZ-CLI "1" "June 2018" "bitcoinz-cli v1.4.0" "User Commands"
.SH NAME
bitcoinz-cli \- manual page for bitcoinz-cli v1.3.0
bitcoinz-cli \- manual page for bitcoinz-cli v1.4.0
.SH DESCRIPTION
BitcoinZ RPC client version v1.3.0
BitcoinZ RPC client version v1.4.0
.PP
In order to ensure you are adequately protecting your privacy when using
BitcoinZ, please see <https://z.cash/support/security/index.html>.
Expand Down
6 changes: 3 additions & 3 deletions doc/man/bitcoinz-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.47.3.
.TH BITCOINZ-TX "1" "June 2018" "bitcoinz-tx v1.3.0" "User Commands"
.TH BITCOINZ-TX "1" "June 2018" "bitcoinz-tx v1.4.0" "User Commands"
.SH NAME
bitcoinz-tx \- manual page for bitcoinz-tx v1.3.0
bitcoinz-tx \- manual page for bitcoinz-tx v1.4.0
.SH DESCRIPTION
BitcoinZ bitcoinz\-tx utility version v1.3.0
BitcoinZ bitcoinz\-tx utility version v1.4.0
.SS "Usage:"
.TP
bitcoinz\-tx [options] <hex\-tx> [commands]
Expand Down
6 changes: 3 additions & 3 deletions doc/man/bitcoinzd.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.47.3.
.TH BITCOINZD "1" "June 2018" "bitcoinzd v1.3.0" "User Commands"
.TH BITCOINZD "1" "June 2018" "bitcoinzd v1.4.0" "User Commands"
.SH NAME
bitcoinzd \- manual page for bitcoinzd v1.3.0
bitcoinzd \- manual page for bitcoinzd v1.4.0
.SH DESCRIPTION
BitcoinZ Daemon version v1.3.0
BitcoinZ Daemon version v1.4.0
.PP
In order to ensure you are adequately protecting your privacy when using
BitcoinZ, please see <https://z.cash/support/security/>.
Expand Down
1 change: 1 addition & 0 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class CMainParams : public CChainParams {
nDefaultPort = 1989;
nMaxTipAge = 24 * 60 * 60;
nPruneAfterHeight = 100000;
newTimeRule = 159300;
eh_epoch_1 = eh200_9;
eh_epoch_2 = eh144_5;
eh_epoch_1_endblock = 160010;
Expand Down
2 changes: 2 additions & 0 deletions src/chainparams.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class CChainParams
std::string GetFoundersRewardAddressAtIndex(int i) const;
/** Enforce coinbase consensus rule in regtest mode */
void SetRegTestCoinbaseMustBeProtected() { consensus.fCoinbaseMustBeProtected = true; }
int GetNewTimeRule() const { return newTimeRule; }
protected:
CChainParams() {}

Expand Down Expand Up @@ -129,6 +130,7 @@ class CChainParams
bool fTestnetToBeDeprecatedFieldRPC = false;
Checkpoints::CCheckpointData checkpointData;
std::vector<std::string> vFoundersRewardAddress;
int newTimeRule;
};

/**
Expand Down
4 changes: 2 additions & 2 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

//! 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 3
#define CLIENT_VERSION_MINOR 4
#define CLIENT_VERSION_REVISION 0
#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
12 changes: 10 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3002,8 +3002,16 @@ bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool f
return state.DoS(50, error("CheckBlockHeader(): proof of work failed"),
REJECT_INVALID, "high-hash");

// Check timestamp
if (block.GetBlockTime() > GetAdjustedTime() + 2 * 60 * 60)
unsigned int nHeight = chainActive.Height();
const CChainParams& chainParams = Params();

// Check timestamp (old)
if (nHeight < chainParams.GetNewTimeRule() && block.GetBlockTime() > GetAdjustedTime() + 2 * 60 * 60)
return state.Invalid(error("CheckBlockHeader(): block timestamp too far in the future"),
REJECT_INVALID, "time-too-new");

// starting at height 159300, decrease to 30 minute window to decrease effectiveness of timewarp attack.
else if (nHeight >= chainParams.GetNewTimeRule() && block.GetBlockTime() > GetAdjustedTime() + 30 * 60)
return state.Invalid(error("CheckBlockHeader(): block timestamp too far in the future"),
REJECT_INVALID, "time-too-new");

Expand Down
2 changes: 1 addition & 1 deletion 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 = 770004;
static const int PROTOCOL_VERSION = 770005;

//! initial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
Expand Down

0 comments on commit e698d4c

Please sign in to comment.