ᴡʜᴇʀᴇ ɪꜱ ᴇᴀᴄʜ ʙʟᴏᴄᴋ'ꜱ ᴄᴏʀʀᴇᴄᴛ ᴀɴꜱᴡᴇʀ ɢᴇɴᴇʀᴀᴛᴇᴅ ᴛᴏ ʙᴇ ꜱᴏʟᴠᴇᴅ? ᴇᴠᴇʀʏᴛʜɪɴɢ ɪ ʀᴇᴀᴅ ᴛᴀʟᴋꜱ ᴀʙᴏᴜᴛ ᴛʜᴇ ɴᴇᴛᴡᴏʀᴋ (ᴡʜɪᴄʜ ɪ ᴄᴀɴ ᴡʀᴀᴘ ᴍʏ ʜᴇᴀᴅ ᴀʀᴏᴜɴᴅ ᴀᴅᴊᴜꜱᴛɪɴɢ ᴅɪꜰꜰɪᴄᴜʟᴛʏ, ᴇᴛᴄ.), ʙᴜᴛ ɴᴏᴛ ᴡʜᴇʀᴇ ᴛʜᴇ ᴘᴜᴢᴢʟᴇ ᴍᴀᴛʜ ᴘʀᴏʙʟᴇᴍꜱ ᴀʀᴇ ᴄʀᴇᴀᴛᴇᴅ. ɪꜱ ᴛʜɪꜱ ᴀ ᴄᴇɴᴛʀᴀʟɪᴢᴇᴅ ᴘʀᴏᴄᴇꜱꜱ?
pull down to refresh
3 sats \ 0 replies \ @nullcount 8 Jul 2022
It's definitely NOT a centralized process.
TL;DR There are many nonces that could result in a valid block, but there are far more nonces that won't. A miner just has to be the first one to find a nonce that works for the current block. Nodes influence the size of the set of valid nonces by adjusting the difficulty. Nodes can agree on a difficulty based on their own observations of block frequency following the consensus rule: "target 10 minute block time every 2016 blocks"
Explained:
Nodes validate blocks. Nodes are in consensus about what the minimum difficulty level of a block should be. That's because every node is trying to target an average block time of 10 minutes.
Nodes can influence how quickly blocks are mined (on average) by raising or lowering the difficulty.
After a node validates 2016 blocks, it calculates the average time it took to mine a block over that 2016 block period.
It sets a new difficulty target for the next 2016 blocks and it will only validate a block if the block hash is LOWER than the new difficulty threshold.
What does it mean for a hash to be lower than the difficulty threshold?
What follows is an oversimplification:
Miners are trying to guess a magic number called a nonce.
The nonce is essentially "added" to the block header (which is another number unique to every block and is calculated by adding all the transactions inside that block).
X = nonce + block_header
Then, this new total is hashed.
result = hash(X)
A hash is a one-way function. It means the result of a hash cannot be done in reverse. Usually, in math, functions can be undone (like how subtraction undoes addition). You also can't predict what the hash of a number will be without actually doing the hash (proof of work).
If the result of this hash is a number that happens to be less than the difficulty target, then it's a valid block and the miner can submit it to the network while claiming the fees and subsidy.
reply
3 sats \ 0 replies \ @02a9caab98 8 Jul 2022 freebie
Miners are essentially trying to guess numbers that fit some criteria.
A puzzle assumes there is one solution. There are actually endless "solutions" for each new block, they're just very hard to find. In fact, there is no known way to find them other than trial-and-error.
The network hashrate shows you how many hashes (guesses) were done per second in order to "find" a correct answer for the most recent block.
For example now the hashrate is 200 exahashes per second = 200 x 10^18 guesses every second.
-
There is no one correct answer, there are many.
-
The correct answers are not known in advance, they are "discovered" through mining. What is known in advance is the criteria by which to judge if an answer is correct or not. That criteria changes with every block and even with every attempted guess (via the so-called nonce explained in the comment from @nullcount).
reply
3 sats \ 0 replies \ @UA 8 Jul 2022 freebie
Not centralized. New proposed block has new transactions and header of previous validated block and a nonce. The miner then hashes new proposed block and needs to iterate through nonce to find multiple zeroes for hash of new proposed block. It’s not really a math puzzle in human sense, just a brute force computer energy drain to maintain block creation speed.
reply
0 sats \ 0 replies \ @BatarangRufio OP 8 Jul 2022
ɢʀᴇᴀᴛ ᴀɴꜱᴡᴇʀꜱ, ᴛʜᴀɴᴋꜱ!
reply