by mikenew · 9y ago · 0 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
There's an active downside of random people being able to see your data, not to mention randomly sized boxes and shoddy network connections (which is a big deal for the microservices which they are touting as a use case, and also for big data. Data transfer is one of the slowest bits of data science). Running a web service on random devices where keys, sessions, whatever end up in memory on some box would be a security nightmare. The government doesn't need a back door if all they need to do is host some compute nodes.
Is it just that for some tasks that are very parallel and not sensitive it might end up cheaper?
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.
Basically a digital metaphor that you own your 'space' (eg home) and grant other people a temporary right to come in and see/use an item or hear/participate in a conversation. Strong emphasis on the legal aspect since no gov or law enforcement should be able to peek inside without proper authorization (warrant, probable cause, etc).
Diaspora indeed was an interesting idea in theory (good first step I'd say) but the execution sadly was flawed (too cumbersome to sell it to anyone, even free as in beer).
As far as I'm concerned, no social solution satisfies these tenets yet, and so that's an open 'market' as we speak. Blockchain is conceptually a good basis for history/logging (I'd considered torrent to be a good candidate before that).
Monetization of user data could be achieved on an individual basis by granting rights to commercial entities (eg Xbox, Spotify, clothing brand...) to monitor specific activities (eg my gaming metrics, my listening metrics etc). You'd have per-user contracts (eg Spotify authorized by x million people to monitor their musical habits, paying each a few cents per week possibly deducted from their bill if subscribed to the actual premium service).
No middleman, or at least not necessary by design if you can in-house the whole monitoring/marketing (but agencies would likely appear, such as Google adword or Facebook ads operate currently). In this design, even Facebook or any social media would have to be granted rights to read your data, and could not hold/copy it beyond said authorization (in storage space, also in time).
The whole point being to transfer physical and legal ownership back to users, thus able to revoke all rights to anyone, and operate solely on a peer-to-peer basis (maybe I just want to talk to a few people and that's it).
Newsfeeds of sorts can also be envisioned on a per-user basis if said user runs some dedicated software which sorts and presents data this user has viewing rights to, hopefully in a much more customizable way than current Silicon tech monopolies.
At least that's the idea. I'm pretty sure we'll eventually have something like that, we can't keep on digitalising our world with ever less control, it's a bit of a country without public space and no individual private space either, only corporations (not far from the ontology of fascism, although consensually accepted here since you're not obligated legally, only socially pressured into using said networks).
But from this idea to actual execution, there is still a pretty huge gap, notably because any worthy solution needs to be actually adopted by a majority of users. It needs to be sellable to the highest extent (even if it were free), and thus provide actual value over existing solutions. Tooling, ease of use, clarity so as not to trick users, all aspects matter.
Ten years ago I thought this would be long done by now. I evolved into thinking this is actually somewhat of a hard problem (per real-world constraints of all kinds, ie social, political, ethical, not strictly technically) that I want to actively try to tackle personally, whatever I can bring to a solution.
[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.
Note that there is also one more limit, the max gas per block limit..
Personally, I quite like gas, not too hard for a casual dev like me to understand. However, perhaps in the future it could be something that is totally abstracted, since asking everyone to understand how gas works is too much.
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.
A blockchain isn't magic, I'm currently working on a project with the royal mint that will be used for correspondent banking applications.
Think of it this way you have a database that is guaranteed to be consistent across all nodes, offers you full tracking of any action performed on that database, offers you non-repudiation and much more.
Sure you can probably hack it over an existing standard DB but at what cost?
Private blockchains do appear to be useful among a consortium of companies who don't completely trust each other, and don't want to pay a single company to maintain a central database.
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.