|
@@ -393,13 +393,13 @@ Since the first round just hashes the block header, the base case for ```F``` is
|
|
|
```
|
|
|
F(1) = 1
|
|
|
```
|
|
|
+
|
|
|
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)
|
|
|
```
|
|
|
|
|
|
-**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
|
|
|
```
|
|
@@ -409,10 +409,9 @@ Simplifying
|
|
|
= SUM(i=0, x-1) 2^i
|
|
|
= 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
|
|
@@ -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.
|
|
|
|
|
|
-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,
|
|
|
```
|
|
|
- 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
|
|
|
|