3 ms·
Probably not what OP meant, but mining pools are a way to address that. You team up with N other miners, and if one of them finds a solution then the reward is
by drdrey 9y ago
Probably not what OP meant, but mining pools are a way to address that. You team up with N other miners, and if one of them finds a solution then the reward is divided among the pool based on the work that was contributed
- Klathmon 9y agoWhich is actually the exact same system as mining, but with a fractional difficulty. So instead of having to mine a block with a difficulty of 10 million, you are allowed to mine invalid "miniblocks" with a difficulty of 1 thousand. Then when someone in the pool happens to mine a block that is difficult enough to be valid globally, the mining pool software takes that reward and splits it proportionally among all users based on how many "miniblocks" they generated (with different pools doing different weighting).
- alex_young 9y agoIsn't it a complexity optimization? In the broader system there is no coordination of attempts so multiple nodes 'waste' resources trying the same invalid solutions if I understand correctly.
- Klathmon 9y agoYes, but the number of possible "solutions" (valid or invalid) is so large that it's extremely unlikely that 2 people are getting the same invalid solutions (assuming the software is working correctly). so you don't need any coordination. And "extremely unlikely" doesn't quite get across the magnitude here. We are talking about the likelihood of 2 people generating the same SHA256 hash of what is basically an absurdly large random number. Trying to mine a block is basically just generating an SHA256 hash of (the previous block + a nonce) that has a given number of 0's on the front of it. (this is crazy oversimplified) The nubmer of zeros is basically the difficulty. So everyone starts off trying to generate a SHA256 hash of "ABCD" and a random number, that has at least 4 zeros on the front. So a mining pool is setup that says anyone that generates a SHA256 hash of the same thing with 1 or more zeros on the front gets a "share", and when anyone generates an SHA256 hash with 4 or more zeros on the front, the pool submits that share, then gives the profits to everyone that was able to generate "shares" based on how many they generated.
- wallacoloo 9y agoDifficulty can't actually correspond to the number of leading zeros required in the hash, can it? Then there would only be 256 levels of difficulty, and the average block time would have to double whenever difficulty increases. Yet I see this "leading zeros" explanation everywhere. So maybe it is the case, but if so, why was this way chosen rather than just requiring that the hash be less than some value, with that value being a function of difficulty? That would give you more granularity at very little additional complexity.
- Klathmon 9y agoThe "number of leading 0's" is just a gross oversimplification of the actual difficulty mechanism. It's a lot easier to explain, and it's somewhat correct (it's easy to look at the hash for a block and see that it has a bunch of zeros at the front) The reality is closer to what you say at the end there, it is calculated so that the resulting hash must be under a given value, and is pretty damn granular. Sadly many people trip over the idea of one hash being "less" than another, and it's just easier to go with the "number of zeros" explanation rather than spend time explaining how a hash just represents a bigass number. For example, the current difficulty as of this comment is 1873105475221.611
- wallacoloo 9y ago> many people trip over the idea of one hash being "less" than another, and it's just easier to go with the "number of zeros" explanation rather than spend time explaining how a hash just represents a bigass number. Aha! I knew there was a reason people prefer the leading zeros explanation. Thanks for pointing it out.