Live data from Hacker News

Learn Ethereum smart contract programming

ethereumdev.io

61–70 of 244 posts

Re: Learn Ethereum smart contract programming

#61
post #41

Earlier quoted context omitted.

The logic exists on the block chain. It is executed on each and every machine that follows the chain. This is how executions are verified, 'everyone' has to agree on the outcome.

Sorry for being so uninformed but what happens if there is an error in the logic? Doesn't that mean that it's not possible to update the smart contract?

>what happens if there is an error in the logic?

If you are a big name in the Ethereum community, they will soft fork Ethereum so that your mistake is rolled back.

Re: Learn Ethereum smart contract programming

#62
post #33

I didn't have high expectations for Solidity considering the recent vulnerabilities, but even these were disappointed. If some guy writes this kind of code at home, alright, but this as the alleged foundation for our future financial system? Frightening. Just one example: "Our function EndLottery() must be only accessible by the owner of the lottery." [0] function EndLottery() public { if (msg.sender == owner) { ...…

Many issues with Solidity as a contract language were pointed out in a previous HN thread after the Parity multisig-incident: https://news.ycombinator.com/item?id=14810008

Re: Learn Ethereum smart contract programming

#64
post #24

Earlier quoted context omitted.

I am assuming you have gone through the Ethereum whitepaper. It does lists some potential use cases which can be extrapolated. http://fermatslibrary.com/s/ethereum-a-next-generation-smart...

I have not. Do you really think I should have to?

No I don't think you need to do that to get interested in it. If you want to see it in action and spin up a playground really quickly, I suggest using Embark (https://github.com/iurimatias/embark-framework). (I contribute to this project)

Re: Learn Ethereum smart contract programming

#65
post #24

Earlier quoted context omitted.

I am assuming you have gone through the Ethereum whitepaper. It does lists some potential use cases which can be extrapolated. http://fermatslibrary.com/s/ethereum-a-next-generation-smart...

I have not. Do you really think I should have to?

Yes...

Re: Learn Ethereum smart contract programming

#66

Does this not seem like the kind of area where you don't want people writing hacky, proof of concept code? The idea of people coding up weekend projects on Ethereum, putting them behind flashy websites and encouraging large scale adoption terrifies me, to be honest.

Just wait until artificial intelligence does it for us...

Re: Learn Ethereum smart contract programming

#67

Earlier quoted context omitted.

I have not. Do you really think I should have to?

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…

Judging by the frequency which which catastrophic bugs seem to appear within smart contracts, it appears that most users of the platform also don't grok the complexity of the Ethereum network and it's vulnerability to bugs.

This argument can get dangerously close to 'clever people have invested a lot of time and effort into this, so you should either invest the same amount of time and effort or trust that the whole thing is safe.'

Not sure this holds up, especially when increasingly people are being asked to trust Ethereum, but anything, like Parity, that interacts with it.

Re: Learn Ethereum smart contract programming

#68

Programmable smart contracts are a great idea in a world where programmers write bug free code. That world does not exist yet. Until we have near-perfect code writing AIs every new smart contract is just a disaster waiting to happen.

It's possible to write provably correct code, though. At least then you reduce the problem to the issue of correctly specifying what the code is supposed to do. Certain classes of contracts might be small enough to do that.

Granted, the requirement for NASA-level code correctness would make smart contracts expensive to develop and put them out of reach of average developers.

Re: Learn Ethereum smart contract programming

#69

Programmable smart contracts are a great idea in a world where programmers write bug free code. That world does not exist yet. Until we have near-perfect code writing AIs every new smart contract is just a disaster waiting to happen.

That's like saying legal contracts are a disaster because we do not live in an ideal world where lawyers don't do mistakes, and there are no legal loopholes. Granted, bugs are much more common than legal loopholes, but in the same way an operating system's APIs and constraints are tested until it becomes reliable enough for other people to rely on it, I can see some standard types of contracts (in the same way as in…

Legal contracts have a solution for bugs and loopholes, namely, the court system. I can write a three-line contract with the core terms on a napkin, sign it, and it will be okay, since everything not explicitly mentioned will be given reasonable defaults, and attempts to exploit stupid loopholes will be laughed out of the court. If someone defrauds me and gets me to sign a contract based on false information, they don't get to point to a loophole and figuratively take my firstborn, we have a process to void fraudulent contracts.

However, if you want contracts that cannot be overridden and are enforced by machines as written (not as intended, as in the legal system), then the bar becomes much higher, then you must get all the details explicitly right the first time and ensure that people don't sign fraudulent contracts, and I'm not sure if this is possible at all.

Re: Learn Ethereum smart contract programming

#70

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…

Judging by the frequency which which catastrophic bugs seem to appear within smart contracts, it appears that most users of the platform also don't grok the complexity of the Ethereum network and it's vulnerability to bugs. This argument can get dangerously close to 'clever people have invested a lot of time and effort into this, so you should either invest the same amount of time and effort or trust that the whole t…

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 organisation is a decentralised one. The engineers are not paid but are incentivised by the network.

It will take time to remove errors from the network and for best practices to emerge. As for novices making basic errors and losing money. The internet is littered with problems like that in all languages.

This is not a reason to not attempt to do something new.

Post reply on HN