Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


What is TinyCoin?

The goal of TinyCoin is to provide a simple teaching cryptocurrency.

It is not "industrial quality", with an emphasis on simplicity over robustness.

It is a work in progress and is not feature complete at this point, however it is usable as an educational tool.

TinyCoin has the following constraint: total size of executable code should not exceed 1000 lines of code or teachable in an hour or two. This limit does not include tests or the

This initial version was put together in a couple of hours for HackMIT HackWeek 2015.

Fetching dependencies

Please fetch the required dependencies (preferably in a virtual environment) by running pip install -r requirements.txt

Repo Overview

  1. LICENSE -- MIT License
  2. -- This File
  3. -- Some primitives and common imports
  4. -- the way to build the instruction to tell the TinyCoin chain to spend an amount from A to B
  5. -- The structure and header that transactions are bundled into
  6. -- The data structure that aggregates blocks together and checks for validity of blocks
  7. -- the network code for talking to other users running TinyCoin and propagating blocks as well as interacting with clients.
  8. -- a client script that gets mining work from a running node
  9. -- A (growing!) set of tests to ensure proper behavior. Full testing is not needed as certain "industrial strength" classes of errors should be ignored for simplicity


  1. Add a persistent client/wallet feature and more calls to (perhaps spv)
  2. Fix bugs in the networking code
  3. Refactor the transaction format to be simpler
  4. Provide a better mechanism for peering than local_peers in
  5. Come up with some labs for adding certain features.
  6. More todos ;)

Pull requests welcome! Please keep in mind simplicity & teaching over correctness.


A small, horrible, cryptocurrency in Python for educational purposes. Should be teachable in an hour or so, good for experimentation.







No releases published


No packages published