• Stars
    star
    102
  • Rank 333,651 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created about 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

TinyCoin

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 README.md.

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. README.md -- This File
  3. base.py -- Some primitives and common imports
  4. transaction.py -- the way to build the instruction to tell the TinyCoin chain to spend an amount from A to B
  5. block.py -- The structure and header that transactions are bundled into
  6. chain.py -- The data structure that aggregates blocks together and checks for validity of blocks
  7. node.py -- the network code for talking to other users running TinyCoin and propagating blocks as well as interacting with clients.
  8. miner.py -- a client script that gets mining work from a running node
  9. tests.py -- 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

TODO

  1. Add a persistent client/wallet feature and more calls to node.py (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 node.py.
  5. Come up with some labs for adding certain features.
  6. More todos ;)

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

More Repositories

1

satoshis-version

Annotated version of Satoshi's original released codebase.
C++
87
star
2

BTCSpark

A toolkit for using apache spark to efficiently query Bitcoin Blockchain data.
Python
32
star
3

MAST

6.858 final project.
TeX
18
star
4

utxos.org

utxos.org site
SCSS
15
star
5

lazuli

Rust
9
star
6

forkd

Python
8
star
7

judge

An algorithm/Library for reducing multiple judge scores into meaningful rankings for hackathons or contests.
Python
8
star
8

Graffiti-codes

Graffiti Codes is a project out of the MIT Media lab for the creation of QR-like gesture codes. It is a work in progress!
Java
8
star
9

CTVSims

Simulations showing CTV is kickass
Python
6
star
10

tornado-trails

A tornado "rails-like" template with some dev tools for rolling out tornado quickly and cleanly.
JavaScript
5
star
11

pleb.fi

HTML
4
star
12

pokerbots2013

Our Pokerbot
Python
4
star
13

Lamport-Signatures

simple lamport signatures!
Python
4
star
14

cuckoocache

Rust
3
star
15

json-pointer

Rust
3
star
16

sapio-testsite

HTML
2
star
17

sapio-pod

A Podman/Docker compatible set of pods for Sapio development
Dockerfile
2
star
18

fucknazis-repo

JavaScript
2
star
19

BatteryBalance

A script to battery pack organization based on IR values.
Ruby
2
star
20

rubin.io

personal site!
SCSS
2
star
21

resume

This repo contains the tex and pdf for my resume.
TeX
2
star
22

xkcd-hashing

xkcd Hashing Script. Feel free to improve.
Python
1
star
23

Rock.jl

An implementation of Paxos in Julia with an example application. Work In Progress, not ready for production.
Julia
1
star
24

doge.js

wow such js library very used
1
star
25

6.115

6.115 labs
Assembly
1
star
26

Gistify

A utility to add gist creation to finder on mac.
Python
1
star
27

goIn

GoIn provides a golang middleware for user authentication.
Go
1
star
28

traject

Traject ify io or something, a way to scan accelerometer based codes. Under Developement
Python
1
star
29

tortise

Lesson 1 for my class
Python
1
star