Browse Source

PIP-0009: cosmetic fixes to PIP text

Herman Schoenfeld 6 years ago
parent
commit
c590ecd541
1 changed files with 10 additions and 11 deletions
  1. 10 11
      PIP/PIP-0009.md

+ 10 - 11
PIP/PIP-0009.md

@@ -393,13 +393,13 @@ Since the first round just hashes the block header, the base case for ```F``` is
 ```
 ```
     F(1) = 1
     F(1) = 1
 ```
 ```
+
 Since a hash at round x is the hash of the previous round **and** of round ```x-1``` of another nonce
 Since a hash at round x is the hash of the previous round **and** of round ```x-1``` of another nonce
 ```
 ```
     F(x) = 1 + F(x-1) + F(x-1)  
     F(x) = 1 + F(x-1) + F(x-1)  
 ```
 ```
 
 
-**NOTE** 
-The dependence on a previous random round 1..x-1 is omitted above since it's computationally inconsequential as this is always know for all x. It's only a salt needed to prevent certain GPU optimizations, and does not change the number of hashes in ```F```. 
+NOTE: complexity associated with expansion and contraction is ommitted here, since only interested in Hash complexity.
 
 
 Simplifying
 Simplifying
 ```
 ```
@@ -409,10 +409,9 @@ Simplifying
          = SUM(i=0, x-1) 2^i
          = SUM(i=0, x-1) 2^i
          = 2^x - 1
          = 2^x - 1
 ```
 ```
-
-Thus
+Adding the final "veneer" SHA2-256 round of RandomHash to ```2^x - 1``` gives:
 ```
 ```
-    F(x) = 2^x - 1
+    F(x) = 2^x
 ```
 ```
 
 
 #### Memory Consumption
 #### Memory Consumption
@@ -436,19 +435,19 @@ It follows that the total memory for the round is calculated as follows
 ```
 ```
 This can be seen by observing the memory-expansion factors in the diagram. Notice it starts at ```N-1``` for the first round and decreases every subsequent round. 
 This can be seen by observing the memory-expansion factors in the diagram. Notice it starts at ```N-1``` for the first round and decreases every subsequent round. 
 
 
-The total memory, ```G(N)``` is simply the sum of all the memory at each round
+The total memory consumed (in units M) is denoted ```G(N)```, and is simply the sum of all the memory at each round
 ```
 ```
-    G(N) = sum(i=1, N) TotalMemoryAtRound(i)
-         = sum(i=1, N) 2^(N-i) * (N-i)
-         = 2^N (N-2) + 2
+    G(N) = M * sum(i=1, N) TotalMemoryAtRound(i)
+         = M * sum(i=1, N) 2^(N-i) * (N-i)
+         = M * 2^N (N-2) + 2
 ```
 ```
 
 
 Thus,
 Thus,
 ```
 ```
-    G(N) = 2^N (N-2) + 2
+    G(N) = M * 2^N (N-2) + 2
 ```
 ```
 
 
-**NOTE**: For PascalCoin, ```N=5``` which results ```98``` units of memory for every single nonce. Choosing memory unit ```M=10kb``` results in approximately ```1MB``` per nonce. Quite low for a CPU, but bloats quickly for a GPU as mentioned below.
+**NOTE**: For PascalCoin, ```N=5``` which results ```98``` units of memory for every single nonce. Choosing memory unit ```M=50kb``` results in approximately ```4.8MB``` per nonce. Quite low for a CPU, but bloats quickly for a GPU as mentioned below.
 
 
 #### CPU Bias
 #### CPU Bias