TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Learn Ethereum smart contract programming

403 pointsby ym705almost 8 years ago

19 comments

kbodyalmost 8 years ago
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&#x27;s an experiment there are lots of things that will transform Ethereum (Casper&#x2F;PoS, Raiden, zkSNARKs, Enterprise Alliance) 4. Low price getting pumped by Ethereum Foundation &amp; big-holder affiliates 5. Back to #1<p>We&#x27;ve seen it happen again (DAO) and again (Parity) and it will keep happening, because it&#x27;s broken by design. 90s cypherpunks that pioneered this ideas had considered Turing complete design and discarded it for cryptographic state-machines that allow for formal verification.<p>I appreciate the experimentation, but the takeover-the-world echo-chambers of ethereum that don&#x27;t focus at all on the real tech behind it and ignore everything negative is pretty disappointing. Especially because we keep getting new people buying this and becoming the greater fools.<p>When talking about engineering on such a critical subject, people should be way more responsible. If Bitcoin had the same attitude regarding security like Ethereum does, we wouldn&#x27;t be here and cryptocurrencies would be a joke.<p>Lazy engineering comes at great cost as time goes by and the illusion of security is unveiled.
评论 #14839355 未加载
评论 #14838399 未加载
评论 #14839959 未加载
评论 #14838558 未加载
评论 #14838849 未加载
评论 #14839924 未加载
评论 #14838314 未加载
评论 #14839869 未加载
评论 #14838687 未加载
评论 #14839891 未加载
staticelfalmost 8 years ago
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.<p>This is the sole reason why I don&#x27;t think it will be successful in it&#x27;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&#x27;t see this with Ethereum.<p>Even with bitcoin which is complex the benefits are instantaneous for the common man. Decentralized system, no single entity controls it. It is a fixed amount of bitcoins so like a mineral it&#x27;s value is probably going to be stable in the long run and also each bitcoin will increase in value when more people get interested. It&#x27;s easy to send coins to anyone in the world, at any time.<p>What does Ethereum do? Smart contracts is probably the key word but I don&#x27;t understand how it works or how it will benefit me. Why bother?
评论 #14837929 未加载
评论 #14837145 未加载
评论 #14838351 未加载
评论 #14837704 未加载
评论 #14838066 未加载
评论 #14837054 未加载
评论 #14837835 未加载
评论 #14836993 未加载
评论 #14838649 未加载
评论 #14838130 未加载
hackermailmanalmost 8 years ago
If you are considering writing a smart contract, you should read this first <a href="https:&#x2F;&#x2F;github.com&#x2F;ConsenSys&#x2F;smart-contract-best-practices" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ConsenSys&#x2F;smart-contract-best-practices</a> for Solidity security pitfalls, and hopefully have some idea of invariants&#x2F;contracts to verify expected properties of your smart contract <a href="https:&#x2F;&#x2F;www.cs.cmu.edu&#x2F;~rjsimmon&#x2F;15122-s16&#x2F;lec&#x2F;01-contracts.pdf" rel="nofollow">https:&#x2F;&#x2F;www.cs.cmu.edu&#x2F;~rjsimmon&#x2F;15122-s16&#x2F;lec&#x2F;01-contracts....</a> and additionally hope the EVM doesn&#x27;t have unexpected behavior.<p>Anybody know if the legality of exploiting leaky smart contracts has been tested? Since a lawyer can exploit a badly written contract I wonder if somebody who finds a flaw in a smart contract can legally just jack all the coins or alternatively, write purposely obfuscated contracts (underhanded Solidity contest) to run a scam.
评论 #14839631 未加载
评论 #14838859 未加载
hexhexalmost 8 years ago
I didn&#x27;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.<p>Just one example: &quot;Our function EndLottery() must be only accessible by the owner of the lottery.&quot; [0]<p>function EndLottery() public { if (msg.sender == owner) { ... } }<p>What about code guards? Not to speak of decent typing, etc. etc.<p>[0] <a href="https:&#x2F;&#x2F;ethereumdev.io&#x2F;managing-multiple-users-a-simple-lottery&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ethereumdev.io&#x2F;managing-multiple-users-a-simple-lott...</a>
评论 #14837267 未加载
评论 #14837452 未加载
评论 #14837199 未加载
g00nalmost 8 years ago
Maybe it&#x27;s because I don&#x27;t have a use for it yet, or at least don&#x27;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. &quot;Install Ethereum wallet, write a contract, ..., Profit!&quot; ?? Is there a better source that might explain what it is, how it works (a glancing explanation not a full network inner workings)??
评论 #14836392 未加载
评论 #14836495 未加载
评论 #14836380 未加载
kristiancalmost 8 years ago
Does this not seem like the kind of area where you don&#x27;t want people writing hacky, proof of concept code?<p>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.
评论 #14837393 未加载
评论 #14837472 未加载
omarforgotpwdalmost 8 years ago
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.
评论 #14837085 未加载
评论 #14837272 未加载
评论 #14837120 未加载
评论 #14837541 未加载
评论 #14836920 未加载
throw2016almost 8 years ago
The problem with crypto coins is some have bought in and thus are vested making balanced discussion impossible. We see even with something as trivial as choice of programming language some can become very religious in their support. When money becomes involved expecting rational discussion is perhaps naive.<p>Money is a social construct that needs societal consent and a framework to manage it that is accountable to the societies rules and regulations. So a random person can&#x27;t just create money or value out of thin air. There is no value being created here.<p>They can make a private coin, and convince others to use it between themselves, there were and still exist many such private arrangements in traditional economies, but the value only exists for those who choose to trust this system, and can never hope to replace the main economic currency.<p>Bitcoin and other coins exists in this space of a private coin based on mutual trust and of no real value to the main economy. Holders of such coins would of course love for it to become a real currency and continue making outlandishly self serving arguments about the economy so they can gain something out of nothing. But that begins to resemble a pyramid scheme powered exclusively by greed and self interest to the exclusion of that society&#x27;s interests.
评论 #14839404 未加载
评论 #14839326 未加载
dullgiulioalmost 8 years ago
I know this might sound like a joke, but it is not: how about documenting how to actually test and debug smart contracts? Is there even a way to do so? How about fuzzying?
评论 #14837591 未加载
评论 #14836476 未加载
评论 #14836484 未加载
JustNothingalmost 8 years ago
Am I misreading the code? Isn&#x27;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 &gt; 0, right?.
评论 #14837896 未加载
anilshanbhagalmost 8 years ago
Here is a cool application - <a href="https:&#x2F;&#x2F;predictiontoken.github.io&#x2F;#TRMP" rel="nofollow">https:&#x2F;&#x2F;predictiontoken.github.io&#x2F;#TRMP</a>. It lets people bet on outcomes and bets be settled in a decentralized manner. There is a video in the link if you want to understand how it is accomplished.
评论 #14839332 未加载
Keeeeeeeksalmost 8 years ago
I think we need an Etudes for Ethereum contract development and best practices; there are like 4 different &quot;make a smart contract that juggles millions of assets on the shutter&quot; tokens and sites, but few that focus on security and how to vigorously remind people that mistakes are worth millions of dollars
pknerdalmost 8 years ago
Is there any other crypto platform allow to write dApps for blockchain?
评论 #14837094 未加载
评论 #14837295 未加载
评论 #14837821 未加载
评论 #14837462 未加载
k__almost 8 years ago
They talk about storing money in the contract.<p>Does this mean I will be &quot;charged&quot; right in the moment I &quot;store&quot; money in the contract?<p>Or does it mean I&#x27;ll be charged when the contract gets &quot;destroyed&quot; and the money &quot;in the contract&quot; is sent to some address?<p>I&#x27;m asking because both sides have problems.<p>If I don&#x27;t get charged when storing money in the cotract, I could spend it elsewhere until the contract resolves.<p>If I get charged when storing money, someone could write contracts that never resolve to purge money.
评论 #14837961 未加载
rmetzleralmost 8 years ago
I took a glance at the lottery example [1] and I wonder: isn&#x27;t the owner of the lottery able to change the outcome so the winningNumber is always in his favor?<p>[1]: <a href="https:&#x2F;&#x2F;ethereumdev.io&#x2F;managing-multiple-users-a-simple-lottery&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ethereumdev.io&#x2F;managing-multiple-users-a-simple-lott...</a>
评论 #14837686 未加载
评论 #14837105 未加载
评论 #14836985 未加载
andreasgonewildalmost 8 years ago
Please, enough with the JavaScript already; there are thousands of saner means of expression already existing or waiting to be discovered. Writing flawless, verifiable contracts is the worst use-case ever for that stinking pile of a language. I wonder how many missing bazillions it&#x27;s going to take for the world to wake up and move on.
EternalDataalmost 8 years ago
There needs to be a separation of the underlying technological fundamentals of ETH and its economic reality -- which is, like anything else, likely to go through bubble phases.
theptipalmost 8 years ago
Pretty much sums up the state of Ethereum&#x2F;Solidity development right now;<p>Step 1, install wallet. Step 2, deploy contract. Step 3, learn about Solidity. ... Testing? Nah.
rdiddlyalmost 8 years ago
Thread warning: I&#x27;m actively downvoting any argument that tries to address (read: not address) a cryptocurrency&#x27;s flaws by changing the subject. Example:<p>Person A: Cryptocurrency X is insecure isn&#x27;t it.<p>Person B: So is { the dollar | driving | flying | the internet | * }.
评论 #14838959 未加载