Requirements for "make-a-chain" project

For this project you will build a simple blockchain that, while not decentralized, has all the basic features of a public ledger with "mining" for committing transactions.

Recommended Starting Point

You can use whatever language you want, but it's easiest to do this in python and you MUST implement the blockchain bits yourself (no import Blockchain shortcuts).

Get Python 3 if you don't already have it. Install the packages you need.

Recommended tools and packages:

Create a "model" for your blockchain as a python class. To maintain consistency, use this "model" class in any server, daemon, or client programs you write.

Write some tests for your code. I used a bash script and curl command line tool to automatically make requests.

Minimum Requirements

  1. Your server maintains a ledger of transactions
  2. transactions are "committed" to hashed blocks via hashing when proofs are submitted to the server from "miners"
  3. Other computers mine proofs (do the proof of work algorithm) to help your server create blocks.
  4. When a miner submits a proof to the server, the server first verifies the correctness of the proof, then creates a new block using the proof and any "pending" transactions.
  5. Other computers can also submit transactions at any time.
  6. Upon request, your server will provide the entire chain via JSON

You must also implement:

Your hashes should all be SHA-256.

NOTE: it's ok for a basic implementation to "trust" transactions blindly, but it would be wise to do some basic double-spend checking when mining blocks. You are not required to implement key-based transaction verification for this project, but basic error checking is necessary.

API endpoints required

For your Blockchain Server component, you should implement at least the following HTTP-based API endpoints:

Advanced Features (optional)

Implementing these advanced features is optional.

Presentation

You'll present this project to the class as a group. During your presentation, you're expected to do the following:

  1. Describe the high-level architecture of your system. A whiteboard diagram or digital architectural diagram works.
  2. Explain (using diagrams, flows, or visual explanations of some sort) how a user of your blockchain performs the following operations
    • Request a new transaction
    • Mine a new block
    • Check their account balance
    • Verifiy a block
  3. Demonstrate your working blockchain's features and operations to the class.
  4. Show off the technologies you use for your blockchain backend stuff and the front-end (i.e., give us a quick tour of your code).

During these presentation activities, your project will be evaluated by your instructor and you will earn tokens by showing you completed things below (in the Grading section).

You are encouraged to be creative with your presentation. Sales pitches, fake scenarios, skits, and other fun presentation styles are welcome so long as you satisfy the requirements and show us how your blockchain works. Presentation tokens (in addition to the ones listed below) may be available and awarded for creativity.

Grading

You will earn up to four coder tokens for completing the minimum requirements.

You may earn up to two more coder tokens for completing two or more advanced features.

You will earn one presenter token for demonstrating all of the required features of your blockchain.

You may earn one analyst token for explaining non-trivial limitations of your design and how it might be misused. "We don't validate account ownership" is trivial, but explanations of why your consensus algorithm is flawed and how it can be exploited would be an example of something non-trivial.

You may earn one analyst token by identifying and explaining a non-trivial flaw in another project team's implementation.