Skip to content

Commit

Permalink
3.5.9.8-Mandatory for Windows
Browse files Browse the repository at this point in the history
Gridcoin Research 3.5.9.8/MSI=43.2
Mandatory Upgrade for Windows Users

- Revised Neural Network business logic rule fix inability to stake
current superblock
  • Loading branch information
gridcoin committed Jul 29, 2017
1 parent b30f90e commit 070d7e3
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 47 deletions.
62 changes: 31 additions & 31 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 @@ -410,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 @@ -705,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 @@ -1109,19 +1109,19 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Gridcoin Research"
"ProductCode" = "8:{D1EFB88D-4D2E-450D-AC05-F34ED66797C3}"
"PackageCode" = "8:{001F47E9-3D99-4E69-AB07-C4B423FFB209}"
"ProductCode" = "8:{C289B3CF-74B7-4D03-8A08-4D0BE6BDA2FD}"
"PackageCode" = "8:{A8C1B9AF-1685-4BF8-92C9-9DE7B4C84FCA}"
"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:43.1"
"ProductVersion" = "8:43.2"
"Manufacturer" = "8:GridcoinResearch"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
"Title" = "8:Gridcoin Research 43.1"
"Title" = "8:Gridcoin Research 43.2"
"Subject" = "8:"
"ARPCONTACT" = "8:The Gridcoin Developers"
"Keywords" = "8:Gridcoin Research"
Expand Down Expand Up @@ -1703,7 +1703,7 @@
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_7A0EA93E644A4D9E8037FBB3C062DD65"
{
"SourcePath" = "8:..\\boinc\\boinc\\obj\\Release\\BoincStake.dll"
"SourcePath" = "8:..\\boinc\\boinc\\obj\\Debug\\BoincStake.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_A31B68165F144F3EBC3FF86D68C9E31B"
Expand Down
2 changes: 1 addition & 1 deletion contrib/Installer/boinc/boinc/Utilization.vb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Public Class Utilization
Private mlSpeakMagnitude As Double
Public ReadOnly Property Version As Double
Get
Return 421
Return 422
End Get
End Property

Expand Down
1 change: 1 addition & 0 deletions contrib/Installer/boinc/boinc/clsBoincProjectDownload.vb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Public Class clsBoincProjectDownload
Try
Dim webRequest As WebRequest = HttpWebRequest.Create(url)
webRequest.Method = "HEAD"
webRequest.Timeout = 10000
Using webResponse As WebResponse = webRequest.GetResponse()
For Each header As String In webResponse.Headers
headers.Add(header, webResponse.Headers(header))
Expand Down
40 changes: 27 additions & 13 deletions contrib/Installer/boinc/boinc/modPersistedDataSystem.vb
Original file line number Diff line number Diff line change
Expand Up @@ -185,27 +185,37 @@ Module modPersistedDataSystem
Dim lstCPIDs As List(Of Row) = GetList(surrogateRow, "*")
lstCPIDs.Sort(Function(x, y) x.PrimaryKey.CompareTo(y.PrimaryKey))
Dim dMagAge As Long = 0
Dim lMaxZeroShaveAmount = lstCPIDs.Count * 0.06 'Our superblocks must be within 10% tolerance (as compared to beacon count) to be accepted
Dim lShavedZeroCount As Long = 0

For Each cpid As Row In lstCPIDs
If cpid.DataColumn5 = "True" Then
Dim sRow As String = cpid.PrimaryKey + "," + Num(cpid.Magnitude) + ";"
Dim dLocalMagnitude As Double = Val("0" + Num(cpid.Magnitude)) * 1.35 'Ensure culture is neutral first - and then that magnitude passes through the bar
If dLocalMagnitude > 32766 Then dLocalMagnitude = 32766

Dim sRow As String = cpid.PrimaryKey + "," + Num(dLocalMagnitude) + ";"
'Zero magnitude rule (We need a placeholder because of the beacon count rule)
If Val(cpid.Magnitude) = 0 Then
If Val(dLocalMagnitude) = 0 Then
sRow = "0,15;"
If lShavedZeroCount < lMaxZeroShaveAmount Then
lShavedZeroCount += 1
sRow = "" 'Remove the row
End If
End If

lTotal = lTotal + Val("0" + Trim(cpid.Magnitude))
lTotal = lTotal + Val("0" + Trim(dLocalMagnitude))
lRows = lRows + 1
sOut += sRow
If Len(sRow) > 0 Then sOut += sRow
dMagAge = 0

Else
Dim sRow As String = cpid.PrimaryKey + ",00;"
lTotal = lTotal + 0
lRows = lRows + 1
sOut += sRow
End If
Next
sOut += "00000000000,275000;" 'This is a placeholder to be removed in Neural Network 2.0
'sOut += "00000000000,275000;" 'This is a placeholder to be removed in Neural Network 2.0
sOut += "</MAGNITUDES><QUOTES>"

surrogateRow.Database = "Prices"
Expand Down Expand Up @@ -394,11 +404,11 @@ Module modPersistedDataSystem
End Try
End Function
Public Sub SyncDPOR2()
' If Math.Abs(DateDiff(DateInterval.Second, Now, mdLastSync)) > 60 * 10 Then bMagsDoneLoading = True
' If bMagsDoneLoading = False Then
'Log("Blocked call.")
'Exit Sub
'End If
If Math.Abs(DateDiff(DateInterval.Second, Now, mdLastSync)) > 60 * 10 Then bMagsDoneLoading = True
If bMagsDoneLoading = False Then
Log("Blocked call.")
Exit Sub
End If
If KeyValue("disableneuralnetwork") = "true" Then
Log("Neural network is disabled.")
Exit Sub
Expand All @@ -423,9 +433,13 @@ Module modPersistedDataSystem
End If

Dim dWindow As Double = 60 * 60 '1 hour before and 1 hour after superblock expires:
Dim lAgeOfMaster = GetUnixFileAge(GetGridFolder() + "NeuralNetwork\db.dat")
If lAgeOfMaster > (SYNC_THRESHOLD / 4) Then
Log("Clearing project data once every 6 hours.")
ClearProjectData()
End If
If dAge > (86400 - dWindow) And dAge < (86400 + dWindow) Then
Dim lAgeOfMaster = GetUnixFileAge(GetGridFolder() + "NeuralNetwork\db.dat")
If lAgeOfMaster > (SYNC_THRESHOLD / 4) Then
If lAgeOfMaster > (SYNC_THRESHOLD) Then
'Clear out this nodes project data, so the node can sync with the team at the same exact time:
Log("Clearing project data so we can synchronize as a team.")
ClearProjectData()
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 9
#define CLIENT_VERSION_BUILD 7
#define CLIENT_VERSION_BUILD 8

// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
Expand Down
1 change: 0 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2928,7 +2928,6 @@ std::string UnpackBinarySuperblock(std::string sBlock)

std::string PackBinarySuperblock(std::string sBlock)
{

std::string sMagnitudes = ExtractXML(sBlock,"<MAGNITUDES>","</MAGNITUDES>");
std::string sAverages = ExtractXML(sBlock,"<AVERAGES>","</AVERAGES>");
std::string sQuotes = ExtractXML(sBlock,"<QUOTES>","</QUOTES>");
Expand Down

0 comments on commit 070d7e3

Please sign in to comment.