GithubHelp home page GithubHelp logo

blockchain_ledger's Introduction

blockchain_ledger

Usage

PyChain with added blocks

Validated Blockchain This project aims to create a fully functional blockchain. To start, a 'Record' class is created, which stores the sender id, the recipient id, and the amount that the sender wants to send. Next, a block class is created, which contains the recod class, the creator id of the creator of the clock, the hash of the previous block, and the nonce (number only used once) of the block. Also included in the block class is the hash_block method. This method uses the sha256 function to encrypt the record, creator id, timestamp, previous hash, and nonce. The final class created is the blockchain itself. This class consists of the chain, which is a list of the blocks, and the mining difficulty. This class also consists of several methods. The first is proof_of_work, this method determines the has dificulty and prints 'winning hash' once the correct hash has been calculated. The second method is add_block, this method adds the block to the blockchain once the block is returned from proof_of_work. The final method within the PyChain class is is_valid, this method ensures that the block hashes do not change and is validated every time a new block is added. Finally, this project includes streamlit code to turn the project into a web application to be used by other users. As shown in the above images, the webpage allows users to enter values for sender, recipient, value (how much of the currency they want to send), add the block, adjust the mining dificulty (the length of the hash), and test the validity of the whole blockchain.

Technologies

This is written in python using hashlib, streamlit, dataclasses, typing, and pandas.

Creator

William Scolinos | [email protected]

blockchain_ledger's People

Contributors

billysco avatar

Watchers

 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.