diff --git a/CHANGELOG.md b/CHANGELOG.md index 945a0ecc15..f194b20dad 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/). +## [5.4.7.0], 2024-03-13, leisure + +### Added + - net, consensus: Ban nodes 5.4.5.0 and below #2751 (@jamescowens) + +### Changed + +### Removed + +### Fixed + - util: Adjust Fraction class addition overload overflow tests #2748 (@jamescowens) + ## [5.4.6.0], 2024-03-02, leisure, "Miss Piggy" ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index 09cc834388..0836128949 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ cmake_minimum_required(VERSION 3.18) project("Gridcoin" - VERSION 5.4.6.0 + VERSION 5.4.7.0 DESCRIPTION "POS-based cryptocurrency that rewards BOINC computation" HOMEPAGE_URL "https://gridcoin.us" LANGUAGES ASM C CXX diff --git a/configure.ac b/configure.ac index db4d895adc..fa97189dad 100755 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 5) define(_CLIENT_VERSION_MINOR, 4) -define(_CLIENT_VERSION_REVISION, 6) +define(_CLIENT_VERSION_REVISION, 7) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2024) diff --git a/src/main.cpp b/src/main.cpp index 8aa9e05018..f20773b226 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2049,11 +2049,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, // Note the std::max is there to deal with the rollover of BlockV12Height + DISCONNECT_GRACE_PERIOD if // BlockV12Height is set to std::numeric_limits::max() which is the case during testing. if (pfrom->nVersion < MIN_PEER_PROTO_VERSION - || (DISCONNECT_OLD_VERSION_AFTER_GRACE_PERIOD - && pfrom->nVersion < PROTOCOL_VERSION - && pindexBest->nHeight > std::max(Params().GetConsensus().BlockV12Height, - Params().GetConsensus().BlockV12Height + DISCONNECT_GRACE_PERIOD))) - { + || (DISCONNECT_OLD_VERSION_AFTER_GRACE_PERIOD + && pfrom->nVersion < PROTOCOL_VERSION + && pindexBest->nHeight > std::max(Params().GetConsensus().BlockV12Height, + Params().GetConsensus().BlockV12Height + DISCONNECT_GRACE_PERIOD) + ) + ) { // disconnect from peers older than this proto version LogPrint(BCLog::LogFlags::NOISY, "partner %s using obsolete version %i; disconnecting", pfrom->addr.ToString(), pfrom->nVersion); @@ -2064,8 +2065,27 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, if (!vRecv.empty()) vRecv >> addrFrom >> nNonce; - if (!vRecv.empty()) + + if (!vRecv.empty()) { vRecv >> pfrom->strSubVer; + + // This handles the special disconnect for clients between the mandatory 5.4.0.0 and the 5.4.5.0 since + // 5.4.6.0 effectively became a mandatory due to the contract version error in TxMessage. The protocol version + // was not incremented since 5.4.6.0 was originally a leisure and so this is the only reasonable way to distinguish + // in this situation. + if (pfrom->strSubVer.find("5.4.5") != std::string::npos + || pfrom->strSubVer.find("5.4.4") != std::string::npos + || pfrom->strSubVer.find("5.4.3") != std::string::npos + || pfrom->strSubVer.find("5.4.2") != std::string::npos + || pfrom->strSubVer.find("5.4.1") != std::string::npos + || pfrom->strSubVer.find("5.4.0") != std::string::npos + ) { + + pfrom->fDisconnect = true; + return false; + } + } + if (!vRecv.empty()) vRecv >> pfrom->nStartingHeight;