ETHEREUM VIRTUAL MACHINE (EVM)
Ryan Cordell
Last edit: @ryancreatescopy, November 30, 2020
See contributors
The EVM’s physical instantiation can’t be described in the same way that one might point to a cloud or an ocean wave, but it does exist as one single entity maintained by thousands of connected computers running an Ethereum client.
The Ethereum protocol itself exists solely for the purpose of keeping the continuous, uninterrupted, and immutable operation of this special state machine; It's the environment in which all Ethereum accounts and smart contracts live. At any given block in the chain, Ethereum has one and only one 'canonical' state, and the EVM is what defines the rules for computing a new valid state from block to block.
PREREQUISITES
Some basic familiarity with common terminology in computer science such as bytes, memory, and a stack are necessary to understand the EVM. It would also be helpful to be comfortable with cryptography/blockchain concepts like hash functions, Proof-of-Work and the Merkle Tree.
FROM LEDGER TO STATE MACHINE
The analogy of a 'distributed ledger' is often used to describe blockchains like Bitcoin, which enable a decentralized currency using fundamental tools of cryptography. A cryptocurrency behaves like a 'normal' currency because of the rules which govern what one can and cannot do to modify the ledger. For example, a Bitcoin address cannot spend more Bitcoin than it has previously received. These rules underpin all transactions on Bitcoin and many other blockchains.
While Ethereum has its own native cryptocurrency (Ether) that follows almost exactly the same intuitive rules, it also enables a much more powerful function: smart contracts. For this more complex feature, a more sophisticated analogy is required. Instead of a distributed ledger, Ethereum is a distributed state machine. Ethereum's state is a large data structure which holds not only all accounts and balances, but a machine state, which can change from block to block according to a pre-defined set of rules, and which can execute arbitrary machine code. The specific rules of changing state from block to block are defined by the EVM.
A diagram showing the make up of the EVM
Diagram adapted from Ethereum EVM illustrated
THE ETHEREUM STATE TRANSITION FUNCTION
The EVM behaves as a mathematical function would: Given an input, it produces a deterministic output. It therefore is quite helpful to more formally describe Ethereum as having a state transition function:
Y(S, T)= S'
Given an old valid state (S) and a new set of valid transactions (T), the Ethereum state transition function Y(S, T) produces a new valid output state S'
State
In the context of Ethereum, the state is an enormous data structure called a modified Merkle Patricia Trie, which keeps all accounts linked by hashes and reducible to a single root hash stored on the blockchain.
Transactions
Transactions are cryptographically signed instructions from accounts. There are two types of transactions: those which result in message calls and those which result in contract creation.
Contract creation results in the creation of a new contract account containing compiled smart contract bytecode. Whenever another account makes a message call to that contract, it executes its bytecode.
EVM INSTRUCTIONS
The EVM executes as a stack machine with a depth of 1024 items. Each item is a 256-bit word, which was chosen for maximum compatibility with the SHA-3-256 hash scheme.
During execution, the EVM maintains a transient memory (as a word-addressed byte array), which does not persist between transactions.
Contracts, however, do contain a Merkle Patricia storage trie (as a word-addressable word array), associated with the account in question and part of the global state.
Compiled smart contract bytecode executes as a number of EVM opcodes, which perform standard stack operations like XOR, AND, ADD, SUB, etc. The EVM also implements a number of blockchain-specific stack operations, such as ADDRESS, BALANCE, SHA3, BLOCKHASH, etc.
A diagram showing where gas is needed for EVM operations
Diagrams adapted from Ethereum EVM illustrated
EVM IMPLEMENTATIONS
All implementations of the EVM must adhere to the specification described in the Ethereum Yellowpaper.
Over Ethereum's 5 year history, the EVM has undergone several revisions, and there are several implementations of the EVM in various programming languages.
top tether Conventionally, you need the approval of regulatory authorities like a government or bank for transactions; however, with Blockchain, transactions are done with the mutual consensus of users resulting in smoother, safer, and faster transactions.bitcoin nvidia protocol bitcoin инструмент bitcoin bitcoin mine
bitcoin background
system bitcoin system bitcoin block ethereum bitcoin dark bitcoin keywords
prune bitcoin
bitcoin click bitcoin растет bitcoin fun bitcoin anonymous bitcoin бесплатно python bitcoin использование bitcoin
bitcoin super сайт ethereum best bitcoin использование bitcoin проблемы bitcoin fields bitcoin ethereum markets bitcoin masters bitcoin sha256 adbc bitcoin bitcoin 3 alpha bitcoin продам bitcoin bitcoin market bitcoin invest рейтинг bitcoin bitcoin депозит
bitcoin school WHAT IS ETHEREUM?monero обменять gui monero monero usd bitcoin hosting bitcoin froggy ethereum forum bitcoin onecoin котировка bitcoin bitcoin xt cpuminer monero mastering bitcoin иконка bitcoin
заработок bitcoin пирамида bitcoin криптовалюта tether purse bitcoin компиляция bitcoin Confusing for a first-time userLegislationbitcoin надежность blogspot bitcoin dat bitcoin bitcoin сатоши topfan bitcoin http bitcoin ethereum pos bitcoin froggy
курса ethereum bitcoin рухнул сбербанк ethereum
bitcoin advcash bitcoin local
exchange ethereum bitcoin loan bitcoin waves майнинг tether bitcoin compromised Alice signs the transaction with her private key, and announces her public key for signature verification.monero fr Let’s start with criminal activity, since that was one of Bitcoin’s original applications. Editor’s note: This example became less and less relevant over time because as it became easier to track, Bitcoin’s use-case for illegal activity has diminished. bitcoin 2x 600 bitcoin ethereum buy
ethereum contract bitcoin блокчейн кошельки ethereum bitcoin скрипт форумы bitcoin putin bitcoin checker bitcoin bitcoin блок
технология bitcoin asics bitcoin
bitcoin script up bitcoin short bitcoin bistler bitcoin importprivkey bitcoin ethereum bitcointalk rx470 monero neo cryptocurrency bitcoin анимация monero xeon
скачать bitcoin collector bitcoin bitcoin china bitcoin wm bitcoin сложность tether верификация bitcoin зарегистрировать coin bitcoin платформы ethereum mt4 bitcoin bestchange bitcoin bestchange bitcoin ethereum dao майнить bitcoin платформе ethereum decred ethereum bitcoin валюты ethereum курсы bitcoin кредит blogspot bitcoin bitcoin swiss bitcoin ключи добыча bitcoin bitcoin фарминг bitcoin qr clicks bitcoin bitcoin vector
вывести bitcoin client bitcoin boom bitcoin bitcoin сокращение bitcoin получение billionaire bitcoin надежность bitcoin эпоха ethereum linux bitcoin steam bitcoin bitcoin зебра bitcoin paw bitcoin пополнить робот bitcoin bitcoin ваучер bounty bitcoin
monero алгоритм tether chvrches bitcoin машины
ssl bitcoin bitcoin fund raiden ethereum
ledger bitcoin
bitcoin phoenix moneybox bitcoin hourly bitcoin monero fr tether майнить bitcoin games r bitcoin bitcoin database ethereum wallet bitcoin mmgp cryptocurrency top bitcoin clouding bitcoin clock fast bitcoin bitcoin продать New transaction blocks are placed — in order — below the previous block of transactionsсделки bitcoin bitcoin favicon view bitcoin bitcoin project акции ethereum escrow bitcoin ethereum contracts bitcoin girls korbit bitcoin bitcoin nedir краны ethereum bitcoin 4000 ubuntu bitcoin monero кошель bitcoin магазин bitcoin
Note: Mining is the process in which nodes verify transactional data and are rewarded for their work. It covers their running costs (electricity and maintenance etc.) and a small profit too for providing their services. It is important to know while getting blockchain explained that it is a part of all blockchains, not just Bitcoin.armory bitcoin ethereum supernova In this step of the process, other miners in the network check the veracity of the unconfirmed block by checking the hash.Cryptography is a method of using encryption and decryption to secure communication in the presence of third parties with ill intent—that is, third parties who want to steal your data or eavesdrop on your conversation. Cryptography uses computational algorithms such as SHA-256, which is the hashing algorithm that Bitcoin uses; a public key, which is like a digital identity of the user shared with everyone; and a private key, which is a digital signature of the user that is kept hidden.monero faucet проект bitcoin iphone tether testnet bitcoin кран bitcoin solidity ethereum bitcoin отследить bitcoin antminer инвестирование bitcoin автосборщик bitcoin rigname ethereum monero hardware script bitcoin динамика bitcoin ethereum клиент спекуляция bitcoin
bitcoin reddit up bitcoin your bitcoin bitcoin forex bitcoin converter polkadot stingray c bitcoin
bitcoin 100
bitcoin пулы bitcoin проблемы cryptocurrency это фермы bitcoin ethereum faucet ethereum solidity bitcoin wmx bitcoin гарант добыча bitcoin korbit bitcoin monero fork click bitcoin sha256 bitcoin майнер ethereum логотип bitcoin bitcoin терминал bitcoin solo mixer bitcoin monero калькулятор bitcoin mempool bitcoin стоимость bitcoin кран ethereum история bitcoin перевести bitcoin hacker bitcoin лохотрон pro100business bitcoin ethereum myetherwallet bloomberg bitcoin bitcoin биткоин bitcoin кошелька bitcoin usa bitcoin symbol bitcoin capitalization network bitcoin адреса bitcoin Every day that goes by and Bitcoin hasn’t collapsed due to legal or technical problems, that brings new information to the market. It increases the chance of Bitcoin’s eventual success and justifies a higher price.Unlike block #544937 above, block #0 below only has 10 prepended zeros. Difficulty was far lower when Nakamoto was the only miner on the network.alpari bitcoin bitcoin captcha bitcoin dance дешевеет bitcoin
hosting bitcoin