News for hackers. Stuff that matters.
Re:153k Ether Stolen in Parity Multi-Sig Attack by Analemma_ on Wednesday July 19, 2017 @05:17PM (#14808026)
> Unmarked functions default to public in Solidity

What kind of brain-dead apes designed this language? This would be a stupid decision in any language, never mind one specifically intended for high-value transactions.

Re:153k Ether Stolen in Parity Multi-Sig Attack by earlz on Wednesday July 19, 2017 @06:09PM (#14808463)
My favorite critique of Solidity is this guy on hacker news from a few days back https://news.ycombinator.com/item?id=14691212
Re:153k Ether Stolen in Parity Multi-Sig Attack by Animats on Wednesday July 19, 2017 @06:00PM (#14808383)
This is why I keep saying that "smart contracts" should be expressed in some declarative notation like decision tables. Byte-coded programs as contracts were a really bad idea. Contracts need to be readable, not just executable.
Re:153k Ether Stolen in Parity Multi-Sig Attack by dvcc on Wednesday July 19, 2017 @06:09PM (#14808462)
I'm kind of curious on what you think about Tezos and its Michelson language (https://www.tezos.com/static/papers/language.pdf) which offers provability of contracts.
Re:153k Ether Stolen in Parity Multi-Sig Attack by sna1l on Wednesday July 19, 2017 @06:36PM (#14808606)
Just looking at this language, it makes me feel like we are going back in time in regards to readability and ease of use. I understand that security and provability of contracts is more important in these cases, but one can dream!
Re:153k Ether Stolen in Parity Multi-Sig Attack by fab13n on Thursday July 20, 2017 @07:17AM (#14811467)
Michelson is a VM bytecode, not a programming language, although it happens to be readable enough to write simple contracts in it directly.

IIRC, the old Camllight VM was pretty similar (I might misremember, that was literally decades ago); an ML-like language to Michelson compiler is fairly straightforward to write and to prove sound.

I'm happy that they do things the sane way, i.e. focusing on sound foundations rather than on how Javascripty the syntax looks; but I'm afraid the communication isn't as clear as it could/should be. Blessing a compiler for some subset of ML, as a first high level language, would have cleared things up IMO.

Re:153k Ether Stolen in Parity Multi-Sig Attack by aisofteng on Thursday July 20, 2017 @09:07AM (#14812105)
I find it perfectly readable. Precise and intentful. Perhaps you're just not accustomed to formal writing?
Re:153k Ether Stolen in Parity Multi-Sig Attack by antocv on Wednesday July 19, 2017 @06:28PM (#14808561)
Byteball (https://byteball.org/ has declarative smart contracts!
Re:153k Ether Stolen in Parity Multi-Sig Attack by Animats on Wednesday July 19, 2017 @06:44PM (#14808650)
That looks interesting. I just skimmed the white paper. It's not clear what their contracts can do, though. They need more examples.

The underlying DAG idea has potential. You could have two half-transactions happening on separate subtrees, where A is buying X from B and B is paying Y to A. So A broadcasts "A will buy X from B when B pays Y to A", and B broadcasts "B will pay Y to A when A buys X from B". When the matching half-transactions acquire a common child, the transaction commits. It's a true "meeting of the minds".

Re:153k Ether Stolen in Parity Multi-Sig Attack by antocv on Thursday July 20, 2017 @04:03PM (#14815790)
Yes they do have that what you are describing, "smart conditional payments".

You can for example trade user-defined (possible private) assets (tokens) in that way - "Ill send you my bytes for your blackbytes, I send bytes to this address and me can sweep them back after 4 hours, or you can sweep them if payment of X amount of blackbytes is made to my address". It has oracles as well.

Re:153k Ether Stolen in Parity Multi-Sig Attack by int_19h on Wednesday July 19, 2017 @10:55PM (#14809743)
Time to revive Prolog, perhaps?
Re:153k Ether Stolen in Parity Multi-Sig Attack by zmonx on Thursday July 20, 2017 @01:47AM (#14810268)
Yes! Prolog is a great language for such use cases in my opinion.
Re:153k Ether Stolen in Parity Multi-Sig Attack by federicobond on Thursday July 20, 2017 @10:51AM (#14812967)
The problem is that decision tables usually end up really big for anything but the most trivial smart contracts.
Re:153k Ether Stolen in Parity Multi-Sig Attack by justinjlynn on Wednesday July 19, 2017 @05:23PM (#14808080)
Design... before Solidarity I had never seen such an abuse of the word.
Re:153k Ether Stolen in Parity Multi-Sig Attack by hirsin on Wednesday July 19, 2017 @05:48PM (#14808294)
I think the capitalization of a method making the difference between two very different outcomes might be my favorite example. It's that kind of stuff that makes me happy I have to go through api reviews at work - although seriously how does anyone sign off on these designs?
Re:153k Ether Stolen in Parity Multi-Sig Attack by justinjlynn on Wednesday July 19, 2017 @06:09PM (#14808461)
> sign off on these designs

I only wish people had to do that. Shit like this are why professional and civil engineers roll their eyes at the mention of software "engineering". There are best practices and available tools but people employ them far less often than they probably should. In the space, take a look at Kadena's Pact smart contract language. It's not perfect by any means (lisp-religious syntax and its tight integration with Kadena internal constructions, for example) but it is at the least, working on formal verification support.

Re:153k Ether Stolen in Parity Multi-Sig Attack by johnmaguire2013 on Wednesday July 19, 2017 @07:00PM (#14808748)
This is the design of most high-level scripting languages (e.g. Javascript, PHP, Python, Ruby)...
Re:153k Ether Stolen in Parity Multi-Sig Attack by make3 on Wednesday July 19, 2017 @08:09PM (#14809072)
These aren't called "Solidity" and more importantly weren't built specifically to write a financial infrastructure of multiple hundreds of million dollars (though some of these languages are definitely used to manage money now)
Re:153k Ether Stolen in Parity Multi-Sig Attack by johnmaguire2013 on Wednesday July 19, 2017 @09:02PM (#14809314)
I was responding to this statement from the parent...

> This would be a stupid decision in any language

Re:153k Ether Stolen in Parity Multi-Sig Attack by int_19h on Wednesday July 19, 2017 @10:56PM (#14809750)
Python is a bit different still: it doesn't have visibility specifiers to begin with, everything is public.
Re:153k Ether Stolen in Parity Multi-Sig Attack by masklinn on Friday July 21, 2017 @06:26AM (#14819319)
Javascript is the same, AFAIK.