gridcoin-community / Gridcoin-Research

Gridcoin-Research
MIT License
588 stars 173 forks source link

explainmagnitude changes format #205

Closed tomasbrod closed 7 years ago

tomasbrod commented 7 years ago

The RPC command list explainmagnitude randomly changes it's output format during wallet run. I noticed two different formats of output of this command. The other format starts to appear after some time running the wallet, but I seen it output in first format after that too. Non-deterministic behavior is bad.

denravonska commented 7 years ago

Do you have an example of two conflicting outputs?

tomasbrod commented 7 years ago

This is the first. And the second is further down.

[ { "Command" : "explainmagnitude" }, { "Participating NetRac: 318667, CPIDValid: Yes, RAC: 266 Project" : "drugdiscovery@home", "User drugdiscovery@home Verified RAC" : 266.00000000, "drugdiscovery@home Network RAC" : 318667.00000000, "Your Project Magnitude" : 3.55400298, "Participating NetRac: 10553820, CPIDValid: Yes, RAC: 5926 Project" : "einstein@home", "User einstein@home Verified RAC" : 5926.00000000, "einstein@home Network RAC" : 10553820.00000000, "Your Project Magnitude" : 2.39070076, "Participating NetRac: 32861720, CPIDValid: Yes, RAC: 1526 Project" : "gpugrid", "User gpugrid Verified RAC" : 1526.00000000, "gpugrid Network RAC" : 32861720.00000000, "Your Project Magnitude" : 0.19771403, "Participating NetRac: 464000, CPIDValid: Yes, RAC: 583 Project" : "leiden classical", "User leiden classical Verified RAC" : 583.00000000, "leiden classical Network RAC" : 464000.00000000, "Your Project Magnitude" : 5.34963093, "Participating NetRac: 10053920, CPIDValid: Yes, RAC: 296 Project" : "milkyway@home", "User milkyway@home Verified RAC" : 296.00000000, "milkyway@home Network RAC" : 10053920.00000000, "Your Project Magnitude" : 0.12535150, "Participating NetRac: 18214530, CPIDValid: Yes, RAC: 1125 Project" : "primegrid", "User primegrid Verified RAC" : 1125.00000000, "primegrid Network RAC" : 18214530.00000000, "Your Project Magnitude" : 0.26297097, "Participating NetRac: 766000, CPIDValid: Yes, RAC: 72 Project" : "rosetta@home", "User rosetta@home Verified RAC" : 72.00000000, "rosetta@home Network RAC" : 766000.00000000, "Your Project Magnitude" : 0.40019990, "Participating NetRac: 2011429, CPIDValid: Yes, RAC: 15 Project" : "seti@home", "User seti@home Verified RAC" : 15.00000000, "seti@home Network RAC" : 2011429.00000000, "Your Project Magnitude" : 0.03175118, "Participating NetRac: 333333, CPIDValid: Yes, RAC: 106 Project" : "vgtu project@home", "User vgtu project@home Verified RAC" : 106.00000000, "vgtu project@home Network RAC" : 333333.00000000, "Your Project Magnitude" : 1.35394430, "Participating NetRac: 1197143, CPIDValid: Yes, RAC: 136 Project" : "world community grid", "User world community grid Verified RAC" : 136.00000000, "world community grid Network RAC" : 1197143.00000000, "Your Project Magnitude" : 0.48368891, "Participating NetRac: 688000, CPIDValid: Yes, RAC: 1078 Project" : "yoyo@home", "User yoyo@home Verified RAC" : 1078.00000000, "yoyo@home Network RAC" : 688000.00000000, "Your Project Magnitude" : 6.67119403, "Whitelisted Project Count" : 27.00000000, "Grand-Total Verified RAC" : 11129.00000000, "Grand-Total Network RAC" : 211854697.00000000, "Total Magnitude for All Projects" : 20.82114949, "Grand-Total Whitelisted Projects" : "27", "Participating Project Count" : 11.00000000, "(11129.00/77462562.00)/27*115000=" : 20.82114949 } ]

And this is the other format.

