diff --git a/configure.ac b/configure.ac index 13f55ab..e5475ac 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MINOR, 12) define(_CLIENT_VERSION_REVISION, 1) -define(_CLIENT_VERSION_BUILD, 16) +define(_CLIENT_VERSION_BUILD, 17) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2018) AC_INIT([Vivo Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/vivocoin/vivo/issues],[vivocore]) diff --git a/share/genbuild.sh b/share/genbuild.sh index a15cb34..86c6309 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -28,7 +28,7 @@ if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/ # 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-Special" # get a string like "2012-04-10 16:27:19 +0200" LAST_COMMIT_DATE="$(git log -n 1 --format="%ci")" diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 36b1a02..e31d0bb 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -182,8 +182,9 @@ class CMainParams : public CChainParams { (308000, uint256S("0x0000000018ee47a3c93296309ce207724868232706f59a6937362581476ce462")) (349891, uint256S("0x000000000965eb7af631e8717d10b477568a699cbb5cc172f723204f699e3488")) (378129, uint256S("0x000000002f22a53a0228c6b94c960ba923df660531911392841196f641970b5f")) - (420300, uint256S("0x0000000037e291974d11f3f0c5309632db5d1b5c70162014a11e3de7920a548b")), - 1557968975, // * UNIX timestamp of last checkpoint block + (420300, uint256S("0x0000000037e291974d11f3f0c5309632db5d1b5c70162014a11e3de7920a548b")) + (444770, uint256S("0x00000000a21f0077a24e0d814dcfca41144a49d671ad2f3adb9f5fe5f509efaa")), + 1561331573, // * UNIX timestamp of last checkpoint block 5000, // * total number of transactions between genesis and last checkpoint // (the tx=... number in the SetBestChain debug.log lines) 500 // * estimated number of transactions per day after checkpoint diff --git a/src/governance.cpp b/src/governance.cpp index 216acac..698376a 100644 --- a/src/governance.cpp +++ b/src/governance.cpp @@ -106,10 +106,18 @@ void CGovernanceManager::ProcessMessage(CNode* pfrom, std::string& strCommand, C // lite mode is not supported if(fLiteMode) return; if(!masternodeSync.IsBlockchainSynced()) return; - + //LogPrintf("GGGGGG <%i> <%i> %d \n", pfrom->strSubVer, pfrom->cleanSubVer, pfrom->nVersion); if(pfrom->nVersion < MIN_GOVERNANCE_PEER_PROTO_VERSION) return; if(pfrom->nVersion == 70209) return; - if(pfrom->nVersion == 70208) return; + if(pfrom->nVersion == 70208) return; + string searchVersion ("Vivo Core:0.12.1.12"); + if (pfrom->cleanSubVer.find(searchVersion) != std::string::npos) + { + LogPrintf("ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZAAAAAAAAAA\n"); + return; + } + + //exsplit // ANOTHER USER IS ASKING US TO HELP THEM SYNC GOVERNANCE OBJECT DATA if (strCommand == NetMsgType::MNGOVERNANCESYNC) @@ -127,7 +135,8 @@ void CGovernanceManager::ProcessMessage(CNode* pfrom, std::string& strCommand, C if(pfrom->nVersion != 70209) - if(pfrom->nVersion != 70208) + if(pfrom->nVersion != 70208) + //exsplit if(pfrom->nVersion >= GOVERNANCE_FILTER_PROTO_VERSION) { vRecv >> filter; filter.UpdateEmptyFull(); @@ -1051,6 +1060,8 @@ void CGovernanceManager::RequestGovernanceObject(CNode* pfrom, const uint256& nH return; } + //LogPrintf("FFFFFF <%i> <%i> %d \n", pfrom->strSubVer, pfrom->cleanSubVer, pfrom->nVersion); + LogPrint("gobject", "CGovernanceObject::RequestGovernanceObject -- hash = %s (peer=%d)\n", nHash.ToString(), pfrom->GetId()); if(pfrom->nVersion < GOVERNANCE_FILTER_PROTO_VERSION) { @@ -1079,7 +1090,11 @@ void CGovernanceManager::RequestGovernanceObject(CNode* pfrom, const uint256& nH int CGovernanceManager::RequestGovernanceObjectVotes(CNode* pnode) { + //LogPrintf("DDDDDD <%i> <%i> %d \n", pnode->strSubVer, pnode->cleanSubVer, pnode->nVersion); if(pnode->nVersion < MIN_GOVERNANCE_PEER_PROTO_VERSION) return -3; + //exsplit + + std::vector vNodesCopy; vNodesCopy.push_back(pnode); return RequestGovernanceObjectVotes(vNodesCopy); @@ -1158,12 +1173,14 @@ int CGovernanceManager::RequestGovernanceObjectVotes(const std::vector& // they stay connected for a short period of time and it's possible that we won't get everything we should. // Only use outbound connections - inbound connection could be a "masternode" connection // initialted from another node, so skip it too. + //LogPrintf("CCCCCC <%i> <%i> %d \n", pnode->strSubVer, pnode->cleanSubVer, pnode->nVersion); if(pnode->fMasternode || (fMasterNode && pnode->fInbound)) continue; // only use up to date peers if(pnode->nVersion < MIN_GOVERNANCE_PEER_PROTO_VERSION) continue; if(pnode->nVersion == 70209) continue; if(pnode->nVersion == 70208) continue; - + //exsplit + // stop early to prevent setAskFor overflow size_t nProjectedSize = pnode->setAskFor.size() + nProjectedVotes; if(nProjectedSize > SETASKFOR_MAX_SZ/2) continue; diff --git a/src/main.cpp b/src/main.cpp index 2907203..3b644f6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5305,11 +5305,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, #define SIX_WEEKS_SINCE_BLOCK 447187 #define THREE_MONTHS_SINCE_BLOCK 474067 #define FOUR_MONTHS_PLUS_TWOWEEKS_SINCE_BLOCK 500947 +#define SIX_MONTHS_PLUS_TWOWEEKS_SINCE_BLOCK 559811 - if (chainActive.Height() > FOUR_MONTHS_PLUS_TWOWEEKS_SINCE_BLOCK) { - LogPrintf("YOU NEED TO GET NEW VERSION- UPGRADE VIVO\n"); - StartShutdown(); - } + //if (chainActive.Height() > SIX_MONTHS_PLUS_TWOWEEKS_SINCE_BLOCK) { + // LogPrintf("YOU NEED TO GET NEW VERSION- UPGRADE VIVO\n"); + // StartShutdown(); + //} if (pfrom->nVersion < 70210) @@ -5333,7 +5334,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, vRecv >> LIMITED_STRING(pfrom->strSubVer, MAX_SUBVERSION_LENGTH); pfrom->cleanSubVer = SanitizeString(pfrom->strSubVer); } - + + if (!vRecv.empty()) + vRecv >> pfrom->nStartingHeight; string remoteAddrx; remoteAddrx = ", peeraddr=" + pfrom->addr.ToString(); @@ -5386,11 +5389,27 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, return false; } } + + if (chainActive.Height() > FOUR_MONTHS_PLUS_TWOWEEKS_SINCE_BLOCK) { + LogPrintf("===================xxxxxxxxxx4===========================\n"); + string searchVersion ("Vivo Core:0.12.1.16"); + if (pfrom->cleanSubVer.find(searchVersion) != std::string::npos) + { + LogPrintf("******************* peer=%d using obsolete version %i %s; disconnecting\n", pfrom->id, pfrom->cleanSubVer, remoteAddrx); + //pfrom->PushMessage(NetMsgType::REJECT, strCommand, REJECT_OBSOLETE, + // strprintf("Version must be %d or greater", MIN_PEER_PROTO_VERSION)); + pfrom->fDisconnect = true; + return false; + } + } + + + + //END MODS - if (!vRecv.empty()) - vRecv >> pfrom->nStartingHeight; + if (!vRecv.empty()) vRecv >> pfrom->fRelayTxes; // set to true after we get the first filter* message else diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp index 3e45316..39f27a5 100644 --- a/src/masternode-sync.cpp +++ b/src/masternode-sync.cpp @@ -489,7 +489,9 @@ void CMasternodeSync::ProcessTick() if (pnode->nVersion < MIN_GOVERNANCE_PEER_PROTO_VERSION) continue; if(pnode->nVersion == 70209) continue; if(pnode->nVersion == 70208) continue; - + //exsplit + //LogPrintf("BBBBBB <%i> <%i> %d \n", pnode->strSubVer, pnode->cleanSubVer, pnode->nVersion); + nRequestedMasternodeAttempt++; SendGovernanceSyncRequest(pnode); @@ -505,8 +507,10 @@ void CMasternodeSync::ProcessTick() void CMasternodeSync::SendGovernanceSyncRequest(CNode* pnode) { + //LogPrintf("AAAAAA <%i> <%i> %d \n", pnode->strSubVer, pnode->cleanSubVer, pnode->nVersion); if(pnode->nVersion != 70209) if(pnode->nVersion != 70208) + //exsplit if(pnode->nVersion >= GOVERNANCE_FILTER_PROTO_VERSION) { CBloomFilter filter; diff --git a/src/net.cpp b/src/net.cpp index 39b41ec..7c90ba6 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1581,8 +1581,8 @@ void ThreadOpenConnections() continue; // do not allow non-default ports, unless after 50 invalid addresses selected already - if (addr.GetPort() != Params().GetDefaultPort() && nTries < 50) - continue; + //if (addr.GetPort() != Params().GetDefaultPort() && nTries < 50) + // continue; addrConnect = addr; break; @@ -2135,10 +2135,20 @@ void RelayTransaction(const CTransaction& tx, const CDataStream& ss) void RelayInv(CInv &inv, const int minProtoVersion) { LOCK(cs_vNodes); + //exsplit BOOST_FOREACH(CNode* pnode, vNodes) + { + + //LogPrintf("AAAAAA <%i> <%i> %d \n", pnode->strSubVer, pnode->cleanSubVer, pnode->nVersion); + string searchVersion ("Vivo Core:0.12.1.12"); + if (pnode->cleanSubVer.find(searchVersion) != std::string::npos) + { + LogPrintf("ZZZZZZZZZZZZZZZZZZZZZ .12 ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ\n"); + } else if(pnode->nVersion >= 70210) pnode->PushInventory(inv); + } } void CNode::RecordBytesRecv(uint64_t bytes)