Live data from Hacker News

Learn Ethereum smart contract programming

ethereumdev.io

121–130 of 244 posts

Re: Learn Ethereum smart contract programming

#121

Earlier quoted context omitted.

So I'm actually at a disadvantage here, compared to plain old contracts.

Yes. If one party makes a mistake, or does something underhanded/surreptitious, you have no recourse. This exact situation (a bug in the DAO contract leading to a malicious actor stealing from the DAO) led to the recent Ethereum fork: https://news.ycombinator.com/item?id=14819268

Well, the Ethereun fork itself reveals that there is some recourse.

It may be less attractive recourse than exists with plain contracts for many potential participants, though.

Re: Learn Ethereum smart contract programming

#122

Am I misreading the code? Isn't the EndLottery function completely broken? It looks like it finds the first user who bet less than the winning number. So, in order to win you should play ASAP and bet epsilon > 0, right?.

yeah, it's completely broken. which normally you would fix, but oh look too late!

Thanks for your comment and it's fixed thanks to a hard fork ;)

Re: Learn Ethereum smart contract programming

#123
post #6

Earlier quoted context omitted.

Yeah people. Explain Ethereum without using the words "smart contract" please.

It's a distributed money database with stored procedures.

Awesome reply, I've been searching for a simple explanation. This is superb.

Re: Learn Ethereum smart contract programming

#124
post #23

Is there any other crypto platform allow to write dApps for blockchain?

Not out yet, but Filecoin: https://filecoin.io/ . It's like Ethereum but with file storage capabilities + built-in bridges to other cryptocurrencies.

Filecoin doesn't have any smart contracts as far as I'm aware, so it's limited to use as a decentralized storage network. I believe it would be possible to build something very similar to Filecoin on the Ethereum platform. Storj (https://storj.io/) may be trying to do that.

Re: Learn Ethereum smart contract programming

#125
I think we need an Etudes for Ethereum contract development and best practices; there are like 4 different "make a smart contract that juggles millions of assets on the shutter" tokens and sites, but few that focus on security and how to vigorously remind people that mistakes are worth millions of dollars

Re: Learn Ethereum smart contract programming

#126
post #109

The sad reality of Ethereum: 1. Bitcoin is slow and expensive, Ethereum is the future 2. Ethereum software has security hole, gets hacked 3. Ethereum fans say it's an experiment there are lots of things that will transform Ethereum (Casper/PoS, Raiden, zkSNARKs, Enterprise Alliance) 4. Low price getting pumped by Ethereum Foundation & big-holder affiliates 5. Back to #1 We've seen it happen again (DAO) and again (Par…

> the takeover-the-world echo-chambers of ethereum

You toss out this pejorative description, and then in the next paragraph:

> When talking about engineering on such a critical subject, people should be way more responsible.

This is absurd. How could it ever become critical without a lot of research and development first?

I've been holding a handful of Ethereum since there was a decent dip in the price. I haven't spent much time on it and I have no good leads for program ideas yet, but if the code is buggy and I get hacked and lose my investment, that's fine. A smart contract is a project, and it could fail like any other.

Don't put your retirement savings in a smart contract right now unless you're OK with losing it all. Maybe in the future Ethereum will move beyond this phase, and maybe not. All the drama is ridiculous, everyone needs to chill out.

Re: Learn Ethereum smart contract programming

#127

Earlier quoted context omitted.

Yes. If one party makes a mistake, or does something underhanded/surreptitious, you have no recourse. This exact situation (a bug in the DAO contract leading to a malicious actor stealing from the DAO) led to the recent Ethereum fork: https://news.ycombinator.com/item?id=14819268

Well, the Ethereun fork itself reveals that there is some recourse. It may be less attractive recourse than exists with plain contracts for many potential participants, though.

Sort of, but it's also insane. Forking Ethereum because of the DAO hack is a bit like forking the US dollar after the crash of 1929.

Re: Learn Ethereum smart contract programming

#128
post #10
post #2

Maybe it's because I don't have a use for it yet, or at least don't know if I have a use for it. But, the whole Ethereum universe seems vague and seems like they could explain it more than they do. "Install Ethereum wallet, write a contract, ..., Profit!" ?? Is there a better source that might explain what it is, how it works (a glancing explanation not a full network inner workings)??

I Am Not An Expert. If I understand correctly, these are a way to automate the execution of the financial part of normal contracts without the need for undue trust between parties. Some simple examples that might help (and I invite correction): • I and a few investors agree to buy into an enterprise in several installments. A contract can be written to the blockchain that automates these payments. Should a majority o…

    without the need for undue trust between parties
Needing to assume that the contract author didn't make a trivial mistake (like leaving off `internal`) that makes all your tokens fall on the floor seems like a pretty sizable chunk of trust - and that's also assuming everybody involved isn't malicious.

Re: Learn Ethereum smart contract programming

#129

The problem I see with Ethereum is that it is way too complex. I have read perhaps at least 10 times on their home page without even understanding what it does, what problems it solves etc. This is the sole reason why I don't think it will be successful in it's current state. With most successful tech or services or whatever the core idea is often super simple to grasp and you can instantly see the benefit. I don't s…

Ethereum is like Bitcoin but with scripts that can store data, hold money, and send it to other accounts.

Re: Learn Ethereum smart contract programming

#130
post #119
post #109

The sad reality of Ethereum: 1. Bitcoin is slow and expensive, Ethereum is the future 2. Ethereum software has security hole, gets hacked 3. Ethereum fans say it's an experiment there are lots of things that will transform Ethereum (Casper/PoS, Raiden, zkSNARKs, Enterprise Alliance) 4. Low price getting pumped by Ethereum Foundation & big-holder affiliates 5. Back to #1 We've seen it happen again (DAO) and again (Par…

The belief that Turing machines aren't amenable to formal verification is a hobgoblin that shows up in every thread like this, but it's not real. Of course there are limited formalisms that make certain types of verification easier, but proving programs has been possible since, like, the 1960s. A multisig, for example, has a finite number of states when considered under symbolic execution. A model checker can rip thr…

Sure, you CAN verify Turing machines, but verifying languages that AREN'T Turing complete is sufficiently simpler. So why not make your verification work easier by using a total language? The only real argument against that would be "we can't do what we want in a total language".

I don't buy the argument that what people want to do with smart contracts requires Turing-completeness. In fact, as time goes on I become more and more convinced that Turing completeness is highly overrated. Almost all code wants to do finite and/or structurally inductive operations. The only case that doesn't fall in that are things like request loops where you want to "infinitely" wait, process request, loop back to waiting. But even those things can be done in total languages via co-induction, so exactly why do we want to make our analysis/verification work more difficult by using a non-total language for things like Ethereum?

Post reply on HN