Giter VIP home page Giter VIP logo

py-blockchain-proto's Introduction

python-chain

POC of blockchain using python. Based on Haseeb Qureshi's presentation: https://github.com/Haseeb-Qureshi/lets-build-a-blockchain

The front end is an api, developped with flask_restplus to generate a swagger interface

goal is to be able to start several clients on localhost with different ports and have the blockchain broadcasted between the nodes.

how to use: start 3 nodes/client instances:

py app.py 8888 alice 8888 h

py app.py 8889 bob 8888 h

py app.py 8890 charlie 8888,8889 d

alice and bob are honest nodes/clients charlie is dishonest

the genesis block generates 1000 tokens for alice

from alice's node, send transaction of 200 tokens from alice to bob -> accepted by all 3 nodes from charlie's node, send transaction of 100 tokens from charlie to alice -> rejected by alice's and bob's nodes from bob's node, send transacction of 100 tokens to alice -> accepted by alice's and bob's nodes

future possible improvements:

  • provide cryptographic transaction signature + verification
  • implement gossip protocol with ability for a node to drop out and resynchronize

py-blockchain-proto's People

Contributors

pierre-muller avatar

Watchers

James Cloos avatar

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.