Author

Topic: [ANN][Library] PyBC Library (and coin!) 0.2: now with more GUI (Read 671 times)

full member
Activity: 141
Merit: 100
I've released version 0.2 of the PyBC generic blockchain module on PyPI. This library has everything you need to write your own altcoin in Python. It comes with an example coin (1 minute block time, SHA512 hashing, 50 indivisible coins per block forever). That coin now comes with a GUI, so people can actually use it.

To install PyBC for yourself:

Code:
pip install --user pybc

If you installed version 0.1 and want the new version 0.2:

Code:
pip install --user --upgrade pybc

The executables all go in ~/.local/bin. If you want the GUI, run:

Code:
~/.local/bin/pybc_cointk test.blocks test.keys --generate

This will start up a node listening on port 8008, storing block data in test.blocks, and encryption keys in test.keys (think wallet.dat). It also sets it generating blocks.

You can start up another node and tell it to talk to the first node:

Code:
~/.local/bin/pybc_cointk test2.blocks test2.keys --generate --peer_host localhost --peer_port 8008 --port 8009

This will start a second node with a different block store, a different set of keys, and a different listen port, and tell it to connect to the first node. They may fight over which blockchain is longer for a bit until they finally settle on one.

Once you have this all running, you can use the GUIs to send coins between the two instances. There's no transaction listing yet, but you can see your balance change. Note that you won't see your balance update until the next block (and your client won't know which of its unspent outputs it has used until the next block, and will cheerily generate double-spend transactions that miners will reject).

There's only UI for a single receiving address per node, and anonymizing transactions with new change addresses has not been implemented, but neither would be particularly difficult to add.

The whole thing works on Windows if you install:
  • Python
  • Visual C++ 2008 Runtime (an OpenSSL dependency)
  • OpenSSL (a pyelliptic dependency)
  • setuptools (a pip dependency)
  • pip (to install pyelliptic, which is a pure Python module with no Windows installer)
  • pyelliptic
  • Twisted
All of the appropriate architecture and Python version.

Thoughts and feature requests?

Jump to: