Topics In Demand
Notification
New

No notification found.

Ethereum Virtual Machine – All that you need to know about it.
Ethereum Virtual Machine – All that you need to know about it.

September 1, 2022

249

0

 

The evolution of decentralized distributed ledger technology may be attributed to bitcoin, but in all honesty, Ethereum became the true harbinger of the said revolution. When bitcoin at its core still remains a distributed ledger, a platform to generate its native currency (BTC), Ethereum broke the norm by going beyond the expected capabilities. Simply put, Ethereum is a distributed state machine.

The innovative programmable Ethereum blockchain is not just a platform to create ETH; it allows users to perform a myriad of functions like creating decentralized applications and generating smart contracts. All the said functionalities are made possible with the help of EVM, otherwise known as Ethereum Virtual Machine.

Often termed the “backbone of the Ethereum network,” EVM is a runtime environment where all Ethereum accounts and smart contracts reside. It allows the generation of smart contracts with the help of a programming language called Solidity. Smart contracts are generated for the development of programs using Dapps. All this is possible with Ethereum virtual machines.

EVM has been long pitched as a program for beginners as operating it requires a basic understanding and knowledge of terms such as bytes, memory, stack, and blockchain concepts such as Merkel tree, hash functions, and proof of work.

Elements that make EVM 

However, to understand the basics and workings of EVM, one needs an in-depth knowledge of the elements that make up an Ethereum virtual machine.

The concept of Virtual machines and their components: Virtual machines, Smart Contracts, Machine State, Solidity, Opcodes, and Gas 

Virtual machines are virtual codes that are used to execute programs and deploy applications. Just like any tangible physical computer, they have all the relevant components such as CPU, memory, and storage and can be connected to the internet. Working on top of multiple operating systems, they work on higher abstractions. As we know, Eth nodes enables the creation of smart contracts, which is a more powerful protocol that enables transactions. Another noteworthy factor is that EVM is completely siloed and has no access to any files on the network or processes. Now, every participating node on the Ethereum network runs EVM to maintain the consensus.

Smart contracts are pre-written lines of codes that execute transactions sans any intermediary. Smart Contracts over the Ethereum ecosystem are written in Solidity code, which cannot be altered or changed, making them a secure way of conducting transactions. Whenever a contract is executed, EVM’s state is modified.

EVM is also referred to as a “state machine” as it gives a picture of the current state. With every new block added, abetted by the constant new transactions, EVM works as a virtual central processing unit that executes and displays the speed of the execution process. Simply put, EVM in the Ethereum ecosystem determines the rules for computing transactions and changing the current state of the block and network. Also, EVM on its own doesn’t possess the ability to process Solidity; therefore, smart contract bytecode is consolidated to machine-level instructions called Opcodes that further execute certain stack operations. At an estimate, there are approximately 141 opcodes in EVM.

To run the opcodes on EVM, a certain amount of Gas is required. Gas is the transaction fee for processing the smart contract’s operations performed by nodes on the Ethereum network. The purpose of applying a gas fee is, firstly, to compensate miners for their services. Secondly, to gaslight any attempt by a hacker to stop computing actions or slow down the network’s speed by spamming the network with unwarranted transactions. And finally, to avoid any computational wastage of codes or accidental infinite loops. It is pertinent to set up a limit of computational codes for each transaction to bypass such issues. Each opcode has a gas cost attached to it, depending upon the complexity of the opcode. More complexity, the higher the gas fee.

Gas limit is the amount of fee a user is able or willing to pay for the processing and validating of a transaction. Moreover, Gas that is not used in a transaction is returned to the user, which is definitely an upside in the system.

The London Upgrade was introduced on 5th August 2021 to transform the transaction fee mechanism on Ethereum. The benefits of the upgrade included superior gas estimation, speedier transactions, and balancing ETH issuance by burning a certain percentage of the transaction fee.

Account abstraction on Ethereum 

