All Projects → amazingandyyy → blockchain-in-node

amazingandyyy / blockchain-in-node

Licence: MIT license
This is an afternoon-project, a blockchain built in node, supporting PoW.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to blockchain-in-node

Wave
🌊 Declarative chainable animations in Swift
Stars: ✭ 119 (+495%)
Mutual labels:  chain
Whitepaper
免费分享区块链白皮书,涉及各门各派。内容均来自互联网,如果侵权,请联系删除。 区块链白皮书 weixin:mipengchong
Stars: ✭ 175 (+775%)
Mutual labels:  chain
fabric-iot
fabric-iot is a Blockchain Based Decentralized Access Control System in IoT
Stars: ✭ 50 (+150%)
Mutual labels:  chaincode
Thaler
Thaler Experimental Network; For Crypto.org Chain: github.com/crypto-org-chain/chain-main
Stars: ✭ 142 (+610%)
Mutual labels:  chain
Kzmooncommand
🔥 An awesome command for async operation with ReactiveCocoa
Stars: ✭ 164 (+720%)
Mutual labels:  chain
Jest Chain
Chain Jest matchers together to create one powerful assertion 🃏⛓
Stars: ✭ 235 (+1075%)
Mutual labels:  chain
Rye
A tiny http middleware for Golang with added handlers for common needs.
Stars: ✭ 95 (+375%)
Mutual labels:  chain
chimera-framework
Simple Language Agnostic Framework for Stand Alone and Distributed Computing
Stars: ✭ 17 (-15%)
Mutual labels:  chain
Metasync
Asynchronous Programming Library for JavaScript & Node.js
Stars: ✭ 164 (+720%)
Mutual labels:  chain
PancakeTokenSniper
BSC BNB Pancake token sniper, buy, take profit and rug check
Stars: ✭ 184 (+820%)
Mutual labels:  chain
Workflow
一个工作流平台
Stars: ✭ 1,888 (+9340%)
Mutual labels:  chain
It Chain
Lightweight & Customizable Block Chain
Stars: ✭ 164 (+720%)
Mutual labels:  chain
Chain
链喵 CMDB 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!
Stars: ✭ 240 (+1100%)
Mutual labels:  chain
Lsanimator
⛓ Easy to Read and Write Multi-chain Animations Lib in Objective-C and Swift.
Stars: ✭ 1,576 (+7780%)
Mutual labels:  chain
MLChainDemo
链式文件生成器原理分析(一)
Stars: ✭ 18 (-10%)
Mutual labels:  chain
Chain Main
Crypto.org Chain⛓: Croeseid Testnet and beyond development
Stars: ✭ 109 (+445%)
Mutual labels:  chain
Ppipe
pipes values through functions, an alternative to using the proposed pipe operator ( |> ) for ES
Stars: ✭ 192 (+860%)
Mutual labels:  chain
woodpecker
woodpecker http client for Android
Stars: ✭ 17 (-15%)
Mutual labels:  chain
hlfabric-k8scc
Chaincode builder and launcher for Hyperledger Fabric on Kubernetes
Stars: ✭ 21 (+5%)
Mutual labels:  chaincode
hd-address
An extensible HD Wallet Address management utility
Stars: ✭ 22 (+10%)
Mutual labels:  chain

blockchain-in-node Build Status

This is an afternoon-project, a blockchain built in node, supporting PoW.

Why Node

Node itself is a more beautiful, flexible and powerful language for internet project, again, I want to show my love to js.

Why a Blockchain from scratch

When it comes to blockchain, most developers only learn how to do Dapp with ethereum, neo, or other existing infrastructure-completed project... They are fine, but using them will only let you know what you can do with them, as a result, you cannot really get the idea what you can do with blockchain itself, and what you can apply the blockchain mindset to other software projects. I think there is a better way to understand blockchain itself - to build a chain from scratch

This is a lovely demo for

  • A general Idea of how Blocks, Chain, Mining, Nodes, Transaction work with each others.
  • How to do them in Node
  • How to resolve basic conflicts in blockchain
  • How to use sha256 to do PoW(Proof of Work)
  • Not a demo for
    • signatures
    • address
    • production setup
    • making you a blockchain expert

Run it on your machine

$ npm clone https://github.com/amazingandyyy/blockchain-in-node.git
$ npm i
$ npm run dev // default on port 3000

<!-- to run more nodes -->
$ npm run nodes // default on port 3000
$ npm run nodes 3000 // listening on port 3000
$ npm run nodes 3001 // listening on port 3001
$ npm run nodes 3002 // listening on port 3002

HTTP Endpoints

GET /blockchain // see the link-list itself
POST /blockchain/mine // find the next special hash
POST /blockchain/body // add new data to the chain 

GET /blockchain/nodes // get a list of all nodes
GET /blockchain/nodes/resolve // fetch the longest chain
POST /blockchain/nodes/register // add nodes urls

There are many can be done:

Please feel free to fork, clone or send me PR

  • use socket instead of http, to broadcast state
  • implement signature, public key, private key, user address system
  • proof of work and rewarding system
  • new PoW algorithm
  • location based sharding?
  • hide IPs / make it private!?
  • PoS, or other dBFT methods
  • dockernized, easy to run a node
  • interactive wrappers, helper libraries(python, golang, java)...

Author

Andy Chen(amazingandyyy)

LICENSE

MIT

JavaScript Style Guide

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].