Code Monkey home page Code Monkey logo

blockchain's Introduction

Overview of the NIST Blockchain Prototypes Stephen Nightingale, NIST Information Technology Laboratory May 2017

Bitcoin is the first and the iconic instance of a Blockchain application for a cryptocurrency. It has the original (nakamoto) implementation in C++, and a later implementation in GOlang, available on GitHub (https://github.com/btcsuite/btcd). In full, it is a cryptocurrency with decentralized control of the ledger, and universal access. Anyone can participate as a wallet user,, getting and spending Bitcoins, or by deploying a node, tracking and mining Bitcoins and contributing to the ledger maintenance.

Bitcoin introduced a new data structure, the blockchain, as a secure public means of storing and transferring currency, and other information. It employs cryptographic concepts and tools such as public/private key pairs, and hashes (and hashes of hashes). Since the implementation employs complex layers of dereferencing, it is difficult code to read, understand and modify. The object of this project, then, is to develop cryptocurrency models from the simplest, to the progressively more complex, while introducing concepts using in the development of Bitcoin.

We hope that this will offer the curious a path to understanding Bitcoin, and code to use to develop alternative concepts. It is offered as a tool for modelling Blockchain development and exploration.

All the early models in this repository are centralized. A summary of the existing models is:

Model 0: introduces immutable coins, identified by transaction ID, with ownership identified by hash. The ledger is a linear list. The outputs are signed by the sender to indicate transfer of ownership. README0.txt inside this folder explains how the original model works.

Model 1: introduces transactions that aggregate value in one, or few, coins, where the sender pays the receiver and gives 'change' back to himself. README1.txt inside this folder explains how the first upgrade works.

Model 2: extends the ledger to include blocks which are backchained by hash pointers, with each block containing a Merkle Tree having 2**N transactions. README2.txt inside this folder explains how the second upgrade works.

Forthcoming models not yet installed here:

Model 3: introduces payment by Scripts, where the new owner of a coin value stipulates the procedure by which it can be redeemed.

Install, Compile, Explore:

The project is developed using Golang version 1.6. Once you have that installed, with your $GOPATH set, everything can be compiled using: $ python gobuilder.py

Individual Golang module functions are illuminated by:

$ python helpers.py unblock.go (or genesis.go, or ...)

blockchain's People

Contributors

pimroad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blockchain's Issues

README1.txt

The file Model1/README1.txt does not exist. Please check it into the repository, or remove the reference to it in the top-level README.md.

documentation

This is a great tool, but hard to discover organically. Improving the documentation would help to explain the intent of this code and help search engines index this work.

Project license

I cannot find a license file in the repository. Looking at some other NIST projects under the same Github organization I can see licenses like this from fipy. Does this repository have the same license?

build errors

I have very little experience with Go, and am having difficulty building the executables in this project. When I execute

GOPATH=$(pwd) python gobuilder.py

it throws errors similar to the following:

cd himitsu and go install
himitsu.go:14:3: cannot find package "currency/hashes" in any of:
        /usr/lib/go-1.7/src/currency/hashes (from $GOROOT)
        ${Blockchain}/Model0/src/currency/hashes (from $GOPATH)
Error =  None

cd methods and go install
methods.go:9:3: cannot find package "currency/himitsu" in any of:
        /usr/lib/go-1.7/src/currency/himitsu (from $GOROOT)
        ${Blockchain}/Model0/src/currency/himitsu (from $GOPATH)
methods.go:10:3: cannot find package "currency/structures" in any of:
        /usr/lib/go-1.7/src/currency/structures (from $GOROOT)   
        ${Blockchain}/Model0/src/currency/structures (from $GOPATH)
Error =  None

cd newtxes and go install
newtxes.go:5:3: cannot find package "currency/himitsu" in any of:
        /usr/lib/go-1.7/src/currency/himitsu (from $GOROOT)
        ${Blockchain}/Model0/src/currency/himitsu (from $GOPATH)
newtxes.go:6:3: cannot find package "currency/methods" in any of:
        /usr/lib/go-1.7/src/currency/methods (from $GOROOT)
        ${Blockchain}/Model0/src/currency/methods (from $GOPATH)
newtxes.go:7:3: cannot find package "currency/structures" in any of:
        /usr/lib/go-1.7/src/currency/structures (from $GOROOT)   
        ${Blockchain}/Model0/src/currency/structures (from $GOPATH)
Error =  None

Am I missing key dependencies, or misconfiguring GOPATH?

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.