new article

Previous topic - Next topic

zack

http://bitcoinmagazine.com/16748/truth-behind-truthcoin/

It would have been nice if this had mentioned the existence of the python minimal viable product. I am very desperate for testers.
https://github.com/zack-bitcoin/Truthcoin-POW

keystrike

#1
Excellent! I will check this out. I assume it runs on Windows - it just needs python, right? How large is the blockchain currently?

zack

It might run in Windows. It definitely runs in linux.
Requirements are python, and the python libraries numpy and cdecimal. 
I think the chain is around 4000 or 5000 blocks today I just started downloading.
If you have any suggestions, please don't hesitate to say them. I want to make this easier to use.

We are building the GUI now, but it still don't do everything.

One guy does everything in windows, maybe I can convince him to write his install steps. I will link him here.

prometheus


keystrike

Tried to get this up and running on Debian but no luck. Anyone know the equilavent package names on Debian? There was no libpython-dev. I was only able to get pip installed, not pip2.

https://github.com/Gallopsled/pwntools/issues/147

$ python2.7 threads.py
...
ImportError: No module named six.moves

$ python2.6 threads.py
...
ImportError: No module named cdecimal

zack

Thank you so much for testing it out. I am totally dependent upon people doing that.
Sorry that it was not able to work.

I am in the process of updating the code to get rid of numpy and six.moves dependencies.
If you wait a few days, that problem will disappear.

cdecimal is a little harder...
the decimal library does the same thing, but it is 100x slower.
I could set it up to default to decimal, so that people without cdecimal can try it out.

Making every machine round decimals the same way has been difficult. cdecimal is the best library so far, but it is hard to install.

I don't have a Debian machine to experiment with. If you manage to install cdecimal, please copy/paste the commands to me so that I can add them to my install page.

keystrike

#6
Cool! I think I got it to work. :) I had to install six for python2.7 with pip. So "pip install six". The problem was some libraries were installed on 2.6 and some on 2.7. So I selected 2.7 as the version to run and made sure everything was set up there. Are you also running on 2.7 or do you use 2.6? Just cleaning up some extraneous data on the system and I will report back soon.

:~/Truthcoin-POW$ python2.7 threads.py
:~/Truthcoin-POW$

Edit: Turns out it crashes. Here's the log file. Anything else I should look at?

$ cat log
ERROR:root:list index out of range
Traceback (most recent call last):
  File "threads.py", line 94, in <module>
    main(sys.argv[1])
IndexError: list index out of range

zack

ok, I added six to the readme.

"python2.7 threads.py" is not the correct command. Sorry the readme was wrong.

"python2.7 truth_cli.py start" will start the node. I updated the readme just now.

Thanks so much for testing it out and telling me what happened. I am in desperate need of people like you.

keystrike

Quote from: zack on November 10, 2014, 06:04:55 AM
ok, I added six to the readme.

"python2.7 threads.py" is not the correct command. Sorry the readme was wrong.

"python2.7 truth_cli.py start" will start the node. I updated the readme just now.

Thanks so much for testing it out and telling me what happened. I am in desperate need of people like you.
Glad to be able to help! Should I wait for an upgrade or try running this version?

keystrike

~/Truthcoin-POW$ python2.7 truth_cli.py start
what is your password?
_\]<Q4^\AkNu
starting truthcoin
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/home/ftp/elata/Truthcoin-POW/database.py", line 70, in run
    import leveldb
