Skip to content

Commit

Permalink
3.5.5.3-leisure
Browse files Browse the repository at this point in the history
Gridcoin Research 3.5.5.3/MSI=39.2
Leisure Upgrade for Prod
Mandatory for TestNet

- Added Binary superblocks
a.  Added "IsBinary" to showblock so we can see if the superblock is
binary (lets look at this in testnet)
b.  Made wallet auto detect Investor mode
c.  Prod still uses ASCII superblocks until next mandatory
d.  RTM, for gridresearchcorp, check out ConvertBinToHex and
UnpackBinarySuperblock
- Added Chat Room to main menu
- We now honor the "datadir" key for the NeuralNetwork and for all .NET
functions (for people with an alternative DataDir)
- Fixed delimiter in DailyNeuralMagnitudeReport.
  • Loading branch information
gridcoin committed Dec 22, 2015
1 parent 7321d24 commit 6a27b9a
Show file tree
Hide file tree
Showing 19 changed files with 366 additions and 96 deletions.
3 changes: 2 additions & 1 deletion Makefile.Debug
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: gridcoinresearch
# Generated by qmake (2.01a) (Qt 4.8.4) on: Wed Dec 16 15:52:00 2015
# Generated by qmake (2.01a) (Qt 4.8.4) on: Mon Dec 21 19:17:14 2015
# Project: gridcoinresearch.pro
# Template: app
#############################################################################
Expand Down Expand Up @@ -700,6 +700,7 @@ debug/qrc_bitcoin.cpp: src/qt/bitcoin.qrc \
src/qt/res/icons/editcopy.png \
src/qt/res/icons/receive.png \
src/qt/res/icons/cpumined_blue.png \
src/qt/res/icons/chat.png \
src/qt/res/icons/transaction0.png \
src/qt/res/icons/clock1.png \
src/qt/res/icons/clock2.png \
Expand Down
3 changes: 2 additions & 1 deletion Makefile.Release
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: gridcoinresearch
# Generated by qmake (2.01a) (Qt 4.8.4) on: Wed Dec 16 15:52:01 2015
# Generated by qmake (2.01a) (Qt 4.8.4) on: Mon Dec 21 19:17:15 2015
# Project: gridcoinresearch.pro
# Template: app
#############################################################################
Expand Down Expand Up @@ -700,6 +700,7 @@ release/qrc_bitcoin.cpp: src/qt/bitcoin.qrc \
src/qt/res/icons/editcopy.png \
src/qt/res/icons/receive.png \
src/qt/res/icons/cpumined_blue.png \
src/qt/res/icons/chat.png \
src/qt/res/icons/transaction0.png \
src/qt/res/icons/clock1.png \
src/qt/res/icons/clock2.png \
Expand Down
8 changes: 4 additions & 4 deletions contrib/Installer/GridcoinInstaller/GridcoinResearch.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -1094,19 +1094,19 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Gridcoin Research"
"ProductCode" = "8:{9992C174-931B-4F99-B53F-A3E5A860B35B}"
"PackageCode" = "8:{C98E2A95-3F5F-4D4B-B423-7DF548997A3E}"
"ProductCode" = "8:{3E5E8EFF-6940-43E5-9DC7-8844EF7FFC83}"
"PackageCode" = "8:{E207E917-9CEF-40E3-826E-52B3FF7097CB}"
"UpgradeCode" = "8:{9617E9EA-252F-43CE-B53E-B48C85F71192}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:FALSE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:39.1"
"ProductVersion" = "8:39.2"
"Manufacturer" = "8:GridcoinResearch"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
"Title" = "8:Gridcoin Research Beta 39.1"
"Title" = "8:Gridcoin Research Beta 39.2"
"Subject" = "8:"
"ARPCONTACT" = "8:The Gridcoin Developers"
"Keywords" = "8:Gridcoin Research"
Expand Down
4 changes: 3 additions & 1 deletion contrib/Installer/boinc/boinc/modGRC.vb
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,9 @@ Module modGRC
End Function
Public Function GetGridFolder() As String
Dim sTemp As String
sTemp = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\gridcoinresearch\"
'Determine if user has overridden the %appdata% (datadir) folder first:
Dim sOverridden As String = KeyValue("datadir")
sTemp = IIf(Len(sOverridden) > 0, sOverridden, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\gridcoinresearch\")
If mbTestNet Then sTemp += "Testnet\"
Return sTemp
End Function
Expand Down
2 changes: 1 addition & 1 deletion contrib/Installer/boinc/boinc/modPersistedDataSystem.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1563,7 +1563,7 @@ Retry:

Dim sReport As String = ""
Dim sReportRow As String = ""
Dim sHeader As String = "CPID,LocalMagnitude,NeuralMagnitude,TotalRAC,Synced Til,Address,CPID_Valid;Witnesses"
Dim sHeader As String = "CPID,LocalMagnitude,NeuralMagnitude,TotalRAC,Synced Til,Address,CPID_Valid,Witnesses"
sReport += sHeader + vbCrLf
Dim grr As New GridcoinReader.GridcoinRow
Dim sHeading As String = "CPID;LocalMagnitude;NeuralMagnitude;TotalRAC;Synced Til;Address;CPID_Valid;Witnesses"
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define CLIENT_VERSION_MAJOR 3
#define CLIENT_VERSION_MINOR 5
#define CLIENT_VERSION_REVISION 5
#define CLIENT_VERSION_BUILD 2
#define CLIENT_VERSION_BUILD 3

// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
Expand Down
9 changes: 5 additions & 4 deletions src/gridcoin.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#ifndef GRIDCOIN_H
#define GRIDCOIN_H

static const std::string BoincHashMerkleRootNew = "ElimZa7b8c9ateXr9kgueTheJ2HackersExa192";
static const std::string BoincHashWindowsMerkleRootNew = "yG3uv41o6n7apYOVVszTMQ==";
static const std::string GetBlocksCommand = "unknown";

//Notes for manually compiled nodes:


#endif
//addnode=node.gridcoin.us
//boincblocks=
//boinchash=
//org=
34 changes: 31 additions & 3 deletions src/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@ MiningCPID GetMiningCPID();
StructCPID GetStructCPID();
extern int64_t GetRSAWeightByCPID(std::string cpid);
extern double OwedByAddress(std::string address);

std::string ExtractXML(std::string XMLdata, std::string key, std::string key_end);
double cdbl(std::string s, int place);
extern int DetermineCPIDType(std::string cpid);
std::string GetHttpPage(std::string cpid, bool usedns, bool clearcache);
extern int64_t GetRSAWeightByCPIDWithRA(std::string cpid);


double MintLimiter(double PORDiff,int64_t RSA_WEIGHT,std::string cpid,int64_t locktime);
double GetBlockDifficulty(unsigned int nBits);
extern double GetLastPaymentTimeByCPID(std::string cpid);
extern double GetUntrustedMagnitude(std::string cpid, double& out_owed);
bool LessVerbose(int iMax1000);
StructCPID GetInitializedStructCPID2(std::string name,std::map<std::string, StructCPID> vRef);
extern double ReturnTotalRacByCPID(std::string cpid);

typedef std::map<int, unsigned int> MapModifierCheckpoints;
/*
Expand Down Expand Up @@ -292,6 +294,32 @@ static bool GetKernelStakeModifier(uint256 hashBlockFrom, uint64_t& nStakeModifi
// a proof-of-work situation.
//

double ReturnTotalRacByCPID(std::string cpid)
{
std::string result = GetHttpPage(cpid,true,true);
//std::vector<std::string> vRAC = split(result.c_str(),"<project>");
std::string sRAC = ExtractXML(result,"<expavg_credit>","</expavg_credit>");
double dRAC = cdbl(sRAC,0);
return dRAC;
}

int DetermineCPIDType(std::string cpid)
{
// -1 = Invalid CPID
// 1 = Valid CPID with RAC
// 2 = Investor or Pool Miner
if (cpid.empty()) return -1;
if (cpid=="INVESTOR") return 2;
StructCPID h = mvMagnitudes[cpid];
if (h.Magnitude > 0) return 1;
// If magnitude is 0 in the current superblock, try to get magnitude from netsoft before failing
double dRAC = ReturnTotalRacByCPID(cpid);
if (dRAC > 0) return 1;
// At this point, they have no RAC in the superblock, and no RAC in Netsoft, so we assume they are an investor (or pool miner)
return 2;
}


double GetMagnitudeByHashBoinc(std::string hashBoinc, int height)
{
if (hashBoinc.length() > 1)
Expand Down
Loading

0 comments on commit 6a27b9a

Please sign in to comment.