How Ethereum Works
How Ethereum Works
Last updated: April 14, 2017 6:23 pm
Now that we’ve covered what ethereum is, let’s dive deeper into how the platform functions under the hood.
Consider the online notebook application described in “What is Ethereum?”
Using ethereum, the app doesn’t require one entity to store and control its data. To accomplish this, ethereum borrows heavily from bitcoin’s protocol and its blockchain design, but tweaks it to support applications beyond money.
Ethereum aims to abstract away bitcoin’s design, however, so that developers can create applications or agreements that have additional steps, new rules of ownership, alternative transaction formats or different ways to transfer state.
The goal of ethereum’s ‘Turing-complete’ programming language is to allow developers to write more programs in which blockchain transactions could govern and automate specific outcomes.
This flexibility is perhaps ethereum’s primary innovation, as explained in the guide “How Ethereum Smart Contracts Work“.
The ethereum blockchain
The structure of the ethereum blockchain is very similar to bitcoin’s, in that it is a shared record of the entire transaction history. Every node on the network stores a copy of this history.
The big difference with ethereum is that its nodes store the most recent state of each smart contract, in addition to all of the ether transactions. (This is much more complicated than described, but the text below should help you get your feet wet.)
For each ethereum application, the network needs to keep track of the ‘state’, or the current information of all of these applications, including each user’s balance, all the smart contract code and where it’s all stored.
Bitcoin uses unspent transaction outputs to track who has how much bitcoin.
While it sounds more complex, the idea is fairly simple. Every time a bitcoin transaction is made, the network ‘breaks’ the total amount as if it was paper money, issuing back bitcoins in a way that makes the data behave similarly to physical coins or change.
To make future transactions, the bitcoin network must add up all your pieces of change, which are classed as either ‘spent’ or ‘unspent’.
Ethereum, on the other hand, uses accounts.
Like bank account funds, ether tokens appear in a wallet, and can be ported (so to speak) to another account. Funds are always somewhere, yet don’t have what you might call a continued relationship.
What is the ethereum virtual machine?
With ethereum, every time a program is used, a network of thousands of computers processes it.
Contracts written in a smart contract-specific programming languages are compiled into ‘bytecode’, which a feature called the ‘ethereum virtual machine’ (EVM) can read and execute.
All the nodes execute this contract using their EVMs.
Remember that every node in the network holds a copy of the transaction and smart contract history of the network, in addition to keeping track of the current ‘state’. Every time a user performs some action, all of the nodes on the network need to come to agreement that this change took place.
The goal here is for the network of miners and nodes to take responsibility for transferring the shift from state to state, rather than some authority such as PayPal or a bank. Bitcoin miners validate the shift of ownership of bitcoins from one person to another. The EVM executes a contract with whatever rules the developer initially programmed.
Actual computation on the EVM is achieved through a stack-based bytecode language (the ones and zeroes that a machine can read), but developers can write smart contracts in high-level languages such as Solidity and Serpent that are easier for humans to read and write.
As explained in our guide “How Ethereum Mining Works“, miners are the ones that are preventing bad behavior – like ensuring that no one is spending their money more than once and rejecting smart contracts that haven’t been paid for.
There are a few thousand ethereum nodes out there, and every node is compiling and executing the same code.
But, you might be thinking, isn’t that much more expensive than a normal computation? Yes, it is. That’s why the network might only be used only for particular use cases.
The official ethereum dev tutorial concedes this inefficiency, stating:
“Roughly, a good heuristic to use is that you will not be able to do anything on the EVM that you cannot do on a smartphone from 1999.”
Authored by Alyssa Hertig; images by Maria Kuznetsov
Article Source: http://www.coindesk.com
A Beginner’s Guide to Blockchain Technology
- Can Bitcoin Scale?
- Hard Fork vs Soft Fork
- How Bitcoin Mining Works
- How Can I Buy Bitcoins?
- How Could Blockchain Technology Change Finance?
- How do Bitcoin Transactions Work?
- How Do Ethereum Smart Contracts Work?
- How Does Blockchain Technology Work?
- How Does Cloud Mining Bitcoin Work?
- How Ethereum Mining Works
- How Ethereum Works
- How to Make a Paper Bitcoin Wallet
- How to Mine Ethereum
- How to Mine Litecoin and other Altcoins
- How to Set Up a Bitcoin Miner
- How to Store Your Bitcoins
- How to Use Ethereum
- How Will Ethereum Scale?
- What are Bitcoin Mining Pools?
- What are Blockchain’s Issues and Limitations?
- What Are the Applications and Use Cases of Blockchains?
- What Can a Blockchain Do?
- What Can You Buy with Bitcoin?
- What is a DAO?
- What is a Decentralized Application?
- What is a Distributed Ledger?
- What is Bitcoin Cash?
- What is Bitcoin?
- What is Blockchain Technology?
- What is Ether?
- What is Ethereum?
- What is SegWit?
- What is the Difference Between a Blockchain and a Database?
- What is the Difference Between Litecoin and Bitcoin?
- What is the Difference Between Public and Permissioned Blockchains?
- What is the Lightning Network?
- Who Created Ethereum?
- Who is Satoshi Nakamoto?
- Why Use a Blockchain?
- Why Use Bitcoin?
- ‘Decentralized Airbnb’ Starts Charging Fees as ICO Model Falters
January 23, 2019 5:35 PM | By Jit Sutradhar
- Nasdaq Leads $20 Million Funding Round for Blockchain Startup Symbiont
January 23, 2019 4:51 PM | By Jit Sutradhar
- A16z-backed Startup Anchor Labs Launches Crypto Custodial Service
January 23, 2019 4:00 PM | By Jit Sutradhar
- UK Financial Watchdog Plans Oversight of Security Tokens, Some Stablecoins
January 23, 2019 3:35 PM | By Jit Sutradhar
‘Decentralized Airbnb’ Starts Charging Fees as ICO Model Falters
Nasdaq Leads $20 Million Funding Round for Blockchain Startup Symbiont
Gold Price May Offer Clues About Next Big Bitcoin Move
Seed CX Launches Spot Bitcoin Trading in Bid for Big-Money Investors
50 Cut as $60 Million Blockchain Project Nebulas Lays Off 60% of Staff