Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Erunning/blockchain-in-python

Open more actions menu
 
 

Repository files navigation

Blockchain in Python

This work is based on adilmoujahid/blockchain-python-tutorial.

Novel Features

Compared with the original one, we now introduce:

  • PKC (coin name).
  • Constant wealth (1e8 coin in total).
  • Setting miner's information.
  • Balance check before every transaction.
  • Transaction failure alert.
  • Dynamic difficulty update every 2 weeks.
  • SSL support.
  • Save running states.

(Risky, not recommended) If you need SSL support, add certificate(inside certificates folder) to your system(cert.pem) or your browser(cert.p12).

Requirements

In order to run this code, you'll need:

  • python 3
  • pycrypto

To install the pycrypto:

pip instal pycrypto

Usage

To run blockchain node:

python blockchain/blockchain.py -p 5000

which we also support restoring to previous state with -r path\to\file.pkl. The default file of state is stored in states\blockchain.pkl.

To run blockchain client:

python blockchain_client/blockchain_client.py -p 8080

About

More features than the original one.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 63.3%
  • Python 36.6%
  • CSS 0.1%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.