Earlier quoted context omitted.
Doesn't this happen every day, over trivially small sums? You've never heard of a credit card chargeback?
Right, and also, a good part of why credit cards have 2-3% overhead is essentially insurance against chargebacks. I'd rather pay $51 for groceries every week than $50 for groceries plus a risk of irrevocably losing tens of thousands of dollars at some point with no warning. If cryptocurrencies think that they can provide this service for substantially cheaper than 2-3% (note that this is an additional service on top…
153k Ether Stolen in Parity Multi-Sig Attack
711–720 of 754 posts
Re: 153k Ether Stolen in Parity Multi-Sig Attack
#712Earlier quoted context omitted.
I never understood why they chose such a hacky language (an a VM model that encourages these kinds of languages), and expect people to write supposedly secure (in the sense of: obviously correct!) code with it. Any remotely popular functional programming language created over the last years shows a better design (and taste) than this one. And if that only attracts a certain type of programmers? (pun intended) That is…
Why did you bundle an equally experimental language like kotlin amid those other well established and widely used languages?
Re: 153k Ether Stolen in Parity Multi-Sig Attack
#713Earlier quoted context omitted.
99 out of 100 questions. Solidity is ostensibly designed to let people write smart contracts for Ethereum. More realistically, it is a marketing tool for enabling and onboarding people onto the Ethereum platform, which Ethereum benefits monetarily (enormously so) from. Security and design are secondary goals to the extent that they help prevent disasters which hurt adoption or churn developers away. Through this lens…
a marketing tool that gets your money stolen is probably counterproductive in the long run
Re: 153k Ether Stolen in Parity Multi-Sig Attack
#714Earlier quoted context omitted.
How do you consent to theft?
By giving something to someone. I mean, legally, what happens is not "consenting to theft". Unlike say assault, which you can consent to, and legally speaking an assault actually happens but consent makes it okay; but with theft, if you consent what happens is not legally theft. (IANAL, but this is my recollection from law A-levels.) But that distinction is irrelevant here. The point is that there's basically no way…
Re: 153k Ether Stolen in Parity Multi-Sig Attack
#715Earlier quoted context omitted.
This new language for Ethereum by Vitalik is exactly what you said: https://github.com/ethereum/viper
Viper's inspired by Python, which (for all the nice things we can say about it) is a _terrible_ place to go for inspiration for this kind of task.
Re: 153k Ether Stolen in Parity Multi-Sig Attack
#716Earlier quoted context omitted.
:-D Ask me anything ;-) I have, like, a whole chapter about smart contracts which answers everything about this latest disaster. The idea is that it will be a handy rhetorical ammo dump for when someone asks you about those blockchain things and why the business needs them ...
I hope you are mentally prepared for the sheer amount of negative reviews you're going to get on Amazon.
Re: 153k Ether Stolen in Parity Multi-Sig Attack
#717Earlier quoted context omitted.
By giving something to someone. I mean, legally, what happens is not "consenting to theft". Unlike say assault, which you can consent to, and legally speaking an assault actually happens but consent makes it okay; but with theft, if you consent what happens is not legally theft. (IANAL, but this is my recollection from law A-levels.) But that distinction is irrelevant here. The point is that there's basically no way…
and in this case the owner didn't consent, regardless of the contract's contents
Re: 153k Ether Stolen in Parity Multi-Sig Attack
#718Just skimming through the Solidity docs, I see a lot of unwise decisions there aside from the weird visibility defaults. All state is mutable by default (this includes struct fields, array elements, and locals). Functions can mutate state by default. Both are overridable by explicit specifiers, much like C++ "const", but you have to remember to do so. Even then, the current implementation doesn't enforce this for fun…
Your opinion about javascript and closures in particular makes me question the rest of your comment. Closures in javascript makes it easy to write async code.
In reality, all closures get the same variable, and if it is the loop counter or derived from it, and closures are executed later, then they will all see the same value - the one that said variable had after the last iteration. It's even worse if closures try to write to it.
This is something that is peculiar to JS. In most other languages, there's no similar issue, because either local variables can't be declared inside loops (or, indeed, at all, treating assignment as implicit declaration), as in Python or Ruby; or if they can, then their scope is what you'd expect it to be, as in C#, Java etc.
Writing async code using closures as continuations is not unique to JS, either. All mainstream languages support this now.
Re: 153k Ether Stolen in Parity Multi-Sig Attack
#719Just skimming through the Solidity docs, I see a lot of unwise decisions there aside from the weird visibility defaults. All state is mutable by default (this includes struct fields, array elements, and locals). Functions can mutate state by default. Both are overridable by explicit specifiers, much like C++ "const", but you have to remember to do so. Even then, the current implementation doesn't enforce this for fun…
I don't think that one even matters, that the language has side-effecting expressions (through impure functions) is enough to make an undefined OOE problematic.
> Integers are fixed-size and wrap around, so it's possible to have overflow and underflow bugs. Granted, with 256 bits of precision by default that's harder to do than usual... but still pretty easy if you e.g. do arithmetic on two inputs.
That ignores the problematically trivial "type inference" of `var`: type is decided based on the smallest type which can hold the literal. So any implicitly typed variable initialised to 0 is an 8-bit unsigned integer.