Skip to content

The training course for better understanding the blockchain from the ground up: a project template to create as simple as possible implementation of a blockchain.

License

Notifications You must be signed in to change notification settings

flowchain/blockchain-starter-kit

Repository files navigation

| 正體中文 |

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.

About

The training course for better understanding the blockchain from the ground up: a project template to create as simple as possible implementation of a blockchain.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published