[ { "Command" : "explainmagnitude" }, { "1" : "CPID,Project,RAC,Project_Total_RAC,Project_Avg_RAC,Project Mag,Cumulative RAC,Cumulative Mag,Errors", "2" : "46f64d69eb8c5ee9cd24178b589af83f,distributeddatamining,45,217333.33,2960,0,0,0,Not Whitelisted", "3" : "46f64d69eb8c5ee9cd24178b589af83f,drugdiscovery@home,100,302000,5120,1.46,100,1.46,", "4" : "46f64d69eb8c5ee9cd24178b589af83f,einstein@home,5120,10899170,29500,2.08,5220,3.54,", "5" : "46f64d69eb8c5ee9cd24178b589af83f,enigma@home,40,686000,3800,0.26,5260,3.8,", "6" : "46f64d69eb8c5ee9cd24178b589af83f,gpugrid,140,33418770,192000,0.02,5400,3.82,", "7" : "46f64d69eb8c5ee9cd24178b589af83f,leiden classical,570,460666.67,3400,5.47,5970,9.29,", "8" : "46f64d69eb8c5ee9cd24178b589af83f,milkyway@home,45,10129720,32000,0.02,6015,9.31,", "9" : "46f64d69eb8c5ee9cd24178b589af83f,primegrid,740,17825010,93000,0.18,6755,9.49,", "10" : "46f64d69eb8c5ee9cd24178b589af83f,tn-grid,25,907333.33,18833.33,0.12,6780,9.61,", "11" : "46f64d69eb8c5ee9cd24178b589af83f,vgtu project@home,23.75,336666.67,4760,0.31,6803.75,9.92,", "12" : "46f64d69eb8c5ee9cd24178b589af83f,world community grid,35,1185714.29,3240,0.13,6838.75,10.05,", "13" : "46f64d69eb8c5ee9cd24178b589af83f,yoyo@home,800,680666.67,4720,5.2,7638.75,15.25,", "14" : "NN Host Version: 409, NeuralHash: 6b5f9de2d165682785d503522319012f, SignatureCPID: 5197047ee3ab232f6d1b99ce8003963a, Time: 10/02/2017 09:22:52", "15" : "Total RAC: 7638.75", "16" : "Total Mag: 15.25" } ]

tomasbrod commented 7 years ago

This obviously breaks my scripts that I use to make some stats. I am on 2e1e6b9d4b, maybe I should recompile.

denravonska commented 7 years ago

Ouch, yeah that looks funky. I'll see if I can find the source of it.

denravonska commented 7 years ago

explainmagnitude2 and explainmagnitude both produce the same output when there is an NN response. @gridcoin Should we remove this inconsistency behavior from explainmagnitude and possibly rename explainmagnitude2?

iFoggz commented 7 years ago

has this been done up i havent seen it in awhile but noticed its always whitelistedprojectcount + 1 in magnitude formulas in the other format which when i do that my wallet magnitude always matches up correctly. list networks shows the projects as well as neural network and seems like its included as a project in the whitelistedprojectcount in wallet if the second format does show up.

i still can match my wallets mag up properly doing 115000 * ((userrac/teamrac) / (whitelistprojectcount + 1)) instead of other formula.

if i used default 115000 * ((userrac/ teamrac) / whitelistprojectcount) itll always match sites like gridcoinstats but its an over estimate of the magnitude. ive heard a few people asking why it doesnt match up and thought id look into it.

my mag in wallet is 160 atm. its 166 on gridcoinstats and if i do my formula it matches to 160 instead of 166 for original formula.

tomasbrod commented 7 years ago

Closing as workaround exists. Use execute explainmagnitude2.

Quezacoatl1 commented 6 years ago

I also need the command to ensure the output. This seems to be the output when there is no NN response:

[
{
"Command" : "explainmagnitude2"
},
{
"Requested Explain Magnitude For" : "1a7c8f7bbe5a14b0c1e205af3bd2d3d5",
"1" : "",
"Response" : "No response."
}
]

Then there is sometimes this output, although it has a CPID attached:

[
{
"Command" : "explainmagnitude2"
},
{
"Requested Explain Magnitude For" : "",
"1" : "",
"Response" : "No response."
}
]

How can I ensure having a NN response and how can I ensure not having a blank CPID?

iFoggz commented 6 years ago

explainmagnitude2 force?

Quezacoatl1 commented 6 years ago

execute explainmagnitude2 force (returns no such list) sleep 5 execute explainmagnitude

does the trick