News for hackers. Stuff that matters.
Re:153k Ether Stolen in Parity Multi-Sig Attack by trevor-e on Thursday July 20, 2017 @01:24AM (#14810175)
Can someone explain to me why they chose to make their own language instead of creating a DSL inside of an existing language?
Re:153k Ether Stolen in Parity Multi-Sig Attack by tomp on Thursday July 20, 2017 @05:30AM (#14811076)
What language would you choose? AFAIK there are almost no _actually_ secure languages. The ones that exist (e.g. Idris, Agda) are notoriously hard to use (although their Turing "incompleteness" is arguably a feature for smart contracts/distributed computations).

Daily LoL: Googling "secure language" brings up mostly results about Java.

Re:153k Ether Stolen in Parity Multi-Sig Attack by DennisP on Thursday July 20, 2017 @07:13AM (#14811454)
Here's a master's thesis by a couple guys who made Idris compile to Ethereum bytecode.

https://publications.lib.chalmers.se/records/fulltext/234939...

Re:153k Ether Stolen in Parity Multi-Sig Attack by mrkgnao on Thursday July 20, 2017 @12:02PM (#14813630)
Idris isn't difficult to use for things that don't require tons of library support (since there aren't many libraries to speak of yet), unlike Agda, which is far from a programming language in the usual sense (it's a proof assistant, and you're only really supposed to typecheck stuff with it).

You can just skip messing with the termination checker (just don't mark your functions total) in Idris and write Haskell-ish code. The occasional rough edge aside, it's not hard to write the kind of programs we're talking about here: and if you want to prevent DDoS-like infinite looping, put the "total" annotations back in.

Re:153k Ether Stolen in Parity Multi-Sig Attack by tonyg on Thursday July 20, 2017 @10:49AM (#14812944)
You might be interested in W7, an object-capability Scheme variant: http://mumble.net/~jar/pubs/secureos/secureos.html

Starting from something like the lambda-calculus seems more sensible than starting from something like Javascript.

Re:153k Ether Stolen in Parity Multi-Sig Attack by naasking on Monday July 24, 2017 @10:01AM (#14838524)
> What language would you choose?

The E language has been a vehicle for smart contract research for decades. Joe-E is a more recent incarnation of many of the same ideas, that's a secure subset of Java.

Re:153k Ether Stolen in Parity Multi-Sig Attack by pmlnr on Thursday July 20, 2017 @06:44AM (#14811332)
Ada.
Re:153k Ether Stolen in Parity Multi-Sig Attack by blunte on Thursday July 20, 2017 @02:30AM (#14810421)
Naivety, youth.
Re:153k Ether Stolen in Parity Multi-Sig Attack by asaka on Thursday July 20, 2017 @02:44AM (#14810468)
Too young, too simple, sometimes naive.
Re:153k Ether Stolen in Parity Multi-Sig Attack by creshal on Thursday July 20, 2017 @04:38AM (#14810887)
Now who the hell gave them any money for that?
Re:153k Ether Stolen in Parity Multi-Sig Attack by mtgx on Thursday July 20, 2017 @05:40AM (#14811110)
Investors who have FOMO (fear of missing out).
Re:153k Ether Stolen in Parity Multi-Sig Attack by eternalban on Thursday July 20, 2017 @05:59PM (#14816654)
+No Clue.
Re:153k Ether Stolen in Parity Multi-Sig Attack by mannykannot on Thursday July 20, 2017 @07:09AM (#14811441)
When I took a look at it, two or three years ago, I think there were three different guys in the organization each busy with his own idea of a high-level language to put on top of the VM, each inspired by a different GP language. That signaled a certain lack of focus.
Re:153k Ether Stolen in Parity Multi-Sig Attack by lugg on Thursday July 20, 2017 @02:05AM (#14810344)
Hubris.
Re:153k Ether Stolen in Parity Multi-Sig Attack by RexetBlell on Thursday July 20, 2017 @12:27PM (#14813859)
This new language for Ethereum by Vitalik is exactly what you said: https://github.com/ethereum/viper
Re:153k Ether Stolen in Parity Multi-Sig Attack by seagreen on Thursday July 20, 2017 @01:35PM (#14814615)
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 by tom_mellior on Friday July 21, 2017 @05:06AM (#14819073)
Viper is only inspired by Python's syntax. It's not a highly reflective completely dynamic language like Python. (But this also means that it is not a "DSL inside of an existing language", contrary to what your parent claimed.)
Re:153k Ether Stolen in Parity Multi-Sig Attack by ikken on Thursday July 20, 2017 @04:42AM (#14810898)
This is because running code on Ethereum VM and storing data is hugely expensive (rightly so, as it's being done on all nodes in the world). Therefore Solidity will try to compile into a VM code that uses the least numbers of cheapest instructions and pack data into as small memory package as possible.
Re:153k Ether Stolen in Parity Multi-Sig Attack by simias on Thursday July 20, 2017 @08:07AM (#14811711)
Most of the issues pointed out by int_19h would be handled at compile time during static analysis and wouldn't change much to the generated bytecode. I'm talking about strong typing, immutability by default, less error-prone syntax, tail calls, evaluation order etc...

Even replacing 256bit ints with arbitrary precision "bigints" wouldn't add too much of a cost if it's a native type of the underlying VM (as it should be for such an application IMO). It might even reduce code size by removing overflow tests.

Re:153k Ether Stolen in Parity Multi-Sig Attack by int_19h on Thursday July 20, 2017 @05:05PM (#14816290)
It's about costing the operations reliably.

But I would still expect arithmetic to be overflow-checked by default, as in e.g. VB.NET. This would mean that careless arithmetic on unvalidated inputs could still cause the contract to fail - but at least it would be a controllable failure, with all state changes being reversed, and hence not exploitable.

Re:153k Ether Stolen in Parity Multi-Sig Attack by earlz on Thursday July 20, 2017 @12:59PM (#14814238)
In the rationale document they explain that arbitrary length integers were too difficult to determine a reasonable gas cost around for math etc.
Re:153k Ether Stolen in Parity Multi-Sig Attack by bigdubs on Thursday July 20, 2017 @04:59AM (#14810951)
"Normal" and "secure" languages don't do this already?