cranklin / crankycoin Goto Github PK
View Code? Open in Web Editor NEWCranky Coin is a simple blockchain, cryptocurrency, wallet implementation
License: MIT License
Cranky Coin is a simple blockchain, cryptocurrency, wallet implementation
License: MIT License
File "/home/user/Desktop/crankycoin/crankycoin/repository/blockchain.py", line 236, in get_reward
for i in range(1, ((height, / self.HALVING_FREQUENCY) + 1)):
TypeError: 'float' object cannot be interpreted as an integer
This project is a nice reference implementation of a simple cryptocurrency, as such it would be nice to have it with Python 3 support, because it enables more people to test it out. I think a run of 2to3 will suffice, but I will test that out soon.
Hi, found your code searching for example to create my own coin. Interesting code, did you try to publish your coin at index pages like coinmarketcap.com, its still not listed, why?
File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "C:\Python27\lib\pickle.py", line 655, in save_dict
self._batch_setitems(obj.iteritems())
File "C:\Python27\lib\pickle.py", line 687, in _batch_setitems
save(v)
File "C:\Python27\lib\pickle.py", line 306, in save
rv = reduce(self.proto)
TypeError: can't pickle thread.lock objects
C:\Users******\Desktop\crankycoin-master (1)\crankycoin-master>Trace
cent call last):
File "", line 1, in
File "C:\Python27\lib\multiprocessing\forking.py", line 381, in m
self = load(from_parent)
File "C:\Python27\lib\pickle.py", line 1384, in load
return Unpickler(file).load()
File "C:\Python27\lib\pickle.py", line 864, in load
dispatchkey
File "C:\Python27\lib\pickle.py", line 886, in load_eof
raise EOFError
EOFError
Hi,
I tried to run the command publickey but I got the below error. Any idea hoe to fix this?
Cranky Coin (CRNK) wallet > publickey
Traceback (most recent call last):
File "run.py", line 218, in
main(sys.argv[1:])
File "run.py", line 210, in main
client()
File "run.py", line 75, in client
print(wallet.get_public_key())
File "/home/jani/crankycoin-master/crankycoin/wallet.py", line 27, in get_public_key
return self.public_key.to_hex()
AttributeError: 'PublicKey' object has no attribute 'to_hex'
This is the first time I'm running this and there is no publickey but I think it should be created now.
(venv) PS C:\Users\User\crankycoin> py .\run.py full
full node starting...
DEBUG:crankycoin:queue process starting...
DEBUG:crankycoin:worker process(es) starting...
Traceback (most recent call last):
File ".\run.py", line 218, in <module>
main(sys.argv[1:])
File ".\run.py", line 212, in main
full()
File ".\run.py", line 119, in full
full_node.start()
File "C:\Users\User\crankycoin\crankycoin\node.py", line 79, in start
wp.start()
File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\multiprocessing\popen_spawn_win32.py", line 65, in __init__
reduction.dump(process_obj, to_child)
File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'ConfigDict.__init__.<locals>.<lambda>'
[INFO/MainProcess] process shutting down
[DEBUG/MainProcess] running all "atexit" finalizers with priority >= 0
[INFO/MainProcess] calling join() for process Process-1
Traceback (most recent call last):
File "<string>", line 1, in <module>
[INFO/Process-1] child process calling self.run()
File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\multiprocessing\spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input
[INFO/Process-2] process shutting down
[DEBUG/Process-2] running all "atexit" finalizers with priority >= 0
[DEBUG/Process-2] running the remaining "atexit" finalizers
[INFO/Process-1] process shutting down
[DEBUG/Process-1] running all "atexit" finalizers with priority >= 0
[DEBUG/Process-1] running the remaining "atexit" finalizers
Process Process-1:
Traceback (most recent call last):
File "C:\Users\User\crankycoin\crankycoin\services\queue.py", line 18, in start_queue
frontend.bind(cls.QUEUE_BIND_IN)
File "zmq\backend\cython\socket.pyx", line 547, in zmq.backend.cython.socket.Socket.bind
File "zmq\backend\cython\checkrc.pxd", line 25, in zmq.backend.cython.checkrc._check_rc
zmq.error.ZMQError: Protocol not supported
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\multiprocessing\process.py", line 258, in _bootstrap
self.run()
File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\multiprocessing\process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\User\crankycoin\crankycoin\services\queue.py", line 26, in start_queue
logger.error("could not start queue: %s", e.message)
AttributeError: 'ZMQError' object has no attribute 'message'
[INFO/Process-1] process exiting with exitcode 1
[DEBUG/MainProcess] running the remaining "atexit" finalizers
Choose a passphrase:
Re-enter passphrase:
Secret: ****
Traceback (most recent call last):
File ".\tools\encrypt.py", line 22, in <module>
hashedpass = hashlib.sha256(passphrase).digest()
TypeError: Unicode-objects must be encoded before hashing
Opening a PR to fix this
Hello, i try to run crankycoin, i do python run.py
but i receive this message "Node operation mode not specified", what i need to do?
Among those two suggestions, perhaps we could consider migrating to sockets rather than HTTP requests? Major performance improvements are possible by doing so, as sockets are far more efficient than HTTP.
Hi!
Thank you for this great project!
I had a confusion with the calculate_hash_difficulty()
function in blockchain.py
. Shouldn't we divide the calculated timestamp_data
by DIFFICULTY_ADJUSTMENT_SPAN
, as we want to adjust the difficulty for just one block?
Traceback (most recent call last):
File ".\run.py", line 218, in <module>
main(sys.argv[1:])
File ".\run.py", line 210, in main
client()
File ".\run.py", line 75, in client
print(wallet.get_public_key())
File "C:\Users\Aareon\crankycoin\crankycoin\wallet.py", line 26, in get_public_key
return self.__public_key__.format(compressed=True).encode('hex')
AttributeError: 'bytes' object has no attribute 'encode'
Opening a PR to rectify this
Issue was caused on a new installation in a new venv
. This was caused because the ./data/
folder did not exist.
We should have a check to see if the directory exists at launch before trying to connect.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.