|
@@ -141,11 +141,11 @@ bool make_reputation_proof(
|
|
const std::string& usageFilename)
|
|
const std::string& usageFilename)
|
|
{
|
|
{
|
|
std::vector<double> timingData(2);
|
|
std::vector<double> timingData(2);
|
|
- std::vector<size_t> bandwidthData(2), bandwidthDataMidA(2), bandwidthDataMidB(2);
|
|
+ std::vector<size_t> bandwidthData(2), checkForIssue(2);
|
|
- bandwidthData[0] = 0;
|
|
+
|
|
- bandwidthData[1] = 0;
|
|
+
|
|
|
|
|
|
- std::string extraOutput = outputFilename + ".extra";
|
|
+
|
|
|
|
|
|
std::vector<size_t> bandwidthDataBefore = get_server_log_data(civetServer.getContext());
|
|
std::vector<size_t> bandwidthDataBefore = get_server_log_data(civetServer.getContext());
|
|
std::chrono::high_resolution_clock::time_point wallTimeBefore = std::chrono::high_resolution_clock::now();
|
|
std::chrono::high_resolution_clock::time_point wallTimeBefore = std::chrono::high_resolution_clock::now();
|
|
@@ -156,8 +156,8 @@ bool make_reputation_proof(
|
|
Twistpoint freshGenerator = get_generator(rng, serverIPs, serverPorts, true, generatorProof, bandwidthData);
|
|
Twistpoint freshGenerator = get_generator(rng, serverIPs, serverPorts, true, generatorProof, bandwidthData);
|
|
|
|
|
|
|
|
|
|
- bandwidthDataMidA = bandwidthData;
|
|
+
|
|
- write_log_data(outputMtx, extraOutput, timingData, bandwidthData);
|
|
+
|
|
|
|
|
|
|
|
|
|
prsonaClient->receive_fresh_generator(generatorProof, freshGenerator);
|
|
prsonaClient->receive_fresh_generator(generatorProof, freshGenerator);
|
|
@@ -170,10 +170,10 @@ bool make_reputation_proof(
|
|
EGCiphertext encryptedScore = get_server_committed_val<EGCiphertext>(rng, serverIPs, serverPorts, REQUEST_CLIENT_TALLY_URI, REQUEST_CLIENT_TALLY_COMMITMENT_URI, encryptedScoreProof, shortTermPublicKey, bandwidthData);
|
|
EGCiphertext encryptedScore = get_server_committed_val<EGCiphertext>(rng, serverIPs, serverPorts, REQUEST_CLIENT_TALLY_URI, REQUEST_CLIENT_TALLY_COMMITMENT_URI, encryptedScoreProof, shortTermPublicKey, bandwidthData);
|
|
|
|
|
|
|
|
|
|
- bandwidthDataMidB[0] = bandwidthData[0] - bandwidthDataMidA[0];
|
|
+
|
|
- bandwidthDataMidB[1] = bandwidthData[1] - bandwidthDataMidA[1];
|
|
+
|
|
- bandwidthDataMidA = bandwidthData;
|
|
+
|
|
- write_log_data(outputMtx, extraOutput, timingData, bandwidthDataMidB);
|
|
+
|
|
|
|
|
|
|
|
|
|
prsonaClient->receive_vote_tally(encryptedScoreProof, encryptedScore);
|
|
prsonaClient->receive_vote_tally(encryptedScoreProof, encryptedScore);
|
|
@@ -191,9 +191,9 @@ bool make_reputation_proof(
|
|
char *responseFile = send_item(rng, target, targetPort, VERIFY_REPUTATION_PROOF_URI, data, true, bandwidthData);
|
|
char *responseFile = send_item(rng, target, targetPort, VERIFY_REPUTATION_PROOF_URI, data, true, bandwidthData);
|
|
|
|
|
|
|
|
|
|
- bandwidthDataMidB[0] = bandwidthData[0] - bandwidthDataMidA[0];
|
|
+
|
|
- bandwidthDataMidB[1] = bandwidthData[1] - bandwidthDataMidA[1];
|
|
+
|
|
- write_log_data(outputMtx, extraOutput, timingData, bandwidthDataMidB);
|
|
+
|
|
|
|
|
|
clock_t cpuTimeAfter = clock();
|
|
clock_t cpuTimeAfter = clock();
|
|
std::chrono::high_resolution_clock::time_point wallTimeAfter = std::chrono::high_resolution_clock::now();
|
|
std::chrono::high_resolution_clock::time_point wallTimeAfter = std::chrono::high_resolution_clock::now();
|
|
@@ -202,10 +202,12 @@ bool make_reputation_proof(
|
|
timingData[0] = std::chrono::duration_cast<std::chrono::duration<double>>(wallTimeAfter - wallTimeBefore).count();
|
|
timingData[0] = std::chrono::duration_cast<std::chrono::duration<double>>(wallTimeAfter - wallTimeBefore).count();
|
|
timingData[1] = ((double)(cpuTimeAfter - cpuTimeBefore)) / CLOCKS_PER_SEC;
|
|
timingData[1] = ((double)(cpuTimeAfter - cpuTimeBefore)) / CLOCKS_PER_SEC;
|
|
|
|
|
|
- bandwidthData[0] += bandwidthDataAfter[0] - bandwidthDataBefore[0];
|
|
+ checkForIssue[0] = bandwidthDataAfter[0] - bandwidthDataBefore[0];
|
|
- bandwidthData[1] += bandwidthDataAfter[1] - bandwidthDataBefore[1];
|
|
+ checkForIssue[1] = bandwidthDataAfter[1] - bandwidthDataBefore[1];
|
|
|
|
|
|
- write_log_data(outputMtx, outputFilename, timingData, bandwidthData);
|
|
+ bool corruption = checkForIssue[0] != 0 || checkForIssue[1] != 0;
|
|
|
|
+
|
|
|
|
+ write_special_log_data(outputMtx, outputFilename, timingData, bandwidthData, corruption);
|
|
write_usage_data(usageMtx, usageFilename);
|
|
write_usage_data(usageMtx, usageFilename);
|
|
|
|
|
|
|
|
|