837 points · by songzme · 9y ago · 257 comments
So if, for example, you had a big 3d animation sequence that you wanted to have rendered, you would not just send that code off to the network to be processed. You would have to pay to have every single person on the network process that job for you, and it would be so big the network wouldn't even accept it. Rather, you would create a simple contract that says "if you render this animation for me and prove that you did it right, I'll pay you X amount of Ether". Someone would take the job and the Ethereum network would process your contract and handle the payment. You would end up paying that person to do work for you, and you'd pay the network (using something called gas) to process the contract.
You could use Ethereum to create all kinds of interesting contracts for financial purposes, voting systems, insurance, or whatever else. But it's not some giant compute cluster that will run some big program for you.
Every blockchain is essentially a shared database. E.g. Bitcoin is a database which keeps track of address balances (as a first approximation) and enforces particular authorization rules. It's a fixed-functionality blockchain.
On the other hand, Ethereum can serve as an arbitrary, user-defined database. Ethereum smart contracts are essentially like stored procedures in SQL databases -- they can be used to enforce arbitrary consistency rules.
And the reason why transactions are quite expensive is that you're paying to update everyone's database. You can modify things locally for free, but if you need everyone to see your information, you gotta pay for it.
And computation is there just for the sake of enforcing arbitrary constraints.
You never work with it directly, instead, you deploy a contract, which is sort of a collection of stored procedures. On the low level contracts are executed as imperative bytecode with special opcodes for reading/writing data to KV store.
There are also high-level languages which compile to this bytecode. Particularly, Solidity lets you to develop contracts using object-oriented metaphor: contract is an object, its store is accessible via object's fields. Besides primitive types, it supports types like structs, arrays and associative arrays, which can be nested. Compiler takes care of mapping field access to raw key-value store operations, particularly, it relies on cryptographic hash functions for layout mapping instead of deterministic allocation.
Contracts can also call each other, there is an opcode for it. Calls are done synchronously, so it looks exactly like OOP.
Since this database exists in multi-user environment, access control is necessary. The system identifies users using cryptographic signatures and exposes this information to contracts via `msg.sender` field. Contracts can use it to implement custom authorization policies.
The database is transactional, of course: a user-submitted transaction is either executed in its entirety (incl. all nested calls) or fails with all side-effects reversed).
Transactions are executed serially, one at time. So high performance is not a feature of the system, it is more like "high security".
Reading data can be done via "stored procedures" (well, I think technically you can read raw data from key-value store, if you want to). Also there is a separate "event log" mechanisms: contracts can generate custom event logs, which can be later read externally.
Distributed consensus: Each node has a complete copy of the database, so adding more nodes doesn't increase scalability. Currently Ethereum uses proof-of-work consensus. That means that any (mining) node can propose a new block of transactions to be executed, and eventually they converge to a single chain. So it's stochastic.
There are also "private Ethereum" systems which let you to use different consensus mechanisms. Typically they have Byzantine Fault Tolerant consensus, likely inspired by PBFT. It's kinda like Paxos but with more digital signatures.
Read the whitepaper and watch the videos if you want to learn more.
I guess that's solvable by requiring payment for verification runs and just splitting up your work into much smaller pieces.
The authors already thought about how to incentivize verification runs. It's really cool. Check out this informative podcast with some of the team members: https://youtu.be/QY0OUTaIWIc
Yep. Unfortunately the creators of Ethereum marketed it heavily as a "world computer" on promotional roadshows, claiming it would replace Facebook and whatnot.
Perhaps more interesting is that, in my view, Ethereum has it wrong: re-executing computation is a really foolish way to do what it can actually do-- which is conditionally allow changes only if a stated predicate holds.
Check out this presentation by my colleague:
Video: https://www.youtube.com/watch?v=TGE6jrVmt_I
Slides: https://cyber.stanford.edu/sites/default/files/russelloconno...
> contracts for financial purposes, voting systems, insurance, or whatever else.
Many of these applications are severely harmed by the lack of privacy in the recompute-everything model.
[1] https://web.archive.org/web/20140723210829/http://insightsin...
[2] https://web.archive.org/web/20140801161657/https://www.ether...
SGX would also enable hidden contract data. Right now, you can't publish a contract like "guess my weight and win $100", because the guess code is public (has to be, for miners to exec it). With an SGX-enabled system, this is now totally doable. (Though, you must trust Intel, and assume hackers can't reverse engineer the Intel chips with magic physics or other breaks. So it's probably safe for a few millions but not billions of dollars. (Upper bound, for a few hundred billion you could acquire Intel and compromise SGX secrets.))
SGX is pretty exciting and I'm in the early stages of getting at least one project working with it. There's also research called "Town Crier" to enable TLS-retrieved website data into Ethereum contracts.
For all the people that cry about SGX being big, bad, DRM, it really has its upsides. Too bad Intel requires special licensing to use it - it should just be enabled for all purposes. Maybe they're worried about malware backlash?
Also, an SGX-enabled Ethereum, apart from the Intel/SGX trust issues, means you can skip the computation and just verify the result. It also means you could replace the proof-of-work multi-hash with a single iteration plus a sleep.
It is a viable additional client protection, especially against remote malware, software-only tampering (unless there are implementation bugs or backdoors), but not a viable server trust substitute.
The idea is to program your money. Here's a dollar that can only be spent on healthy food. Give these to your kids for doing their chores or whatever.
Are such restrictions meaningful though? One huge feature of these currencies/tokens is how easy it is to trade them; maybe your kids will trade their "healthy food dollar" for $0.75 of some unrestricted currency, hence "a dollar that can only be spent on healthy food" is actually "about $0.75, with an extra transaction step".
The token would just need to check against the whitelist in its transfer function.
gas is ETH. It is simply a term they chose to refer to the ETH fee paid to execute the code. I don't like their terminology. Calling it "gas" make it sound like it's a different currency. They should have just call it the "ETH fee".
Each op code in the EVM has a gas price, depending on the complexity of the instruction. Eg. A store op costs more gas than a comparison op.
When you do a transaction, you specify how much ETH you will pay for one unit of gas. Typical transactions use 21k gas, but contracts need much more.
More info about why it's like that:https://www.cryptocompare.com/coins/guides/what-is-the-gas-i...
I often see 'gas required' 'gas limit' and 'gas price' terms confused, so careful what you read in the comments on the internet ;-)
gasCost -> cycles
gasLimit -> max cycles per transaction
gasPrice -> ETH per cycle
The fact you need so much text to explain gasCost, gasPrice, etc, perfectly illustrates my point that their "gas" metaphor is the wrong one. Also as xur17 said, "cost" and "price" are too confusable.
Perhaps you could but currently no one does. There's still not a single real world legal application that needs cryptocurrency. Much as with the pro-life debate (to name a bad phrase) or with global warming now renamed climate change (to name a good phrase) the name of the thing frames the discussion. Calling it a "currency" makes people think it's not a Ponzi or a scam when it's decidedly one of them.
Clearly you haven't done enough research. Have you looked at the ethereum token (ERC20: https://theethereum.wiki/w/index.php/ERC20_Token_Standard) launch contracts? They raise large amounts of money (its actually scary!) and securely and transparently tokens are distributed to participants. These tokens can then represent anything (really anything) from stock (blockchain capital etc), to voting rights in the organisation (districtOx), to a utility token (golem, basic attention token) to allow use for what ever protocol is being developed.
There already are private secure voting systems being researched. Here for example: https://github.com/stonecoldpat/anonymousvoting ZK-snarks is used to ensure privacy.
You can see some of the other applications here: https://dapps.ethercasts.com/ (most of these are just fun ideas, but you don't have to look far to see the potential in them).
There is real utility to Ethereum, it is just very very young as a technology, and all the issues of scalability etc are a work in progress. But if you want to use the trust-less and secure computational power to execute your code (smart contract) you need to buy Ether first. Is that a Ponzi? I think you are unfairly grouping ethereum in the same category as a large number coins that very much are ponzis.
There are quite a few private blockchains that are now running in the financial and healthcare industries at a pretty large pilot programmes that are very functional and bring destinct advantages.
Actually not true, the phrase 'climate change' has been coined more than half a century ago. The idea that there was a rebranding of the phenomenon is false beyond doubt, and actually hurtful to the process of acknowledging we have a big problem.
https://thinkprogress.org/debunking-the-dumbest-denier-myth-...
Revolutionary indeed.
I don't trust anything that 4chan is telling me to buy.
1) Extremely vague and handwavy, or
2) Links to extremely long documents.
Neither one is an explanation, something that hits the key points and gives you enough to know what to ask to get greater detail.
Edit: toned down criticism.
I should work on an "I'm a software developer who wants an intermediate technical understanding" or something like this.
This is actually a sign that something innovative is happening, because it can't be explained in terms of something that already exists.
When I wrote understandingbitcoin.us, I explained it as a global ledger with mutiple versions floating around where everyone agrees to trust the version (out of the valid ones) with the most proven work invested in it. That provides the overall structure and allows me to dive into:
- How you sign transactions (public key crypto basics)
- How you know how much work has been invested in something (the guessing game and the crypto version with hashes and nonces)
- Why people invest work in it all (mining and transaction fees).
- Why people agree to follow these rules at all (dynamics that encourage people to follow vs reject a protocol and what effects that has for the network)
(I would like to see something similar for ethereum.)
If I were explaining the internet to someone in your example, I would explain what functions computers can perform, then introduce the concept of them communicating with each other and what that allows, and the flesh out the details of how the communication happens in a distributed way.
(The linked page also doesn't provide that kind of explanation.)
This isn't a precise analogy for various reasons. Bitcoin has the UTXO model (though Ethereum actually does have userid/balance), and Ethereum is more like an object database than SQL.
http://fermatslibrary.com/s/ethereum-a-next-generation-smart...
The document mentions creating a crop-insurance application that would depend on a weather feed.
The problem is if the weather feed isn't something that's uniformly secureable the result could be bad given that the insurance application would take action automatically and no appeal to any higher authority concerning the fraud would be possible - without a "fork" as happened earlier. Hack an insecure feed, an insecure site or whatever and viola, free money.
And this seems like a problem any interface with the "real world" would face. The idea of automatically occurring, no-appeal financial transactions sounds but I would claim it's always going to be problematic - only a fool or a crook would put their money in this kind of system and the crook only puts in enough money to remove the money of the fool.
The ideal of say, money, is it belongs to you, where you is a broad but understandable concept. Something that belong to "whoever has X, Y, Z pieces of information about you" may sound great until someone beside you gets that information and there is no recourse. Indeed, the person who had the information "did nothing wrong" if the account really, really did belong to "whoever has this information" rather than belonging to you.
You still end up trusting a human - an "oracle". You trust the weather feed, or you trust some exchange to give you the accurate price of some other asset. If that oracle is mistaken (bug, intentional misinformation), the smart contract can be manipulated.
However, I know of at least 1 promising project on Ethereum (Augur) that provides decentralized oracles, and you can trust these oracles due to some clever game theorish mechanics.
The gist is randomized Reporters submit real-world information to the blockchain and earn a fee for their service. Reporters purchased a cryptoasset to have this priviledge, and if a certain Reporter submits information in conflict with a majority of other reporters (e.g. they lied) then they lose a portion of their cryptoasset giving them incentive to play by the rules and get paid for it.
And even further, if majority of Reporters report dishonestly then people will not use the Oracle service, the Reporters will not be able to earn fees, and the cryptoassets they purchased to allow to be reporters become worthless.
You could program whatever logic you want into the insurance. For example, some kind of dispute resolution system that appeals to a higher authority.
How do insurance companies deal with this problem today? Why do you trust the insurance company not to lie and say that the weather was fine? Whatever that mechanism is, it can be programmed into a smart contract.
The legal system. It can put people in jail for fraud if necessary.
Do you really want "smart" "contracts" to have the power to put people in jail? Really?
In general I see two really hard challenges with smart contracts. Getting them bug free (i think formal verification which is worked on will help a lot) and getting the incentives right to punish dishonest behavior. (So far I haven't seen a lot work being done here, I also don't know how you could automise that, maybe some kind of simulation with AI based actors)
If people even know of the existence of a dispute, it's almost certainly because they have some personal stake in the outcome, and they will vote for the outcome that benefits them.
* Making the trust-liability explicit
* Building a trust-less core system that can swap out 'trustful' sources of data as needed
* Streamlining the processing and accounting of something that depends on a 'trustful' source of data
Not to mention that trust-less data is potentially achievable with prediction markets. This is obviously not a trivial innovation, and they may not be practical, but writing off the whole system is unfounded at this point.
Protocols and decentralized applications around decentralized file storage, decentralized computation and decentralized prediction markets, among dozens of other such concepts, have the potential to substantially increase the efficiency of the computational industry, and provide a massive boost to other peer-to-peer protocols by adding for the first time an economic layer
Computation: pretty much the whole point of the Ethereum VM, plus there are a couple projects that put proofs on the blockchain of larger computations than the blockchain can handle.
Prediction markets: Gnosis and Augur
Efficiency: at least developer efficiency, in my experience
Economic layer: because you have reliable currencies on the network, both ETH and roll-your-own.
It might sound like buzzwords but at this point it's all real code.
Real code that doesn't provide the stated advantages doesn't mean much, right?
The way you transfer a bitcoin from one person to another is by creating a Bitcoin transaction that contains an input script that fulfills an in-blockchain output script with which a number of bitcoins are associated. The output script may say "provide a public key that hashes to <some_hash> and a signature, over a transaction (which sends the bitcoins to a new output script) that redeems this output, that verifies against this public key".
Bitcoins script language -- conditions be fulfilled to transfer tokens associated with one output script to a new output script -- is not Turing-complete, which means it's limited in how complex a condition can be set up for redemption. Ethereum's script language is Turing complete, allowing arbitrarily complex conditions for fulfilling an output script (which allows you to transfer coins/tokens from that output script to a new one).
The main problem with a Turing-complete contract language is that it becomes impossible to statically verify runtime properties, so a node can't know how long it will take to verify a transaction it receives. This opens up for denial-of-service attacks, e.g. embedding a transaction with an infinite loop in a block in the blockchain.
However for practical purposes nodes only compute up to a certain amount of instructions. This is known as the "gas limit". Additionally it costs Ether to get them to run code so any DOS approached in this way is prohibitively expensive.
I never know if the person who just worshipped or criticized a specific currency has a vested interest.
Somebody who sits on billions of ETH will write totally different tham someboy who is shorting/margin trading ETH.
This whole cryptothing feels like gambling, 'put all your money on red, red will win..'
On the other hand, people will continue to run ponzi schemes as long as there are greedy/ignorant people to attract, so it might as well be done all visibly. At least then the guy running the ponzi can't just tell everyone "sorry, feds raided the bank, all the money is gone" when he actually just moved it offshore.
Would totally get headlines if someone put $1M worth on an SD, then laughed and ate it live on TV and said good luck finding it. Or tossed it out of an airplane, or boat, etc. People show off wealth in all sorts of ways...
It would be cool to make coins out of bits of recycled computer chips and resin, and only allow the e-waste recyclers to mint them. The global poor become our new bankers. ='D
I think we are close to the top, how much worse than this can it get?
Everyone has realized there's crazy mania, and so now everyone is capitalizing on it. In a few months, the number of projects to fund will no longer be smaller than the amount of money being put towards funding.
There are some attempts at serious trading subreddits, but so far nothing that seems that informative to me.
As a Node.js developer, it was effortless to start coding with Solidity. But that's part of the problem; it seems so easy, but there are no safeguards and a lot of traps. That's why we get so many flawed contracts that were taken advantage of/hacked and ICOs delaying their distribution or processes because a bug was found.
90s cypherpunks that gave birth and worked on these ideas of smart-contract etc. saw the things a bit more responsibly, instead of development velocity on something that proves unsustainable even from a security perspective not to mention scalability-wise. Here is are some thoughts from one of the originals - Christopher Allen co-author of TLS standard.
I'm disappointed in the corruption of the term Smart Contracts. Bitcoin's Script, and in particular P2SH is a good start to them, but massive multiple execution of arbitrary code is not (aka IBM's Chain Code), and I would even argue that Ethereum's languages are not smart contracts either—just another chain code. I do agree that business logic is hard to do with Bitcoin's Script, but for all of us talking about Smart Contracts in the late '90's (Szaboian Smart Contracts?) we desired cryptographic composabilty, that the code could be analyzed at multiple levels to be secure (from language proofs to high level business logic atomic validation), limitable (i.e. expression complexity & evaluation cost can be determined) and could often just be validated by consensus of parties not every node in the world (which only at most need to see proof of execution, not the full contract). These would be true cryptographic Smart Contracts!
I am really curious as to whether it would be possible to develop new languages for the handling of smart contracts, or if it is possible to develop smart contracts (using a library or other resource) with existing, popular languages like c++, python, or javascript. I know web3 is already quite accessible and while I haven't looked at the source, it seems relatively easy to work with. But the core language for smart contracts... I think Eth would benefit from some flexibility on the development end. Or maybe I just don't know enough.
Anyway, I think that would be a big leap.
Thanks
On the other hand you have Hyperledger, it's "contract" code is Go. Widely adopted language that was basically designed for networking efficiency.
If you're interested in why there's also a token named "Ethereum Classic(ETC)", you can search "DAO" on Google to explore more about why the first largest Ethereum application DAO was failed and why this leads to the hard fork(ETH => ETC, ETH) of Ethereum.
As far as decentralized storage is concerned, there's production-already a blockchain-based product named Sia (http://sia.tech/ ), but Swarm (which is a similar thing based on Ethereum) is still in very early stage.
Firstly you don't know if AWS has actually run your code. They could potentially replace your code with their own modified version which does something malicious (like add a bias). For example in a voting system, code could be modified to ignore X percentage of unfavourable votes, or change unfavourable votes to a more favourable candidate.
Secondly I don't know what your code on AWS does. This isn't great for financial and voting systems that should be audit able.
With Ethereum you can view the code for a contract to validate it does not "cheat". You can also trust the contract was executed correctly because the miners have validated it and added it to the block chain.
In the case of siacoin, at face value it seems to be significantly cheaper than AWS or Google Cloud for providing bulk cloud storage.
[1] http://sia.tech/
ICO tokens are digital commodities/assets that are more similar to app credits or in-app mobile purchases than securities.
Unlike with Ethereum apps/dapps, you can't trade traditional app credits/in-app purchases on an exchange but imagine if there were farmville ERC-20 tokens a few years backs, people will buy thousands off speculation alone, it'll be interesting to see how the SEC will regulate this
https://publications.lib.chalmers.se/records/fulltext/234939...
Good luck in the long run
> here’s what we’ll talk about: (with links if you want to jump to a specific section).
Holy smokes, it's got links! Good thing he pointed it out to me since I never could have figured that out by the visual indicators that every web browser adds to links.
"Support this website! Send ETH to: 0x1c4d1804AD9d47de0D4209882843998E03E30dF9"
~ 40$
Outside of trading it between each other based on price speculation, is there a real world thing that isn't a prototype that people are using as part of the smart contract system?
Or a serious reputable journal reviewing the literature comprehensively?
If I'm unable to find filling for the gaps in the study I seek, I'm inclined to think that I have a good chance of being able to work towards a (sincerely and despite being tempted by the ad rates) non spammy simple site to collate the references, this summer. So if you have any suggestions for the effort I will with about 70% probability undertake, I'd be happy to hear from you as well.
https://www.youtube.com/watch?v=MUZWZj1pu94
Blockchain tech is evolving...
Last century gave us things like the personal computer, the internet, and so on. What about this one? Fancier webpages? Selfies? Tweets?
All of this blockchain and cryptocurrency and JS hype is tiresome to see. What happened to making real stuff that works and solves real problems?
The innovations you listed in "last century"- PC, internet, etc - both went through their fringe, hobbyists-and-nerds-only phases, during which their future value to society was totally unclear and uncertain.
Only in hindsight are these technologies impacts obvious.
While I couldn't agree more about the fact that there's ridiculous hype and (most annoyingly) greedy speculation in crypto, I for one am hugely excited and optimistic about the potential society-changing implications of the this tech.
Cloud computing is pretty great too.
There's too much inflation and uncertainty for it to be a fiat currency. I mean the value of BTC fluctuated 1000% in the span of just a couple of years.