Skip to content

himalayasharma/elementary-blockchain

Repository files navigation


Logo

Elementary blockchain

GitHub Repo stars GitHub forks GitHub pull requests GitHub issues

The project involved the implementation of a blockchain model using an object-oriented approach. The model was equipped with several functionalities including the ability to view the chain, mine blocks using a simple proof of work algorithm, evaluate validity, and ensure traceability in case of any unauthorized modifications.

Checkout the web application here.

NOTE: There could be some issues when viewing the current blockchain after mining/modifying a block. This is due to the browser cache. You can use the "Reset blockchain" button or alternatively open the app in incognito mode.

Project Organization

├── LICENSE
├── Makefile              <- Makefile with commands like `make create_environment` or `make requirements`
├── README.md             <- The top-level README for developers using this project
├── readme-assets         <- Contains images to be used in README.md
├── static               
│   └── css               <- Contains stylesheet for styling webpage
│
├── templates             <- Contains html templates to be rendered
├── requirements.txt      <- The requirements file for reproducing the project environment
├── test_environment.py   <- Script to test virtual environment
├── blockchain.py         <- Contains blockchain class
├── Procfile              <- Deployment specific requirement (for Heroku)
└── app.py                <- Contains code for application

Prerequisites

Before you begin, ensure you have met the following requirements:

  • You have a Linux/Mac/Windows machine.
  • You have installed a python distribution. conda is preferred.
  • You have installed pip.
  • You have installed make.

Setup

  1. Clone the repo
    git clone https://github.com/himalayasharma/elementary-blockchain.git
    
  2. Traverse into project directory.
  3. Create virtual environment.
    make create_environment
  4. Activate virtual environment.
  5. Download and install all required packages.
    make requirements
  6. Start application (in debug mode).
    make app

Web Application Screenshots

Screenshot 1: A brief introduction of what a blockchain is.

alt text

Screenshot 2: Functionality to mine block.

alt text

Screenshot 3: Checks to ensure validity and view current blockchain.

alt text

Screenshot 4: Functionality to modify existing blockchain along with an option to reset it completely.

alt text

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. If you have a suggestion that would make this better, please fork the repo and create a pull request. Don't forget to give the project a star! Thanks again!

  1. Fork this repository.
  2. Create a branch: git checkout -b <branch_name>.
  3. Make your changes and commit them: git commit -m '<commit_message>'
  4. Push to the original branch: git push origin <project_name>/<location>
  5. Create the pull request.

Alternatively see the GitHub documentation on creating a pull request.

License

Distributed under the MIT License. See LICENSE.txt for more information.

Ackowledgements