There are two types of accounts atop Ethereum – External accounts and Contract accounts. The basic difference between the two is that external account owners hold private keys to be able to execute transactions using ETH, and they are outside the gambit of EVM. In comparison, contract accounts are smart contracts living in EVM. Now both the accounts have equal status under EVM. Account abstraction means treating both accounts as one account- a contract account. The idea is that the transaction process will completely transfer to EVM and no longer be on the blockchain environment. Account abstraction is a feature that would be implemented in Ethereum 2.0

What is Turing completeness in Ethereum?

Turing completeness as a concept means a machine’s ability to process data. A set of instructions or a programming language is said to be Turing complete, given its ability to stimulate a Turing or an abstract machine. According to the Ethereum yellow paper, EVM is defined as “Quasi-Turing” complete.

It is assumed that EVM can complete any given, even the most complicated computations, which is the key feature of being Turing-complete. However, it’s virtually impossible to predict if a particular transaction will be completed. Therefore EVM has a terminating mechanism in place. Also, gas or transaction fee is extracted for executing smart contracts. So EVM has the ability to abort a transaction when the Gas runs out, making it quasi-Turing complete.

Benefits of Ethereum virtual machines

  • EVM facilitates decentralised applications’ creation, allowing any user to develop them without discrimination.
  • EVM is compatible with other public and private blockchains for the development of decentralized applications
  • EVM facilitates creating ERC- 721 tokens and developing smart contracts to create NFTs or non-fungible tokens. Anyone can create these virtual assets and sell them on NFT marketplaces, a concept that was unheard of a few years ago.

Challenges of Ethereum virtual machines

  • EVM isn’t completely decentralized, as assumed by many. With the rise of BaaS services, many Ethereum nodes are being hosted via third-party cloud-based servers, which are more centralized than decentralized. Assuming that the service provider shuts their server down will effectively bring down the nodes. Such an event can cause a lot of damage to the network.
  • For all intent and purposes, EVM does require certain technical knowledge and familiarity with programming languages
  • The biggest drawback for Ethereum users is the preposterously high transaction fee, especially when network traffic is high. The larger transactions may not suffer much, but smaller ones become the victim of congestion. Such network chokes can adversely affect dApps development. Too many users using smart contracts and thereby executing corresponding transactions can considerably slow the network down, even bringing it to a halt.

Final thoughts

Ethereum virtual machines, in a way, have helped create a parallel economy by making Ethereum move beyond the distributed ledger state. Undoubtedly, many benefits of EVM are countered by challenges, making it less than a perfect system. However, with Ethereum 2.0 in the offing, EVM mechanisms relating to transactions speed, high Gas, or complexity of the transactions are expected to go under a massive upscaling.

About The Author 

Author

Dr. Ravi Chamria is co-founder CEO of Zeeve Inc, an Enterprise Blockchain company. He has an experience of 18+ years in IT consulting spanning across Fintech, InsureTech, Supply Chain and eCommerce. He is an executive MBA from IIM, Lucknow and a prolific speaker on emerging technologies like Blockchain, IoT and AI/ML.

Passionate About: Blockchain, Supply Chain Management, Digital Lending, Digital Payments, AI/ML, IoT

Specialities: Strategic Management, Technology Innovation, Product Management


That the contents of third-party articles/blogs published here on the website, and the interpretation of all information in the article/blogs such as data, maps, numbers, opinions etc. displayed in the article/blogs and views or the opinions expressed within the content are solely of the author's; and do not reflect the opinions and beliefs of NASSCOM or its affiliates in any manner. NASSCOM does not take any liability w.r.t. content in any manner and will not be liable in any manner whatsoever for any kind of liability arising out of any act, error or omission. The contents of third-party article/blogs published, are provided solely as convenience; and the presence of these articles/blogs should not, under any circumstances, be considered as an endorsement of the contents by NASSCOM in any manner; and if you chose to access these articles/blogs , you do so at your own risk.


Zeeve is an enterprise-grade Blockchain Infrastructure Automation Platform. Join the growing list of clients that trust us with their Blockchain initiatives

© Copyright nasscom. All Rights Reserved.