cosme12 / SimpleCoin

Just a really simple, insecure and incomplete implementation of a blockchain for a cryptocurrency made in Python as educational material. In other words, a simple Bitcoin clone.
http://copitosystem.com
MIT License
1.78k stars 397 forks source link

Verify imported blockchains from peer nodes #2

Open cosme12 opened 6 years ago

cosme12 commented 6 years ago

Loaded node_peers blockchains should be validated. find_new_chains() should verify the new imported blockchain follows the requirements. This prevent attacks that attempt to completely change the blockchain history.

jrmtoubRHL commented 6 years ago

If i understand correctly, In order to verify the hashes , we need to do the POW done by the miner again? In bitcoin , when nodes verify transactions , they have to do the same costly POW as the miner? Thank you