Communication from the core client can easily be altered or forged. Some users will attempt to get undeserved credit by falsifying their CPU metrics or CPU times. Output files may be wrong. This can result from tampering or hardware failures.
Both problems - credit-cheating and wrong results - can be addressed by redundant computing and result validation. In this approach, each workunit is processed at least twice. The project back end waits until a minimum number of results have been returned, then compares the results and decides which are considered correct. The notion of equality of results, and the policy for deciding which are correct, are project-specific.
The back end then marks correct results as "validated", finds the minimum reported credit for the correct results of a given workunit, and assigns this amount of credit to all the correct results. This ensures that as long as a reasonable majority of participants don't falsify credit, almost all credit accounting will be correct.
int check_set(vectorcheck_set() takes a set of results. If there is sufficient agreement, it selects one of them as the "canonical" result (returning its ID) and also decides what credit should be granted for correct results for this workunit.results, int& canonicalid, double& credit); int check_pair(RESULT& r1, RESULT& r2, bool& match);
check_pair() compares two results and returns match=true if they agree.
The file validate_test.C contains an example implementation of check_set() and check_pair().
WORKUNIT
RESULT