Miners Aren’t Friends
Can someone explain to me how on earth Ethereum is still a thing? People have lost hundreds of millions of dollars in the Ethereum ecosystem, many due to basic flaws in the &quot;Solidity&quot; language. For example, last November $280 million was frozen in Parity wallets because function visibility defaults to external rather than internal (see the previous HN discussion here[0]). Just for fun, I was looking through the Security Considerations[1] in the Ethereum docs, and here are two so-called &quot;minor details&quot;:<p>- In `for (var i = 0; i &lt; arrayName.length; i++) { ... }`, the type of `i` will be `uint8`, because this is the smallest type that is required to hold the value `0`. If the array has more than 255 elements, the loop will not terminate.<p>- The `constant` keyword for functions is currently not enforced by the compiler. Furthermore, it is not enforced by the EVM, so a contract function that &quot;claims&quot; to be constant might still cause changes to the state.<p>WTF?! Trivial loops won&#x27;t terminate to due (unchecked) integer overflow, and the `constant` keyword does nothing? It&#x27;s a complete gong show. I&#x27;m not touching anything to do with this language with a 100 foot pool. Is the hype bubble just that big?<p>[0] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14807779" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14807779</a><p>[1] <a href="https:&#x2F;&#x2F;solidity.readthedocs.io&#x2F;en&#x2F;develop&#x2F;security-considerations.html" rel="nofollow">https:&#x2F;&#x2F;solidity.readthedocs.io&#x2F;en&#x2F;develop&#x2F;security-consider...</a><p>Edit: Oops, it looks like I&#x27;m mixing up my multi-million dollar screw-ups. First in July $30 million was stolen due to the &quot;public is default&quot; debacle, and then <i>the fix</i> for that problem introduced another bug (the developers forget to call the `initWallet` function), which lead to the $280 million being frozen in November[2]. Holy crap.<p>[2] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15642856" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15642856</a>