pull down to refresh

cool, but there is a tool that goes way deeper and is visually more appealing, created by OG @guggero from lightning labs. find it here: https://guggero.github.io/blockchain-demo/#!/hash
reply
Wow, I never knew about that either!!
reply
I don't know if this Tweet is from the author of the tool, but this is the only Tweet I saw that had shared the link for this tool. Also the link cannot be https (SSL). HTTP only.
In order to explain an interested noob how hash function and or mining works I recommend http://wikez.nl/hash/
reply
Here's what it does:
Every time you change the Input and/or the Nonce, a new Hash is the result.
To find a solution, a miner will take the input and then keep increasing the Nonce until a hash is the result which meets a "difficulty" requirement. For simplicity, let's assume a character position with a "0" is the difficulty in this example.
So you can change the Nonce likely thousands of times and after a dozen or two attempts you will likely end up with a hash that begins with "0".
Now try two find a hash that begins with two zeros. That will take longer. Maybe a couple hundred attempts, maybe a lot more. But eventually you'll hit it.
Now try to get a hash that has four leading zeros. [Well, ... don't try ... you won't get there anytime soon.]
But if you press the Mine button, it will increment the nonce over and over until it finds four leading zeros and will tell you what value was needed for the nonce to find a hash that meets the difficulty requirement, for that specific Input.
With Bitcoin mining, the difficulty will adjust every 2,016 blocks. So if miners are solving blocks more frequently than every 10 minutes, difficulty will increase. With this tool, that would be the equivalent of now needing five leading zeros, instead of four leading zeros. If the difficulty drops, that instead would be the equivalent of needing just three leading zeros. With a lower difficulty, it takes less time (less "work") to find a valid hash and thus blocks are mined faster.
So that's essentially what bitcoin mining rigs do. They simply perform the work to find a hash that meets the requirement for a specific input. That input will change based on what transactions are being included and also what the hash was for the prior block.
reply