lhartikk / naivechain

A blockchain implementation in 200 lines of code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Questions about spreading fake long blockchain from “bad” nodes

opened this issue · comments

What will be if “bad” node will generate long fake blockchain from genesis and spread it to “good” nodes?

Will blockchain be replaced to fake one in the “good” nodes?

Can we evade this by checking if the longest blockchain prefixed by our current blockchain?

I think the answer is in the question;

Is it Blockchain implementation ?

Isn't it?

This project gives a basic idea of blockchain implementation and it doesn't implement any consensus algorithms prevent to run this as a public blockchain. As long as the blockchain is longer and valid, it will propagate to all nodes.