Live data from Hacker News

Learn Ethereum smart contract programming

ethereumdev.io

231–240 of 244 posts

Re: Learn Ethereum smart contract programming

#231
post #189
post #151

Earlier quoted context omitted.

> 2. Ethereum software has security hole, gets hacked The last time this was discussed on Hacker News, I found this comment particularly instructive: https://news.ycombinator.com/item?id=14810008 It points out a great many fundamental issues with the Solidity contract language. Basically, the language design sounds extremely amateurish and it appears to have ignored everything we've learned about security in the last…

Does Solidity really matter, though? "How's the VM" is the real question. I haven't spent more then 10 minutes looking into it, but it seemed reasonable to me. No heap and 256(?)-bit addressing seem like good ideas to keep execution complexity down.

The VM is also fucked (or, at least it was in the recent past) because it turns out that their semantics are a mess. For example, exception handling is either implicit or explicit depending on how a method is invoked!

https://eprint.iacr.org/2016/633

Re: Learn Ethereum smart contract programming

#232

Earlier quoted context omitted.

It's true that abstractions require trust. Have you flown anywhere lately? Inspected the plane before you took off? It's true for the risk you take you must be assured that engineers are making things safe. Lots of planes crashed before we got to the incredible safety record we have today, which is paid for by people having trust in airlines, who employ competent engineers. The only difference here is that the organi…

> Lots of planes crashed before we got to the incredible safety record we have today, which is paid for by people having trust in airlines, who employ competent engineers. > The only difference here is that the organisation is a decentralised one. The engineers are not paid but are incentivised by the network. ETH Engineers are also disincentivized from refactoring code / doing CD, as they have to pay a fee for every…

>There is no real financial incentive for a bad actor to find a software bug that is capable of crashing an airliner.

Not heard of plane hijacking?

ETH engineers are totally incentivised to write the most perfect code possible. With a world of people wanting disintermediation, the rewards for getting and keeping it right and safe are incredible. Partly because the penalties are too.

The compensation for running and maintaining good secure contracts is exactly the incentive needed. You should try and understand the workflow before blindly critiquing it. CD is not a real feature of blockchain technology, and neither should it be. Does NASA run CD on satellite software? Can you run CD on a plane in mid flight?

It is exactly the same thing as flight and space software. You get one chance to get it right. You get paid for doing good work - by the network.

I've never ever heard an ethereum developer complain about the cents they have to pay to deploy a contract, after having extensively tested it on the testnet for free.

Re: Learn Ethereum smart contract programming

#233

Earlier quoted context omitted.

This is a very interesting retort. No you don't have to. You just have to trust that the community has provided you with a secure, usable tool. It is unreasonable to expect you to understand the engineering that goes into this kind of thing, if you are not a computer science educated individual. That is not the point of participation though. Developers don't have an intrinsic right to participate. The exclusion becau…

The issue with that is I don't trust it to be secure. If you make 1 mistake you can loose everything without a possibility to fix your mistake.

This is valid. Better systems of audit are already emerging to tackle this particular problem.

Re: Learn Ethereum smart contract programming

#234

Earlier quoted context omitted.

Which part do you have a problem with?

>I've been holding a handful of Ethereum since there was a decent dip in the price. You opened by explain how you clearly have an interest in this, you got in, and since you are saying you bought during a "decent dip" that means you only got in recently. The rest of your post would be shilling only that you disclosed your interest.

> The rest of your post would be shilling only that you disclosed your interest.

So I would be shilling in a hypothetical scenario, and that's the problem?

OK, whatever. Have a nice day.

Re: Learn Ethereum smart contract programming

#235

Earlier quoted context omitted.

Well general mathmatecial proofs or TLA+... or would it be better to define "integer" as a strong type which I'm willing to concede.

I don't feel there's much difference between e.g. the Coq way where types are used to bake specifications + proofs into the program and the Isabelle way where you write a program with less complex types and prove properties about the program after the fact. General mathematical proofs? If you mean paper proofs they wouldn't be considered formal as they don't go down to the axiom level.

I guess that makes sense to count axioms as strongly typed.

Re: Learn Ethereum smart contract programming

#236

Earlier quoted context omitted.

> The real answer is probably that total languages are obscure and the Ethereum inventors didn't know about them so they chose a simple and ordinary stack machine. I'm not an expert on Ethereum, but even if they did pick a total language, how would you deal with bounding the CPU cost of complex contracts? Even if you could formally verify a loop would eventually terminate, wouldn't long running loops or those with ex…

I'm not sure static typing is tied to formal verification. In fact if you think about it most proofs are basically typeless I a lot of cases.

Type checking can be represented as abstract interpretation. It is the mostly widely used kind of formal verification that exists.

Re: Learn Ethereum smart contract programming

#237
post #206
post #202

Earlier quoted context omitted.

You wouldn't trust a bank with an SQL-injection vulnerability or a hospital running on an old version of Windows either but that doesn't mean all banks and hospitals are not trustworthy A new monetary system created 3 years ago and is highly demanded might have some growing pains You hold $0 of Ether but suggest on how to spend it, you wouldn't send ether to a contract that was coded poorly or vulnerable so the langu…

> You wouldn't trust a bank with an SQL-injection vulnerability or a hospital running on an old version of Windows either but that doesn't mean all banks and hospitals are not trustworthy I would and do, because that's the reality of things. You're discounting the fact that if my bank has a SQL-injection exploit used against it and my account is drained, the federal government will reimburse me up to $250,000. That t…

Don't worry, they'll just do a fork and magic your money back. So much for avoiding the problems of central banking.

Re: Learn Ethereum smart contract programming

#238

Earlier quoted context omitted.

I'm not sure static typing is tied to formal verification. In fact if you think about it most proofs are basically typeless I a lot of cases.

What proof systems are you thinking about? Strong static types seem the most natural way to introduce formal verification into mainstream programming to me.

(Not the parent here.) ACL2 is a prominent example of a proof assistant without a strong static type system; its object language is a pure subset of Common Lisp. The lack of static types is one of the reasons I find proving in ACL2 to be painful, but others have done amazing stuff with it.

Re: Learn Ethereum smart contract programming

#239

Earlier quoted context omitted.

>I've been holding a handful of Ethereum since there was a decent dip in the price. You opened by explain how you clearly have an interest in this, you got in, and since you are saying you bought during a "decent dip" that means you only got in recently. The rest of your post would be shilling only that you disclosed your interest.

> The rest of your post would be shilling only that you disclosed your interest. So I would be shilling in a hypothetical scenario, and that's the problem? OK, whatever. Have a nice day.

That's the problem yes, you bought into a pyramid scheme and you need others to buy in if you want to get out with more money.

Re: Learn Ethereum smart contract programming

#240

Earlier quoted context omitted.

Ethereum reminds me of what happened to the web: the desire to add code. The blockchain by itself wasn't good enough so Ethereum added code to it, just like HTML wasn't good enough so people added applets, Flash, and JavaScript. I understand why they would want to do this but I think it gets the priorities wrong. It prioritizes features and functionality over security and reliability. Given how hostile the Internet h…

I actually think this is a great analogy, although not sure your conclusion follows. What happened after people added JavaScript to the web?

In my view what happened was usability and security suffered. See for example, https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=JavaScript

I have no problem with JavaScript itself, it allows developers to build some amazing web applications. What I object to is the default use of JS for every web site. I would rather see JS limited to a small set of trusted sites and HTML (with server side rendering if needed) for everyone else.

Post reply on HN