Skip to content

Commit

Permalink
3.5.8.6-leisure
Browse files Browse the repository at this point in the history
Gridcoin Research 3.5.8.6/MSI=42.0
Leisure Upgrade

- Removed the dependency on Netsoft to test a new CPID
- Modified 'list cpids' to detect the users projects and CPID without a
call to Netsoft
- Modified 'execute proveownership' to work in a decentralized fashion
- Tested 'execute advertisebeacon' to ensure it works with a valid new
CPID with 0 rac
- Note: New users must have boinc installed with at least one project
mounted in order to advertise a beacon
and the Gridcoin e-mail setting must match the project server e-mail
address value.
  • Loading branch information
gridcoin committed Feb 13, 2017
1 parent 6422a1b commit 941eb66
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 302 deletions.
1 change: 0 additions & 1 deletion Makefile.Debug
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#############################################################################
# Makefile for building: gridcoinresearch
# Generated by qmake (2.01a) (Qt 4.8.4) on: Thu Jan 5 19:45:15 2017
# Project: gridcoinresearch.pro
# Template: app
#############################################################################
Expand Down
1 change: 0 additions & 1 deletion Makefile.Release
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#############################################################################
# Makefile for building: gridcoinresearch
# Generated by qmake (2.01a) (Qt 4.8.4) on: Thu Jan 5 19:45:15 2017
# Project: gridcoinresearch.pro
# Template: app
#############################################################################
Expand Down
71 changes: 30 additions & 41 deletions contrib/Installer/GridcoinInstaller/GridcoinResearch.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
}
"Entry"
{
"MsmKey" = "8:_1F7D757BF031E15D44C47B631F994972"
"OwnerKey" = "8:_7A0EA93E644A4D9E8037FBB3C062DD65"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_2C7D9AF4C6E04C06A26314A95B1FF010"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
Expand Down Expand Up @@ -117,6 +111,12 @@
}
"Entry"
{
"MsmKey" = "8:_7EFEAD66FF864CE6AB4AE36FCBA65659"
"OwnerKey" = "8:_7A0EA93E644A4D9E8037FBB3C062DD65"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_86404F6E19794F8A9F8C0ED67F7ADBFC"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
Expand Down Expand Up @@ -232,12 +232,6 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_D0966638AB084779AFD69795C33FC8EB"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_7A0EA93E644A4D9E8037FBB3C062DD65"
"MsmSig" = "8:_UNDEFINED"
}
Expand Down Expand Up @@ -416,26 +410,6 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1F7D757BF031E15D44C47B631F994972"
{
"SourcePath" = "8:BoincStake.tlb"
"TargetName" = "8:BoincStake.tlb"
"Tag" = "8:"
"Folder" = "8:_A31B68165F144F3EBC3FF86D68C9E31B"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:2"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_2C7D9AF4C6E04C06A26314A95B1FF010"
{
"SourcePath" = "8:..\\..\\..\\share\\pixmaps\\GrcInstallBanner.jpg"
Expand Down Expand Up @@ -711,6 +685,26 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7EFEAD66FF864CE6AB4AE36FCBA65659"
{
"SourcePath" = "8:BoincStake.tlb"
"TargetName" = "8:BoincStake.tlb"
"Tag" = "8:"
"Folder" = "8:_A31B68165F144F3EBC3FF86D68C9E31B"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:2"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_88C4C520DC26489AAE9A79AE2F7F22EB"
{
"SourcePath" = "8:..\\..\\..\\share\\pixmaps\\nsis-header.bmp"
Expand Down Expand Up @@ -838,11 +832,6 @@
"AssemblyAsmDisplayName" = "8:OpenPop, Version=2.0.5.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_D0966638AB084779AFD69795C33FC8EB"
{
"Name" = "8:OpenPop.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:A:\\release\\OpenPop.dll"
"TargetName" = "8:"
Expand Down Expand Up @@ -1120,19 +1109,19 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Gridcoin Research"
"ProductCode" = "8:{050C56BD-D556-4E95-BBD8-C7CE5E01FBDC}"
"PackageCode" = "8:{10C9F1E4-30DB-436D-A28D-79FB7577F00F}"
"ProductCode" = "8:{99640ABC-1BE5-4E04-B0D9-47AAD10FB404}"
"PackageCode" = "8:{BFB1DB38-B968-4E50-9221-9918143CECEA}"
"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:41.9"
"ProductVersion" = "8:42.0"
"Manufacturer" = "8:GridcoinResearch"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
"Title" = "8:Gridcoin Research 41.9"
"Title" = "8:Gridcoin Research 42.0"
"Subject" = "8:"
"ARPCONTACT" = "8:The Gridcoin Developers"
"Keywords" = "8:Gridcoin Research"
Expand Down
3 changes: 2 additions & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
#define CLIENT_VERSION_MAJOR 3
#define CLIENT_VERSION_MINOR 5
#define CLIENT_VERSION_REVISION 8
#define CLIENT_VERSION_BUILD 5
#define CLIENT_VERSION_BUILD 6

// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
#define STRINGIZE(X) DO_STRINGIZE(X)
#define DO_STRINGIZE(X) #X

#endif // CLIENTVERSION_H

24 changes: 15 additions & 9 deletions src/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ 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);
std::string GetHttpPageFromCreditServerRetired(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);
extern double ReturnTotalRacByCPIDRetired(std::string cpid);

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

double ReturnTotalRacByCPID(std::string cpid)
double ReturnTotalRacByCPIDRetired(std::string cpid)
{
std::string result = GetHttpPage(cpid,true,true);
//std::vector<std::string> vRAC = split(result.c_str(),"<project>");
std::string result = GetHttpPageFromCreditServerRetired(cpid,true,true);
std::string sRAC = ExtractXML(result,"<expavg_credit>","</expavg_credit>");
double dRAC = cdbl(sRAC,0);
return dRAC;
Expand All @@ -307,15 +306,22 @@ int DetermineCPIDType(std::string cpid)
// -1 = Invalid CPID
// 1 = Valid CPID with RAC
// 2 = Investor or Pool Miner
printf("\r\nCPID Length %f\r\n",(double)cpid.length());

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;
if (cpid.length()==32)
{
return 1;
}
else
{
// CPID is not 32 chars long- return Investor
return 2;
}
}


Expand Down
Loading

0 comments on commit 941eb66

Please sign in to comment.