Browse Source

(2,3)-sharing reconstruction done after eviction

Boyoung- 8 years ago
parent
commit
33e0736bf2
2 changed files with 20 additions and 7 deletions
  1. 17 4
      src/pir/PIREviction.java
  2. 3 3
      src/pir/PIRRetrieve.java

+ 17 - 4
src/pir/PIREviction.java

@@ -118,6 +118,15 @@ public class PIREviction extends Protocol {
 		}
 
 		pathBuckets[0].expand(Arrays.copyOfRange(originalPath, w, sw));
+
+		timer.start(pid, M.online_write);
+		con2.write(pid, pathBuckets);
+		timer.stop(pid, M.online_write);
+
+		timer.start(pid, M.online_read);
+		con2.readBucketArray(pid);
+		timer.stop(pid, M.online_read);
+
 		// OTi.setBucketsOnPath(new BigInteger(1, Li).longValue(), pathBuckets);
 
 		timer.stop(pid, M.online_comp);
@@ -171,9 +180,9 @@ public class PIREviction extends Protocol {
 		SSXOT ssxot = new SSXOT(con1, con2, 1);
 		ssxot.runD(predata, evict, timer);
 
-		timer.start(pid, M.online_read);
-		Bucket[] pathBuckets = con2.readBucketArray(pid);
-		timer.stop(pid, M.online_read);
+		// timer.start(pid, M.online_read);
+		// Bucket[] pathBuckets = con2.readBucketArray(pid);
+		// timer.stop(pid, M.online_read);
 
 		// OTi.setBucketsOnPath(new BigInteger(1, Li).longValue(), pathBuckets);
 
@@ -245,9 +254,13 @@ public class PIREviction extends Protocol {
 		pathBuckets[0].expand(Arrays.copyOfRange(originalPath, w, sw));
 
 		timer.start(pid, M.online_write);
-		con2.write(pid, pathBuckets);
+		con1.write(pid, pathBuckets);
 		timer.stop(pid, M.online_write);
 
+		timer.start(pid, M.online_read);
+		con1.readBucketArray(pid);
+		timer.stop(pid, M.online_read);
+
 		timer.stop(pid, M.online_comp);
 	}
 

+ 3 - 3
src/pir/PIRRetrieve.java

@@ -178,9 +178,9 @@ public class PIRRetrieve extends Protocol {
 		if (Global.cheat)
 			System.out.println("Cheat Mode is On");
 
-		int records = 5;
-		int reset = 1;
-		int repeat = 4;
+		int records = 30;
+		int reset = 5;
+		int repeat = 10;
 
 		int tau = md.getTau();
 		int numTrees = md.getNumTrees();