ImportError: No module named leveldb
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 850, in emit
Traceback (most recent call last):
  File "truth_cli.py", line 114, in <module>
    main()
  File "truth_cli.py", line 83, in main
    daemonize(lambda: threads.main(p))
  File "truth_cli.py", line 6, in daemonize
    if pid==0: f()
  File "truth_cli.py", line 83, in <lambda>
    daemonize(lambda: threads.main(p))
  File "/home/ftp/elata/Truthcoin-POW/threads.py", line 49, in main
    tools.db_put('test', 'TEST')
  File "/home/ftp/elata/Truthcoin-POW/tools.py", line 122, in db_put
    def db_put(key, dic, DB={}): return s_to_db({'type':'put', 'args':[str(key), dic]})
  File "/home/ftp/elata/Truthcoin-POW/tools.py", line 117, in s_to_db
    return s_to_db(c)
  File "/home/ftp/elata/Truthcoin-POW/tools.py", line 117, in s_to_db
    return s_to_db(c)
  File "/home/ftp/elata/Truthcoin-POW/tools.py", line 117, in s_to_db
    return s_to_db(c)
  File "/home/ftp/elata/Truthcoin-POW/tools.py", line 117, in s_to_db
    return s_to_db(c)
  File "/home/ftp/elata/Truthcoin-POW/tools.py", line 117, in s_to_db
    return s_to_db(c)
  File "/home/ftp/elata/Truthcoin-POW/tools.py", line 117, in s_to_db
    return s_to_db(c)
...

Had to Ctrl+C at that point.


keystrike

#10
I installed python leveldb and it seems like it is running! What next? :)

$ python2.7 truth_cli.py start
what is your password?
_\]<Q4^\AkNu
starting truthcoin


elata@delysid:~/Truthcoin-POW$ ./truth_cli.py blockcount
-1
elata@delysid:~/Truthcoin-POW$ ./truth_cli.py  getinfo
getinfo is not a command. use "./truth_cli.py commands" to get the list of truthshell commands. use "./truth_cli.py help help" to learn about the help tool.
elata@delysid:~/Truthcoin-POW$ ./truth_cli.py commands
[u'', u'DB', u'SVD_consensus', u'ask_decision', u'b', u'balance', u'blockcount', u'buy_shares', u'collect_winnings', u'commands', u'create_jury', u'difficulty', u'help', u'info', u'log', u'make_PM', u'mine', u'my_address', u'my_balance', u'new_address', u'peers', u'pushtx', u'reveal_vote', u'spend', u'start', u'stop', u'txs', u'vote_on_decision', u'votecoin_spend']
elata@delysid:~/Truthcoin-POW$ ./truth_cli.py peers
[[[u'192.241.212.114', 8900], 30.0, u'0', 0]]

Can you give me a peer to connect to? At the moment I see this in custom.py:

peers = [['192.241.212.114', 8900]]#,['69.164.196.239', 8900]]

I can run this node all the time if you need. I can give you an IP if you want.

zack

Great! you totally got it working!

At 10 AM yesterday when you did that I had turned off the network for an update. Sorry about that. I should have rebooted more quickly.
If you re-download truthcoin and try connecting again it should work. The networking node is now up and running.

It is great how you figured out how to run all the commands, and you figured out how to look in custom.py for the peers list.

If you add your IP to your list in custom.peers, then your node will tell the other nodes about the new IP.
If I run: './truth_cli.py peers' on my machine, it will tell my your IP.

keystrike

Thanks! :)

I added my IP to the list after updating from github, do you see it?

Right now I have 790 blocks. How many are there on the network?

:~/Truthcoin-POW-master$ ./truth_cli.py peers
[[[u'192.241.212.114', 8900], 29.997341544008435, u'65087e220d25be9aa61b48234ab659c746a070879578027b57864690f9679010a9b92c7b', 790], [[u'195.82.116.70', 8900], 19.760000000000005, u'65087e220d25be9aa61b48234ab659c746a070879578027b57864690f9679010a9b92c7b', 790], [[u'192.241.212.114', 8900], 5, u'0', 0]]

zack

there are 790 in the network.
You found a bug. Thank you. I will patch it soon so that you can add your IP.

keystrike

Quote from: zack on November 12, 2014, 07:06:29 PM
there are 790 in the network.
You found a bug. Thank you. I will patch it soon so that you can add your IP.
Awesome. :) Let me know! Then we can really get to testing.