lhartikk / naivecoin

A tutorial for building a cryptocurrency

Home Page:https://lhartikk.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing Proof of Work

jfsuarezb opened this issue · comments

This blockchain would resemble real blockchains much more if it implemented a proof of work challenge whereby a node looking to add a block to the blockchain would have to find a nonce that could generate a specific hash. For instance, if a node wanted to add a block, and the previous hash was "abc", then it would have to find a number x such that when that number is appended to the byte-stream of the block it wants to hash, the hash of the block would begin with a zero, say "0ewbv". This would resemble bitcoin more closely.

Sorry I missread the article.