Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tally thread and make obsolete tally blocking. #934

Merged

Conversation

denravonska
Copy link
Member

@denravonska denravonska commented Feb 10, 2018

State: Testing

Remove the retired tally thread and make the tally blocking instead. This changes the old behavior but as long as it syncs up we should be good. I am syncing my dev station and a Ubuntu 14.04 docker to see if this solves Coinomi's problems.

Edit: This seems to slow down syncing a bit as tallies are blocking. As long as it syncs up fine we can live with that and optimize in the dev branch, most noticeably UnpackBinarySuperblock and its string conversions.

printf("ConnectBlock[] : Researchers Reward results in deficit of %f for CPID %s with trust level of %f - (Submitted Research Subsidy %f vs calculated=%f) Hash: %s",
deficit, bb.cpid.c_str(), (double)strUntrustedHost.Accuracy, bb.ResearchSubsidy,
printf("ConnectBlock[] : Researchers Reward results in deficit of %f for CPID %s with trust level of %f - (Submitted Research Subsidy %f vs calculated=%f) Hash: %s",
deficit, bb.cpid.c_str(), (double)strUntrustedHost.Accuracy, bb.ResearchSubsidy,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strUntrustedHost.Accuracy is already double. could clean that up abit :)

Copy link
Member

@iFoggz iFoggz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved for testing phase. would like to see this in action.

@tomasbrod
Copy link
Member

While I like the removal of tally thread, the change is too involved for me to immediately approve.
I do not understand why you now make no distinction between the retired and v9 invocations.

@denravonska
Copy link
Member Author

denravonska commented Feb 11, 2018

@tomasbrod I've reverted some of the parts to make the diff smaller and to make it mimic the old behavior more. It's not entirely possible since it was a mix of busy waits and just flagging for tally.

We absolutely must clean up the tally invocations in an upcoming leisure. It is way, way too scattered now.

@@ -4431,7 +4421,7 @@ void GridcoinServices()
{
if (fDebug) printf("SVC: set off Tally (v3 B) height %d\n",nBestHeight);
if (fDebug10) printf("#TIB# ");
bDoTally_retired = true;
TallyResearchAverages(pindexBest);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am considering removing these two tallies. The previous calls were not busy waiting so the previous behavior was undefined.

Edit: Hmmm, maybe not.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is complicated

This speeds up syncing and there is no need to tally old blocks.
@denravonska denravonska merged commit 054f323 into gridcoin-community:hotfix Feb 23, 2018
@denravonska denravonska deleted the remove-retired-tally-thread branch February 23, 2018 04:01
denravonska added a commit that referenced this pull request Mar 1, 2018
Fixed:
 - Move context sensitive DPoR block checks to ConnectBlock, #912 (@tomasbrod).
 - Check incoming blocks for malformed DPoR signature, #912.
 - Corect tally height on init, #917 (@denravonska).
 - Prevent staking of a block with a failed signature, #948 (@Foggyx420).
 - Fix UI and RPC slowdown regression, #961 (@denravonska).
 - Fix Debian lint errors, #886, #885, #884, #883 (@caraka).
 - Fix fork issue due to research age calculation inconsistencies, #939
   (@denravonska).
 - Fix crashes when tallying, #934 (@denravonska).
 - Revert reorganize of the chain trust becomes less than what it was, #957
   (@tomasbrod).
 - Fix sync issues with incorrectly accepted v8 beacons, #979 (@tomasbrod).

Changed:
  - Double check PoS kernel, #958 (@tomasbrod).
  - Don't tally until V9 to speed up syncing, #943 (@denravonska).
  - Double check proof of stake kernel, #958 (@tomasbrod).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants