Comments (3)
Hm.
zooko@spark ~/playground/zcash-pow/reference/python $ python pow.py -n 2 -k 3 -d 2
Miner starting
- n: 2
- k: 3
- d: 2
Traceback (most recent call last):
File "pow.py", line 188, in <module>
mine(args.n, args.k, args.d)
File "pow.py", line 147, in mine
x = gbp_basic(curr_digest, n, k)
File "pow.py", line 65, in gbp_basic
if not has_collision(X[j][0], X[k][0], i, collision_length):
File "pow.py", line 28, in has_collision
return reduce(lambda x, y: x and y, res)
TypeError: reduce() of empty sequence with no initial value
from zcash-pow.
zooko@spark ~/playground/zcash-pow/reference/python $ python pow.py -n 32 -k 4 -d 99
Miner starting
- n: 32
- k: 4
- d: 99
Traceback (most recent call last):
File "pow.py", line 188, in <module>
mine(args.n, args.k, args.d)
File "pow.py", line 147, in mine
x = gbp_basic(curr_digest, n, k)
File "pow.py", line 65, in gbp_basic
if not has_collision(X[j][0], X[k][0], i, collision_length):
File "pow.py", line 28, in has_collision
return reduce(lambda x, y: x and y, res)
TypeError: reduce() of empty sequence with no initial value
from zcash-pow.
This is probably because I have not constrained the input parameters. Per the paper, the implementation is easiest when n/(k+1) = 0 mod 8
so we are working with integer numbers of bytes, and my implementation does leverage this.
from zcash-pow.
Related Issues (12)
- I am learning Zcash how it work by reading code,but this codes seems does not work. HOT 2
- have problem with print-soln HOT 1
- how to use it with python3?
- Python3 Implementation
- Use python2 by default
- local variable 'bar' referenced before assignment
- Failure in progressbar plot in the final round routine HOT 4
- Implementation still in sync with zcash's C++ one? HOT 2
- Remove the n/(k+1) restriction HOT 1
- Digest length used in print-soln HOT 5
- Whats the expand_array function for? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zcash-pow.