Giter Club home page Giter Club logo

basiccoin's Introduction

basiccoin

The simplest currency.

Donations: 1GbpRPE83Vjg73KFvTVZ4EnS2qNkiLY5TT

INSTALL (for ubuntu)

sudo apt-get install git
sudo apt-get install python-leveldb
git clone https://github.com/zack-bitcoin/basiccoin.git
cd basiccoin/

To run 1 node

python threads.py

To quickly run 5 nodes (linux/mac only)

./go.sh

Then send your browser to

http://localhost:8701
http://localhost:8702
http://localhost:8703
http://localhost:8704
http://localhost:8705

###Why do we need a simple currency

At the time of writing this there exist over 80 cryptocurrencies with market caps of over $100,000. According to Andreas Antonopolous, we will soon live in a world with millions of altcoins. It is incredibly risky to try to add new features to an old crypto. There is a high probability that you will introduce a bug. To combat this, each currency will have only one purpose. Bitcoin currently has 40445 lines of C++ and assembly, not including gui or tests. Very few people are able to read bitcoin. It is incredibly difficulty to adapt without breaking everything. Because of how hard it is to adapt bitcoin, all the altcoins have been very simplistic. They change magic numbers, and the name, and little else.

When things get complicated, it is good to return to the basics. The purpose of basiccoin is to be the simplest secure currency possible. Basiccoin is designed to be easily modified to create new alts.

###How do I read this?

This code is written functionally. Functions are only supposed to depend on functions that occur above them on the page. Generally people read such code starting at the bottom, because it is easier to understand the outline provided by high-level functions, instead of getting lost indetails of low-level functions.

bottom-up style explained by a master: http://paulgraham.com/progbot.html

###Why is this code so short?

http://paulgraham.com/power.html

###What are the priorities that shape coding-style?

  1. It should be a secure cryptocurrency.

  2. It should be easy to create altcoins with new features just by adding transactions types to the transactions.py file.

  3. The mental-size of a program is largely determined by how many parts of the program can alter the database. Hierarchy of who controls the blockchain:

    blockchain.db_put() and blockchain.db_delete() are low level functions that change the blockchain. blockchain.add_block() and blockchain.delete_block(), transactions.add_block(), and transactions.delete_block() are the only parts that use db_put and db_delete blockchain.add_block() and blockchain.delete_block() are the only functions that use transactions.add_block() and transactions.delete_block() consensus.mainloop() is the only thread which uses add_block() and delete_block().

  4. Do not allow repetitions in code.

  5. Use the name of a function or variable as the main form of commenting. If something is not clear, instead of adding comments, we just subdivide the complex task into smaller tasks, and accurately name those smaller tasks.

  6. Try to maximize number of ideas that fit on a screen at a time.

  7. pep8

###Features

  • Blockchain
  • mineable currency units
  • can create unique addresses
  • can spend the currency units to each other
  • Multisig escrow

basiccoin's People

Contributors

adam-wayne avatar chriscalderon avatar poppingtonic avatar toqueteos avatar zack-bitcoin 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.