Many of the discussions I read about security relate to how miners can manipulate this or that aspect of the way a transaction gets processed, such as whether or not it's included, what it's timestamp will be, etc. But I wonder if there is any solid information on how many miners are out there trying to do these things? Is there a statistic out there (or can there even be one) that says x% of miners are behaving, while y% are trying to cheat? Is it really something that Solidity programmers need to concern themselves with?
2 Answers
Is there a statistic out there (or can there even be one) that says x% of miners are behaving, while y% are trying to cheat?
There can't be one, because the proportion that try to cheat depends on the incentive you create for them to cheat. Even if all the current miners are honest and incorruptible at any price, there are a positive number of greedy, dishonest people in the world, so if you create a big enough incentive for cheating those people will take up mining.
- 16,897
- 1
- 29
- 58
-
I'm not sure this answers the question. I totally understand that if the incentive is big enough, people will try to cheat. I'm trying to understand if there is any way to tell if people are currently cheating. And if so, what would that look like? – Thomas Jay Rush Dec 28 '16 at 11:12
You ended by asking if this is something DAPP developers need to be concerned with. I would say yes, some of it, to a point.
It's important to understand the degree of precision that exists, and the uncertainty that exists. There's more to be aware of than the delays caused by mining.
For example, the chain doesn't attempt to resolve the exact time of transactions; only the order they emerged on the blockchain. The block timestamp is unambiguous but it isn't especially accurate. Here's a discussion about how it could be off by up to 14 minutes: How would a miner cope with a huge block time?. They also talk about how incentives urge miners to be more accurate than that.
If you keep the uncertainty in mind, you will hopefully avoid designing with hidden assumptions that can lead to trouble in an edge case.
For completeness, I don't think it's possible to know how many miners (human or machine) would like to find a way to distort the Ethereum blockchain. I think we can safely say none have been successful to date.
- 55,151
- 11
- 89
- 145
block time cannot be stamped with an earlier time than its parent,would mean that a node with time maximally advanced could force following blocks to invalidate until a successful node's time had caught up. – o0ragman0o Dec 28 '16 at 07:32