ZadeNor AI
Back to Blog
Web3 & Blockchain

Introducing Ethereum Script 2.0

November 29, 2025
5 min
2,580 views
By ZadeNor AI Team
Introducing Ethereum Script 2.0

Introducing Ethereum Script 2.0

The Evolution of Ethereum Script 2.0: A New Era of Deduplication and Optimization

The Ethereum scripting language, also known as Ethereum Script (ES), has been a cornerstone of the Ethereum ecosystem since its inception. However, as the platform has grown and evolved, it has become clear that the original scripting language has some limitations. In this article, we will explore the upcoming changes to the Ethereum Script 2.0 (ES2) and how they will impact the way we develop and interact with smart contracts on the Ethereum network.

The Problems with ES1

Over the past month, several issues with the original ES1 have become apparent. One of the main concerns is the number of opcodes, which is currently at 50. While this may seem like a manageable number, it is actually quite high compared to other scripting languages. In fact, some opcodes are unnecessary and can be optimized away. For example, the SHA256 and ECVERIFY opcodes are currently implemented as separate opcodes, but they could be replaced with a single opcode that simply calls the underlying function.

Another issue with ES1 is its lack of future-compatibility. As new cryptographic functions are developed, they will need to be implemented in ES1, which can be a time-consuming and error-prone process. Furthermore, the existence of special crypto opcodes makes ES1 less compatible with future cryptographic functions.

Deduplication and Optimization

One of the main goals of ES2 is to improve deduplication and optimization. Deduplication is the process of removing duplicate code from a contract, which can help reduce the size of the contract and improve performance. Optimization is the process of replacing inefficient code with more efficient code, which can also improve performance.

To achieve these goals, ES2 will introduce several new features, including:

  • A new data structure called a "continuation stack" that will allow for more efficient execution of contracts.
  • A new opcode called "RUN" that will allow for more efficient execution of contracts.
  • A new opcode called "IF" that will allow for more efficient execution of contracts.
  • A new opcode called "WHILE" that will allow for more efficient execution of contracts.

The Continuation Stack

The continuation stack is a new data structure that will be used to store the state of a contract during execution. This will allow for more efficient execution of contracts, as the state will not need to be stored in memory.

The continuation stack will be implemented as a stack of frames, where each frame represents a single execution of a contract. Each frame will contain the following information:

  • The current opcode being executed.
  • The current state of the contract.
  • The March of the execution stack.

The RUN Opcode

The RUN opcode will be used to execute a contract. It will take a single argument, which is the address of the contract to be executed.

The RUN opcode will be implemented as follows:

  • The opcode will push the address of the contract to be executed onto the stack.
  • The opcode will then execute the contract by pushing the address of the contract onto the continuation stack.
  • The opcode will then execute the contract by executing the opcodes in the contract.

The IF Opcode

The IF opcode will be used to execute a contract based on a condition. It will take two arguments, which are the address of the contract to be executed if the condition is true, and the address of the contract to be executed if the condition is false.

The IF opcode will be implemented as follows:

  • The opcode will push the address of the contract to be executed if the condition is true onto the stack.
  • The opcode will then push the address of the contract to be executed if the condition is false onto the stack.
  • The opcode will then execute the contract by executing the opcodes in the contract.

The WHILE Opcode

The WHILE opcode will be used to execute a contract while a condition is true. It will take two arguments, which are the address of the contract to be executed while the condition is true, and the address of the contract to be executed when the condition is false.

The WHILE opcode will be implemented as follows:

  • The opcode will push the address of the contract to be executed while the condition is true onto the stack.
  • The opcode will then push the address of the contract to be executed when the condition is false onto the stack.
  • The opcode will then execute the contract by executing the opcodes in the contract.

Fee Voting

One of the main goals of ES2 is to improve fee voting. Fee voting is the process of determining the fees for executing a contract. In ES2, the fees for executing a contract will be determined by a vote of the miners.

The fee voting system will be implemented as follows:

  • The miners will vote on the fees for executing a contract.
  • The fees will be determined by a majority vote of the miners.
  • The fees will be used to determine the cost of executing a contract.

Conclusion

In conclusion, the upcoming changes to the Ethereum Script 2.0 (ES2) will have a significant impact on the way we develop and interact with smart contracts on the Ethereum network. The new features, including the continuation stack, RUN opcode, IF opcode, and WHILE opcode, will improve deduplication and optimization, making it easier to develop and execute contracts. The fee voting system will also improve the way fees are determined, making it more efficient and fair. Overall, the changes to ES2 will make it easier to develop and execute contracts, and will improve the overall efficiency and security of the Ethereum network.


Source: https://blog.ethereum.org/en/2014/02/03/introducing-ethereum-script-2-0

About the Author

ZadeNor AI Team is a leading expert in WEB3 & BLOCKCHAIN, contributing to cutting-edge research and development in the field.