Super duper simple, naive blockchain proof of concept in Node.
- ECC cryptography for messages!
- SHA256 block signing!
- Simple implementation!
- Arbitrary JSON messages!
- Block size limit! (For the hell of it)
- Networking! – This implementation only generates a blockchain locally.
- Proof-of-... – Anyone in the network (if there was one) can generate blocks at arbitrary speed.
- Minting coins – Could be added by way of a special rule to allow, say, the first message of a block to be a senderless
sendof given value.
npm ioryarnto install the single dependency (elliptic)- Run
node make-blockchain.jsto createblockchain.txt - (Go ahead! Modify
blockchain.txtat this point, and the next command will crash!) - Run
node verify-blockchain.jsto readblockchain.txtand summarize its contents