From 08b95aa3e32a745dc091e66b792db48f2c7adbf2 Mon Sep 17 00:00:00 2001 From: Remapper Date: Tue, 9 Jun 2020 21:38:20 +0100 Subject: [PATCH] 1.3.1.0 --- Makefile.in | 3 +-- configure | 24 ++++++++++++------------ configure.ac | 4 ++-- share/genbuild.sh | 2 +- src/Makefile.in | 1 + src/chainparams.cpp | 2 +- src/main.cpp | 13 ++++++++++++- src/spork.cpp | 1 + src/sporkid.h | 1 + src/version.h | 4 ++-- 10 files changed, 34 insertions(+), 21 deletions(-) diff --git a/Makefile.in b/Makefile.in index b3c29a5181962..aba467cd4514a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -240,8 +240,7 @@ am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/test/util/bitcoin-util-test.py \ $(top_srcdir)/test/util/rpcauth-test.py COPYING INSTALL \ build-aux/compile build-aux/config.guess build-aux/config.sub \ - build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \ - build-aux/missing + build-aux/install-sh build-aux/ltmain.sh build-aux/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) diff --git a/configure b/configure index 0bd7b3bebe49d..327613ce3a714 100644 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Sap 1.3.0. +# Generated by GNU Autoconf 2.69 for Sap 1.3.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Sap' PACKAGE_TARNAME='sap' -PACKAGE_VERSION='1.3.0' -PACKAGE_STRING='Sap 1.3.0' +PACKAGE_VERSION='1.3.1' +PACKAGE_STRING='Sap 1.3.1' PACKAGE_BUGREPORT='https://github.com/SapOfficial/Sap/issues' PACKAGE_URL='https://www.sapnetwork.io/' @@ -1665,7 +1665,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Sap 1.3.0 to adapt to many kinds of systems. +\`configure' configures Sap 1.3.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1736,7 +1736,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Sap 1.3.0:";; + short | recursive ) echo "Configuration of Sap 1.3.1:";; esac cat <<\_ACEOF @@ -2052,7 +2052,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Sap configure 1.3.0 +Sap configure 1.3.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2826,7 +2826,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Sap $as_me 1.3.0, which was +It was created by Sap $as_me 1.3.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3782,7 +3782,7 @@ fi # Define the identity of the package. PACKAGE='sap' - VERSION='1.3.0' + VERSION='1.3.1' # Some tools Automake needs. @@ -33641,7 +33641,7 @@ $as_echo "#define CLIENT_VERSION_MAJOR 1" >>confdefs.h $as_echo "#define CLIENT_VERSION_MINOR 3" >>confdefs.h -$as_echo "#define CLIENT_VERSION_REVISION 0" >>confdefs.h +$as_echo "#define CLIENT_VERSION_REVISION 1" >>confdefs.h $as_echo "#define CLIENT_VERSION_BUILD 0" >>confdefs.h @@ -33656,7 +33656,7 @@ CLIENT_VERSION_MAJOR=1 CLIENT_VERSION_MINOR=3 -CLIENT_VERSION_REVISION=0 +CLIENT_VERSION_REVISION=1 CLIENT_VERSION_BUILD=0 @@ -34405,7 +34405,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Sap $as_me 1.3.0, which was +This file was extended by Sap $as_me 1.3.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -34476,7 +34476,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Sap config.status 1.3.0 +Sap config.status 1.3.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 73b771ca6a5c7..cd88ff5fd3fca 100644 --- a/configure.ac +++ b/configure.ac @@ -2,8 +2,8 @@ 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_REVISION, 0) -define(_CLIENT_VERSION_BUILD, 1) +define(_CLIENT_VERSION_REVISION, 1) +define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2020) diff --git a/share/genbuild.sh b/share/genbuild.sh index 519cc6e8f13fb..9dff5cbbff855 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -37,7 +37,7 @@ if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" -a -e "$(which git 2>/dev/null)" -a "$( # otherwise generate suffix from git, i.e. string like "59887e8-dirty" SUFFIX=$(git rev-parse --short HEAD) - git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty" + git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-release" # get a string like "2012-04-10 16:27:19 +0200" LAST_COMMIT_DATE="$(git log -n 1 --format="%ci")" diff --git a/src/Makefile.in b/src/Makefile.in index 6136415815276..a3f5e9c31cba4 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -2739,6 +2739,7 @@ EXTRA_DIST = @ENABLE_QT_TRUE@QT_TS = \ @ENABLE_QT_TRUE@ qt/locale/pivx_en.ts + # pivx qt core # @ENABLE_QT_TRUE@QT_FORMS_UI = \ @ENABLE_QT_TRUE@ qt/forms/addressbookpage.ui \ diff --git a/src/chainparams.cpp b/src/chainparams.cpp index f41491e089e5b..bdfdec535a171 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -180,7 +180,7 @@ class CMainParams : public CChainParams consensus.height_ZC_RecalcAccumulators = 999999999; // fork away from old chain at this height - consensus.height_new_client = 574000; //------- Starting Point ----------// + consensus.height_new_client = 585330; //New enforcement// // validation by-pass consensus.nPivxBadBlockTime = disabled; diff --git a/src/main.cpp b/src/main.cpp index bff6145692670..2fa5126d8cf2b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1597,6 +1597,10 @@ int64_t GetBlockValue(int nHeight) //Create a fork to ensure all old wallets update if (nHeight == 574010) { return 801 * COIN; + } + + if (nHeight == 585330) { + return 801 * COIN; } if (nHeight == 0) { @@ -2294,6 +2298,14 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin view.SetBestBlock(pindex->GetBlockHash()); return true; } + + if (sporkManager.IsSporkActive(SPORK_23_CHOKE_CONTROL_MODE)) { + uint256 invalidHash = block.GetHash(); + CBlockIndex* pblockindex = mapBlockIndex[invalidHash]; + InvalidateBlock(state, pblockindex); + ActivateBestChain(state); + return false; + } const int last_pow_block = consensus.height_last_PoW; if (pindex->nHeight <= last_pow_block && block.IsProofOfStake()) @@ -3799,7 +3811,6 @@ bool AcceptBlockHeader(const CBlock& block, CValidationState& state, CBlockIndex return true; } } - return state.DoS(100, error("%s : prev block height=%d hash=%s is invalid, unable to add block %s", __func__, pindexPrev->nHeight, block.hashPrevBlock.GetHex(), block.GetHash().GetHex()), REJECT_INVALID, "bad-prevblk"); } diff --git a/src/spork.cpp b/src/spork.cpp index 9d2ce8de733b3..eaec1f79f9be0 100644 --- a/src/spork.cpp +++ b/src/spork.cpp @@ -27,6 +27,7 @@ std::vector sporkDefs = { MAKE_SPORK_DEF(SPORK_20_UPGRADE_CYCLE_FACTOR, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_21_COLDSTAKING_ENFORCEMENT, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_22_BAN_DUPLICATE_MN_PER_IP, 4070908800ULL), // OFF + MAKE_SPORK_DEF(SPORK_23_CHOKE_CONTROL_MODE, 4070908800ULL), // OFF }; CSporkManager sporkManager; diff --git a/src/sporkid.h b/src/sporkid.h index 64ec4817d9915..d27dab3f4f03c 100644 --- a/src/sporkid.h +++ b/src/sporkid.h @@ -25,6 +25,7 @@ enum SporkId : int32_t { SPORK_20_UPGRADE_CYCLE_FACTOR = 10019, SPORK_21_COLDSTAKING_ENFORCEMENT = 10020, SPORK_22_BAN_DUPLICATE_MN_PER_IP = 10021, + SPORK_23_CHOKE_CONTROL_MODE =10022, SPORK_INVALID = -1 }; diff --git a/src/version.h b/src/version.h index edb1826918192..340649035e545 100644 --- a/src/version.h +++ b/src/version.h @@ -11,7 +11,7 @@ * network protocol versioning */ -static const int PROTOCOL_VERSION = 70922; +static const int PROTOCOL_VERSION = 70923; //! initial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 209; @@ -20,7 +20,7 @@ static const int INIT_PROTO_VERSION = 209; static const int GETHEADERS_VERSION = 70077; //! disconnect from peers older than this proto version -static const int MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT = 70921; +static const int MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT = 70922; static const int MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT = PROTOCOL_VERSION; //! masternodes older than this proto version use old strMessage format for mnannounce