Git Product home page Git Product logo

blockchain's Introduction

Simple Blockchain Implementation in Python

This is a simple blockchain implementation in Python. It includes functionalities such as adding users, adding transactions, mining blocks, verifying the chain's integrity, exploring the blockchain, and exiting the program through a menu-driven command-line interface (CLI).

Functionality

  • Add User: Add a new user to the blockchain with an initial balance.
  • Add Transaction: Perform a transaction between users, transferring tokens from one user to another.
  • Mine Block: Validate pending transactions, create a new block, and reward the miner with tokens.
  • Verify Chain: Check if the blockchain is valid and has not been tampered with.
  • Explore Blockchain: View all blocks in the blockchain and the current pending transactions.
  • Exit: Quit the program.

Requirements

  • Python
  • hashlib
  • json
  • time

Usage

  1. Clone the repository to your local machine:

    git clone https://github.com/Vikranth3140/BlockChain.git
  2. Navigate to the project directory:

    cd BlockChain
  3. Install the requred dependancies:

    pip install -r requirements.txt
  4. Run the BlockChain program:

    python main.py
  5. Follow the on-screen instructions to interact with the blockchain:

    • Add users with initial balances.
    • Add transactions between users.
    • Mine blocks to validate transactions and earn mining rewards.
    • Verify the integrity of the blockchain.
    • Explore the blockchain to view blocks and transactions.
    • Exit the program.

License

This project is licensed under the MIT License.

blockchain's People

Contributors

vikranth3140 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.