DEV Community

Discussion on: Trying to understand blockchain by making one!

Collapse
 
eerk profile image
eerk

Awesome explanation, really helpful! I'm just wondering why a hash is only valid if it starts with 0000 characters. I'm also not clear on how to use this blockchain for, say creating my own cryptokittens or some other application. How are the hashes in a blockchain connected to actual data?

Collapse
 
damcosset profile image
Damien Cosset

The 0000 characters are called the difficulty. I chose those characters. They do not mean anything in particular, I could have picked anything. In Bitcoin for example, there is a concept called mining, where you have to 'solve' this difficulty by finding a valid hash. If the answer is found too quickly, the difficulty will be augmented for the next blocks( say 5 zeroes instead of 4 ).

I'll make another article to explain the connexion between hashes and data, I am getting a few questions about this :)