Git Product home page Git Product logo

cyber-blockchain's Introduction

blockchain-skeleton

Skeleton code for the Cyber x ICPC blockchain workshop

Getting Started

First, make a fork of this repository so that you have your own copy.

There's some code missing in the skeleton, but you should be able to run it even without filling it in.

  1. Using a Python package manager, install Flask.
  2. Run node.py.
  3. Make requests to the server! It will be running on localhost, Flask should tell you the port number. For making requests, you can use something like Postman.

In blockchain.py, the code for the check_proof and mine functions is missing. Go ahead and fill those in, and you have yourself a working centralized ledger system!

Next Steps

The code is pretty bare-bones, so there's a lot you could add.

Easy:

  • Timestamps on blocks
  • Add known users in the network and give them some starting money
  • Check that no one spends more money than they have
  • Ensure blocks all have a set number of transactions

Medium:

  • Add digital signatures (use another program to generate keys, and hard code in everyone's public keys)
  • Check that signatures are valid when checking the validity of a block

cyber-blockchain's People

Contributors

joshuazhu17 avatar anthonyfangqing avatar avdestroyer 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.