3 ms·
There's tons of people here on HN that know this stuff by heart, but as far as I understood: 1) I guess so, the blockchain contains the bitcoin transactions.
by Udik 10y ago
There's tons of people here on HN that know this stuff by heart, but as far as I understood:
1) I guess so, the blockchain contains the bitcoin transactions.
2) In order to add a block to the blockchain, you need to mix the block's fingerprint with a random value and shake, hoping for the mix to get a special and very recognisable appearance. If it doesn't work, you have to try a new random number (the block's fingerprint of course stays the same). When you've found a good number (which takes a lot of tries and luck) you raise a flag and say "hey, found it", and you can add your block to the chain. Then you're rewarded with some amount of bitcoins that are created from nothing (hence mined). I don't have clear how this reward is granted, whether it's already written in the block you're trying to add or in a new one, and in which form.
- mosselman 10y agoThank you for your explanation. It certainly clears a few things up. With regards to "hoping for the mix to get a special and very recognisable appearance". What happens here concretely? What would 'very recognisable' entail?
- Udik 10y agoVery late reply, but in case anybody sees this. The "shaken mix" of fingerprint + random number must produce a number that is lower than a certain target number. The most visible consequence of this is that the accepted numbers must begin with a string of zeros (as the number of digits is fixed, as in 0003 is lower than 0123). Example: Not a good mix: 1312af178c253f84028d480a6adc1e25e81caa44c749ec81976192e2ec934c64 A good mix: 0000000000000000057fcc708cf0130d95e27c5819203e9f967ac56e4df598ee This "shaken mix" is a SHA-256 hash of the current block plus a random number. SHA-256 is an algorithm that generates a "fingerprint" (called "hash") of a block of data, in such a way that it is not possible to determine, from the fingerprint itself, which data might have generated it [otherwise it would be possible to start from (a set of) desired fingerprints and calculate back to the set of possible blocks that could generate them].