Project template to create as simple as possible implementation of a blockchain
JavaScript
Latest commit 388cf69 Dec 12, 2016 @jollen update
Permalink
Failed to load latest commit information.
libs minor updates Dec 13, 2016
server release v0.0.1 Dec 7, 2016
tests release v0.0.1 Dec 7, 2016
utils release v0.0.1 Dec 7, 2016
.editorconfig first commit Dec 4, 2016
.gitignore first commit Dec 4, 2016
LICENSE first commit Dec 4, 2016
README.md update Dec 13, 2016
README_zh-TW.md add english readme Dec 13, 2016
config.js release v0.0.1 Dec 7, 2016
index.js minor updates Dec 13, 2016
node1.js update README.md Dec 13, 2016
package.json release v0.0.1 Dec 7, 2016

README.md

| 正體中文 |

Project template to create as simple as possible implementation of a blockchain with Node.js 4+ and JavaScript.

Blockchain Starter Kit

An extremely simple blockchain: a project template to create as simple as possible blockchain system.

Block # 0, also known as Genesis Block, is the first block of its blockchain system. This project provides a minimal blockchain implementation for teaching and research, and you can be provided the simplest way to understand the blockchain.

Features

  • Import Genesis Block
  • An exetremly simple mining algorithm
  • A simple and lightweight REST-style RPC system
  • A p2p network system over WebSocket
  • There is no proof-of-work implementation

Testing

To start a miner node:

git clone https://github.com/jollen/blockchain-starter-kit.git
cd blockchain-starter-kit
npm install
node index.js

The server will start at localhost:8000 by default. To start another miner node at port 8001 and join an existing network:

export PORT=8001
node node1.js

After index.js has been joined, its successor will become node1.js. To fix the default join node, please open node1.js and modify the join property:

server.start({
    onstart: onstart,
    onmessage: onmessage,
    join: {
        address: 'localhost',
        port: 8000
    }
});

License

Copyright (C) 2016-present Jollen. The source code is licensed under the MIT license found in the LICENSE file.