Skip to content

Commit

Permalink
Updated Ethash (markdown)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuterin committed Feb 22, 2015
1 parent ed6120a commit 6ab70e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Ethash.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def mkcache(params, seed):
for _ in range(CACHE_ROUNDS):
for i in range(n):
v = o[i][0] % n
o[i] = sha3_512(xor(o[(i-1+n)%n], o[v]))
o[i] = sha3_512(map(xor, o[(i-1+n)%n], o[v]))

return o
```
Expand Down Expand Up @@ -231,7 +231,7 @@ def sha3_256(x):
hash_words(lambda v: sha3.sha3_256(v).digest(), x)

def xor(a, b):
return ''.join([chr(ord(x) ^ ord(y)) for x, y in zip(a, b)])
return a ^ b
```

The following lookup tables provide approximately 7 years of tabulated DAG and cache sizes. They were generated with the following *Mathematica* functions:
Expand Down

0 comments on commit 6ab70e1

Please sign in to comment.