|
@@ -141,7 +141,7 @@ bool make_reputation_proof(
|
|
|
const std::string& usageFilename)
|
|
|
{
|
|
|
std::vector<double> timingData(2);
|
|
|
- std::vector<size_t> bandwidthData(2), bandwidthDataMidA, bandwidthDataMidB, bandwidthDataMidC;
|
|
|
+ std::vector<size_t> bandwidthData(2), bandwidthDataMidA(2), bandwidthDataMidB(2);
|
|
|
bandwidthData[0] = 0;
|
|
|
bandwidthData[1] = 0;
|
|
|
|
|
@@ -155,12 +155,9 @@ bool make_reputation_proof(
|
|
|
std::vector<Proof> generatorProof;
|
|
|
Twistpoint freshGenerator = get_generator(rng, serverIPs, serverPorts, true, generatorProof, bandwidthData);
|
|
|
|
|
|
- // EXTRA
|
|
|
- bandwidthDataMidA = get_server_log_data(civetServer.getContext());
|
|
|
- bandwidthDataMidB[0] += bandwidthDataMidA[0] - bandwidthDataBefore[0];
|
|
|
- bandwidthDataMidB[1] += bandwidthDataMidA[1] - bandwidthDataBefore[1];
|
|
|
-
|
|
|
- write_log_data(outputMtx, extraOutput, timingData, bandwidthDataMidB);
|
|
|
+ // EXTRA 1
|
|
|
+ bandwidthDataMidA = bandwidthData;
|
|
|
+ write_log_data(outputMtx, extraOutput, timingData, bandwidthData);
|
|
|
|
|
|
// Load fresh generator into client object
|
|
|
prsonaClient->receive_fresh_generator(generatorProof, freshGenerator);
|
|
@@ -172,11 +169,10 @@ bool make_reputation_proof(
|
|
|
std::vector<Proof> encryptedScoreProof;
|
|
|
EGCiphertext encryptedScore = get_server_committed_val<EGCiphertext>(rng, serverIPs, serverPorts, REQUEST_CLIENT_TALLY_URI, REQUEST_CLIENT_TALLY_COMMITMENT_URI, encryptedScoreProof, shortTermPublicKey, bandwidthData);
|
|
|
|
|
|
- // EXTRA
|
|
|
- bandwidthDataMidC = get_server_log_data(civetServer.getContext());
|
|
|
- bandwidthDataMidB[0] += bandwidthDataMidC[0] - bandwidthDataMidA[0];
|
|
|
- bandwidthDataMidB[1] += bandwidthDataMidC[1] - bandwidthDataMidA[1];
|
|
|
-
|
|
|
+ // EXTRA 2
|
|
|
+ bandwidthDataMidB[0] = bandwidthData[0] - bandwidthDataMidA[0];
|
|
|
+ bandwidthDataMidB[1] = bandwidthData[1] - bandwidthDataMidA[1];
|
|
|
+ bandwidthDataMidA = bandwidthData;
|
|
|
write_log_data(outputMtx, extraOutput, timingData, bandwidthDataMidB);
|
|
|
|
|
|
// Load this current encrypted score into client object
|
|
@@ -194,12 +190,9 @@ bool make_reputation_proof(
|
|
|
// Send that proof to a chosen client (and set up a file to receive whether or not the client accepted the proof)
|
|
|
char *responseFile = send_item(rng, target, targetPort, VERIFY_REPUTATION_PROOF_URI, data, true, bandwidthData);
|
|
|
|
|
|
- // EXTRA
|
|
|
- bandwidthDataMidA = get_server_log_data(civetServer.getContext());
|
|
|
- bandwidthDataMidB[0] += bandwidthDataMidA[0] - bandwidthDataMidC[0];
|
|
|
- bandwidthDataMidB[1] += bandwidthDataMidA[1] - bandwidthDataMidC[1];
|
|
|
-
|
|
|
- write_log_data(outputMtx, extraOutput, timingData, bandwidthData);
|
|
|
+ // EXTRA 3
|
|
|
+ bandwidthDataMidB[0] = bandwidthData[0] - bandwidthDataMidA[0];
|
|
|
+ bandwidthDataMidB[1] = bandwidthData[1] - bandwidthDataMidA[1];
|
|
|
write_log_data(outputMtx, extraOutput, timingData, bandwidthDataMidB);
|
|
|
|
|
|
clock_t cpuTimeAfter = clock();
|