On April 20, Vitalik Buterin, co-founder of Ethereum (ETH), presented a proposal that could transform the technical core of the network: replacing the Ethereum Virtual Machine (EVM) with RISC-V, a virtual machine architecture designed for use in a more general context and not specifically in cryptocurrency networks.
This modification , described by Buterin himself as a long-term solution to Ethereum 's scalability and simplicity challenges , seeks to optimize the execution of smart contracts and improve network efficiency.
Buterin wants to change a core element of Ethereum. Source: YouTube.
A precedent for Buterin's proposal can be found in the Polkadot (DOT) network. According to user X 'Dragomyst' and Polkadot developer Fabsverse, the use of RISC-V on that network allowed for “faster execution (of transactions) and 100x improvements in the performance of zero-knowledge proofs ( ZK-proofs). “ ), critical for privacy and scalability.”
What is the EVM and why is it so important for Ethereum?
The Ethereum Virtual Machine is the environment in which the network's smart contracts run—computer programs that automate agreements or transactions when certain conditions are met. The EVM acts as a“virtual computer”" that processes the code for these contracts, ensuring that all operations are performed uniformly across all nodes on the Ethereum network. , providing users with confidence and security.
The EVM uses a language known as opcodes (basic instructions such as adding, storing data, or calling another contract). Processing transactions and smart contracts in this environment requires significant computational resources, creating scalability bottlenecks —the network's ability to handle an increasing volume of transactions without skyrocketing costs or processing times.
Additionally, the EVM is both the execution environment for smart contracts in that ecosystem and the component that defines their low-level language, the bytecode, into which high-level languages such as Solidity or Vyper are compiled. The EVM not only executes this bytecode (human-readable, but more efficient for execution by the EVM) deterministically on all nodes, but also establishes the rules and opcodes that determine how contracts are structured and programmed, interacting with the state of the network. Therefore, its role encompasses both the execution and the definition of the programmatic format of contracts .
What is RISC-V and how does it differ from EVM?
RISC-V, on the other hand, is an open-source instruction set architecture (much like the EVM), meaning anyone can use and modify it without restriction. Unlike the EVM, which was designed specifically for Ethereum, RISC-V is a more general standard used in a variety of applications, from microprocessors in electronic devices to embedded systems (integrated computing devices or systems designed to perform specific functions within a network).
The acronym RISC-V stands for ' Reduced Instruction Set Computer', which would indicate that its approach of operating under simple instructions would allow for faster processing and lower resource consumption.
In the context of Ethereum, RISC-V would be used as an alternative virtual machine for running smart contracts. Buterin 's proposal suggests that developers could continue writing contracts in popular languages like Solidity, but these would be compiled directly to RISC-V instructions rather than EVM opcodes. This would reduce the intermediate complexity posed by the EVM and, according to Buterin, dramatically improve processing efficiency.
The objectives of replacing EVM with RISC-V
Buterin identifies that long-term bottlenecks will be related to the ability to efficiently test and execute contracts.
A key aspect of the proposal is the optimization of zero-knowledge proofs (ZK-proofs), a type of technology that allows transactions to be verified without revealing all the underlying data, something essential to maintain privacy and reduce the size of the data that nodes must process.
The following table presented by Buterin, which details the cycles required to test different parts of the execution in the EVM, shows that four circumstances consume the most processing time :
- deserialization of input data ('deserialize_inputs').
- initializing the witness database ('initialize_witness_db').
- the state root computation ('state_root_computation').
- block execution ('block_execution').
These four processes are the most processing intensive on Ethereum. Source: Ethereum Magicians Forum.
This data indicates that around 50% of processing time is spent on block execution, which includes interpreting and processing smart contract instructions. Buterin argues that replacing the EVM with RISC-V could significantly reduce this time, as contracts would execute directly in a more efficient environment, eliminating the EVM's intermediate layer.
Furthermore, the proposal seeks to simplify the Ethereum protocol. The EVM, with its opcodes and specific rules, has accumulated complexity over time, making it difficult to make changes or improvements without breaking compatibility with existing contracts.
By adopting RISC-V, Buterin suggests that the protocol could be reduced to a much simpler specification, making it easier to maintain the network and implement new functionality in the future.
Efficiency gains? Buterin's Goal
One of the proposal's most compelling arguments is the potential for improving the efficiency of zero-knowledge proofs. Currently, ZK-EVM proofs work by compiling EVM code into RISC-V and then verifying it, a process that adds a layer of complexity. By allowing contracts to be written and executed directly in RISC-V, this intermediate step would be eliminated.
Buterin presents data comparing the performance of different interpreters (software) when performing intensive mathematical operations, such as calculating Fibonacci numbers, a common task for measuring computational efficiency.
The Ethereum co-founder's results show that RISC-V-based programs (like Revm) are much faster than those based on traditional EVM or other technologies like WebAssembly (WASM).
RISC-V-based Revm achieves greater efficiency when processing Fibonacci calculations, according to Buterin. Source: Ethereum Magicians Forum.
This data suggests that processing efficiency could increase, impacting Ethereum's ability to handle complex transactions.
However, Buterin clarifies that the actual gains will depend on how gas costs (the fee users pay to execute operations on Ethereum) are adjusted to reflect test times on RISC-V, which could disincentivize the use of more expensive operations, such as certain pre-compiled computations that are currently resource-intensive.
How would this change be implemented?
The transition from the EVM to RISC-V would not be immediate or easy, but Buterin proposes several strategies to make it feasible. The least disruptive option would be to allow both environments to coexist: contracts could be written in either the EVM or RISC-V, and both would be interoperable.
A more radical alternative would be to convert all existing EVM contracts into contracts that use an EVM interpreter written in RISC-V. In this scenario, when an EVM contract receives a call, a RISC-V program would execute its original code and return the result.
A third intermediate option would be to establish a formal mechanism in the protocol to support multiple virtual machines, starting with the EVM and RISC-V, but leaving the door open to others, such as Move, used in other networks.
Current EVM costs: an obstacle to scalability
To understand why this change is necessary, Buterin also provides data on the computational cost of the most common operations on the EVM, measured in 'gas,' the unit that represents computational effort in Ethereum.
The following image reflects that operations such as copying data ('calldatacopy') or making a call to another contract ( 'caller' ) consume a significant amount of cycles ('average cycle'), which translates into higher costs for users and a lower network capacity to process transactions.
Operations like “calldatacopy” or “caller” require a high number of cycles per gas unit, highlighting the inefficiencies of the EVM. Source: Ethereum Magicians Forum.
These costs reflect the inherent limitations of the EVM architecture. By adopting RISC-V, as Buterin proposed, Ethereum could optimize these operations, reducing both processing times and costs for users, which in turn would allow the network to handle a larger volume of transactions.