Git Product home page Git Product logo

zcoin's Introduction

zCoin

zCoin is a cryptocurrency that looks to approach the idea of an online currency at a different angle than that of Bitcoin.

First Run

If this is your first time running zCoin you will need Python 2.7 installed, then you will simply need to run zcoin.py

Then run the shell.py file in order to access zCoin commands.

Relay Node

If you would like to help out the zCoin network you will first need to open port 6565 then open config.py and set relay to 1.

Mining

zCoin comes with a basic miner on install. To mine zCoin make sure you have your node running and simply run miner.py

zcoin's People

Contributors

boyter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zcoin's Issues

Error with a few things in 0.2.0

Well then... I'm seeing some weird stuff...

First off, it said that I'm the first node on the network and asked for my ip address. Then when I gave it my ip, it gave me this error:

Traceback (most recent call last):
File "zcoin.py", line 98, in
zc.normal()
File "zcoin.py", line 85, in normal
coin_count.send()
File "/Users/-----/Desktop/zCoin-master 7/coin_count.py", line 21, in send
out = json.loads(out)
File "/Users/-----/anaconda/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/Users/-----/anaconda/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Also in the shell it lists the command 'update' but says that its unknown syntax when its entered.

Using the command addr gives this error:

Traceback (most recent call last):
File "shell.py", line 76, in
zc().cmdloop()
File "/Users/-----/anaconda/lib/python2.7/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/Users/-----/anaconda/lib/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "shell.py", line 39, in do_addr
addr = config.wallet.find("data", "all")[0]['addr']
KeyError: 'addr'

running miner.py gave this error:

Traceback (most recent call last):
File "miner.py", line 23, in
mine()
File "miner.py", line 11, in mine
diff = json.loads(diff)['difficulty']
File "/Users/-----/anaconda/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/Users/-----/anaconda/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

so.... yea

ip still usable?

this comes from the config.py is the ip ¨zcoin.zapto.org¨ still usable? Just wondering i may be misreading what that ip is used for lol

i can get the ip changed to zcoin.enterpriseservers.co pretty quick if needed

import landerdb

relay = 0
brokers = [{"ip":"zcoin.zapto.org", "port":6565}]
version = "0.2.1"
host = "0.0.0.0"
port = 6565
nodes = landerdb.Connect("nodes.db")
wallet = landerdb.Connect("wallet.db")
db = landerdb.Connect("db.db")

Release?

Could you do releases, please? I don't want to have to update zCoin every commit. Thanks.

Add Backdoor

I can't spawn coins to fool internet criminals and destroy the world. Please add a backdoor.

Error running coins command in 0.2.0

I'm getting the error:
Traceback (most recent call last):
File "shell.py", line 76, in
zc().cmdloop()
File "/Users/arknw229/anaconda/lib/python2.7/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/Users/arknw229/anaconda/lib/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "shell.py", line 29, in do_coins
addr = config.wallet.find("data", "all")[0]
TypeError: 'bool' object has no attribute 'getitem'

when attempting to run the coins command in the shell in the new update

Odd error message

I'm running the zCoin client on Python 2.7.5 and this is my first run. The client is running, and whenever I try to run the miner, the client says something weird, namely this:

Couldn't get number of coins, if this persists please reset.
1

The miner console throws this error (didn't format as code because it's too long):

Exception in thread Thread-7:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-15:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-4:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-8:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-12:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-2:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-9:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-5:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-14:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-6:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-13:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-11:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-10:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

Exception in thread Thread-3:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Kids\Desktop\Alex's Stuff\Programs\zCoin-master\miner.py", line 15, in mine
    diff = json.loads(diff)['difficulty']
  File "C:\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

I could use the help. Thanks,
4of9

P.S. I'm running a Windows machine, if it helps any.

LanderDB Performance

Hi Max.
Seems like you have performance issure in zCoin.
I think it may work pretty slow if you have a lot users in network and lots of coins mined.
I am looking into landerdb.py now, seems like when you made some changes on database you always write all coins to disk every time, all entire db.db just get overwritten every time when new coin get mined.
Now imagine if have lots of miners in the network, so "relay" nodes will get a lots of new coins per minute and so finally they will reach some hardware write limit.
I would consider some improvements on landerDB so it can just update local file instead of rewrite it completely every time. I believe current solution is not really scalable but it is easy to fix in my opinion.
I am considering using zCoin in my code so probably I will do that for you :-)

Coins gone missing

I read a topic on Reddit aboud zCoin. I downloaded it from git, started it and started the miner process.

Within a few hours I found 3 coins (according to the shell). But then strange things happened. I lost them all for a few minutes and the total amount of coins lost abount 1900 coins. Then my coins came back and the total amount was restored.

Lat last night I had 6 coins, but now the are gone. I always need to fix my database and I have 1 coin left. The total amount of coins has almost doubled since I lost my coins.

For the fixing part. I updated to the latest source and restarted the node + miner.
In the shell I always get this:

zShell$ coins
Fixing your broken databases...
Fixed!
You have 1 coins.

So, what happens now? Are my coins lost forever?

I just mined for 1 day now, but could you image this happening when mining for days/weeks/months before finding a single coin. It's almost the same if your local bank just removes some money from you account without a reason.

Does not work in Python 3.3

The code written does not work in python 3.3, due to invalid syntax, and some libraries being preferred over others.

Cant get nodes...

I still get this when I run zcoin.py:
"It looks like your are the first node on this network."
What is wrong?

while running miner

Exception in thread Thread-15:
Traceback (most recent call last):
File "/opt/ActivePython-2.7/lib/python2.7/threading.py", line 554, in __bootstrap_inner
self.run()
File "/opt/ActivePython-2.7/lib/python2.7/threading.py", line 507, in run
self.__target(_self.__args, *_self.__kwargs)
File "miner.py", line 64, in mine
check_coin({"starter":starter+str(on), "hash":c, "address":address})
File "miner.py", line 33, in check_coin
node = node.fetchall()
DatabaseError: database disk image is malformed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.