The simplest method I can consider to clarify that is to provide you a die (cube) and say “Should you roll lower than a 6, i will offer you $100”. It will be fairly straightforward to get the cash, proper? The one method you possibly can lose is for those who roll a 6
Now if I modify the sport to be “roll lower than a 2”, it is tougher (much less doubtless) that you’re going to get it in your first go, as a result of it’s a must to roll a 1.
So shall we say I’m aiming so that you can win $100 a minute, and also you’re quick sufficient to roll about Three instances a minute. You begin rolling and I discover with the problem set at 5, you are successful much more typically than as soon as a minute, so I dial the problem quantity down (make it tougher). Say we attain some extent the place with the problem set at “beneath 3” you’re, on common, successful as soon as a minute. Then you’ve an actual streak of dangerous luck and it takes you four minutes to roll lower than 3 – you simply stored rolling 6’s for the primary Three minutes. I determine I am going to go straightforward on you, and I increase the problem quantity once more since you’re having a nasty streak so I am going to make it simpler to win. You then begin doing rather well, so i begin lowering the quantity once more.
Frequently, i will look again over the common time it took you to win current video games and resolve whether or not to regulate the problem or not, and tweak it up or all the way down to attempt to maintain you to successful as soon as a minute. Should you get sooner at rolling, i will make the sport tougher. Should you get your buddy to roll with you, I am going to make it tougher nonetheless. Should you put the die away for a day then roll a win it will massively have an effect on the common time for a win, and I am going to most likely modify factor so it is simpler.
This makes use of a 6 sided cube; the numbers concerned in bitcoin are a lot a lot larger – on the time of writing the problem is about 15,000,000,000,000 and hashes may be between zero and a pair of^224 (about 270,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000) however the premise stays the identical – it is a cube with 27000 vigintillion sides and it’s a must to roll lower than about 15 trillion. And you should purchase units that roll as much as 16 trillion instances a second. Together with your massive rewards you should purchase a great deal of these units and fill a warehouse with them, rising your odds of being the one to roll the win, for those who can afford the ability invoice
The rolling of the cube is the producing of the hash code for the transactions the miner has determined to pack right into a block.
In essence the miner packs a block with transactions, calculates the hash, it is better than the problem, they alter one quantity within the block header (fairly than go to the trouble of packing one other block of transactions – much more computationally costly to do however would have the specified impact of fixing the hashcode, which is the general aim) referred to as the nonce. So we modify the nonce, re-do the hash, is it lower than the problem? No. Change the nonce, redo the hash. Verify the problem/change the nonce/hash/test/change/hash/test/change..
Ultimately one thing occurs:
- we discover a hash lower than the present problem – fast! announce it to the community and get the world to confirm the work, settle for it and we get the reward
- another person finds a block of transactions that has a hash lower than the problem, they get the reward, all of the transactions they packed are accomplished/paid – we have to begin over with a brand new block of transactions
- we run out of nonces (there are solely four billion) as a result of we’re hashing so quick (transaction blocks have a timestamp that increments, which additionally adjustments the hashcode, however even then coupled with the four billion nonces means if we hash sooner than >4ghash/second we’ll run out of nonces earlier than the time ticks up by a second, so we then go and modify one of many transactions barely, or swap it out for one more) – no matter is required to result in even a legitimate single byte change within the block will produce a unique hashcode, so we make that change and keep it up (most likely again with the nonce altering technique)
So who’s the authority on what the problem ought to be? Similar as anything with bitcoin – everybody. The community decides on the problem, and since all (or most) of the community are good actors, you possibly can’t cheat, you possibly can’t write a program that claims a win with some hash, as a result of everybody else proof checks the work they usually do not settle for it for those who cheated the hashcode, or lied about getting decrease than the problem. It is like everybody else within the on line casino watched you roll, and for those who rolled a 6 however shouted “i rolled a 1!” they ignore you