Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

Background

EIP-8163 reserves EXTENSION (0xae) as a marker for custom instructions on L2s and other EVM chains. Executing it on Ethereum L1 still fails.

This article walks through the proposal and its rationale.

The proposal gives other EVM implementations a dedicated extension marker without adding execution functionality to Ethereum L1. L1 treats 0xae like INVALID (0xfe), while non-L1 EVMs can use the bytes that follow it to represent custom instructions.

Overview

EIP-8163 reserves the one-byte opcode 0xae as EXTENSION. On Ethereum L1, executing it causes an exceptional halt, ends the current execution frame, and consumes the remaining gas in that frame, just like INVALID (0xfe).

Other EVM chains can use 0xae as a prefix that marks the start of a custom instruction. An L2 testing a new computation instruction, for example, could use the instruction space beginning with 0xae without colliding with existing Ethereum L1 opcodes.

The goal is to make it easier for chains to experiment while preserving EVM compatibility. If a chain assigns its own meaning to an unused opcode, a future Ethereum L1 upgrade could assign the same byte a different meaning. Reserving 0xae and keeping it invalid on L1 gives other EVMs a stable extension namespace.

What is an opcode?

An opcode is a one-byte value that identifies an EVM instruction. Instructions such as ADD and PUSH1 have assigned values, and the EVM executes smart contract bytecode as a sequence of instructions. EXTENSION (0xae) is the reserved value that can mark the start of an extended instruction.

How EIP-8163 treats the extension opcode across execution environments

The diagrams in this article retain their Japanese labels. The left side shows how execution environments can interpret the same bytecode containing 0xae differently. On Ethereum L1, executing 0xae always fails. Outside L1 it can begin a custom instruction, provided the set of valid jump destinations matches Ethereum L1.

Motivation

EVM-compatible chains benefit from Ethereum's existing tooling, developer workflows, and smart contracts. Maintaining that compatibility makes adding new instructions harder.

A chain can define its own meaning for an unused opcode, but Ethereum L1 might later assign the same byte to a different instruction. Identical bytecode would then have different meanings across chains, complicating contract portability, auditing, tracing, and debugging.

Collision on an unused opcode compared with the reserved 0xae prefix

On the left, a custom chain uses a free opcode before Ethereum L1 assigns the same byte, so one bytecode sequence acquires two meanings. On the right, Ethereum L1 consistently treats 0xae as INVALID while non-L1 EVMs use it as an extension marker. This lets them experiment without a collision with L1.

Room for experimentation outside Ethereum L1

A non-L1 EVM can specialize its execution environment by testing new instructions or processing models. An L2 might aim to make a particular cryptographic operation cheaper, or an application-specific chain might add a dedicated instruction.

The challenge is choosing an opcode. Assigning an unused value can lead to a collision with Ethereum L1 or another EVM. By making 0xae permanently invalid on Ethereum L1, EIP-8163 creates room for a shared extension prefix outside L1.

Keeping Ethereum L1 behavior unchanged

EIP-8163 requires no consensus change in Ethereum L1 execution clients. Since 0xae is already invalid, executing it already causes an exceptional halt. The proposal commits to retaining that behavior and keeping the value unavailable as an extension instruction on L1.

This approach broadens the scope for experiments across the EVM ecosystem while preserving L1 security and existing contract behavior. A successful non-L1 extension could later reach Ethereum L1 through a separate EIP that assigns a different opcode.

Specification

The specification covers the treatment of EXTENSION on and off Ethereum L1 and the requirement to preserve JUMPDEST analysis. On L1 the reserved value continues to behave like INVALID.

EXTENSION (0xae)

The assigned value is 0xae. It must behave like INVALID (0xfe) on every Ethereum L1 chain, including mainnet and testnets.

EIP-141 defined INVALID (0xfe) as an invalid instruction that causes an exceptional halt when executed.

[EIP-141] How the INVALID opcode works

[EIP-141] How the INVALID opcode works

Item Requirement
Opcode 0xae
Name EXTENSION
Execution on Ethereum L1 Like INVALID (0xfe), it causes an exceptional halt, ends the current execution frame, and consumes its remaining gas.
Effect on JUMPDEST analysis None. The presence of 0xae must leave the set of valid jump destinations unchanged.
Effect on static analysis or preprocessing No additional effect beyond the treatment of INVALID.

This reservation gives external EVMs a marker whose value stays invalid on L1. Ethereum L1 smart contracts therefore cannot execute 0xae successfully.

Behavior on non-L1 EVMs

EVMs outside Ethereum L1 can give EXTENSION meaningful execution behavior. Each implementation decides what that behavior is. EIP-8163 leaves the encoding and the list of extended instructions to those implementations.

When a non-L1 EVM executes EXTENSION, it must use the following bytes as immediate arguments to determine the extended instruction's meaning. For example, an implementation could interpret 0xae 0x01 as one instruction and 0xae 0x02 as another.

If those immediate arguments include a JUMPDEST (0x5b) that remains a valid jump destination, execution must halt exceptionally. This keeps jump destination analysis consistent with Ethereum L1.

JUMPDEST analysis

The EVM permits JUMP and JUMPI only to positions marked by a valid JUMPDEST (0x5b). It therefore analyzes the bytecode to determine which occurrences of 0x5b are valid targets.

If a non-L1 EVM could freely hide bytes following EXTENSION, identical bytecode could expose different valid jump destinations, reducing portability. EIP-8163 requires the results of JUMPDEST analysis to match Ethereum L1 even in the presence of EXTENSION.

  1. Ethereum L1 reads 0xae as INVALID. The bytes after 0xae are analyzed as ordinary EVM bytecode.
  2. A non-L1 EVM can read 0xae as an extension prefix. The treatment of the following bytes must preserve the set of valid JUMPDEST positions.
  3. A valid JUMPDEST inside the immediate arguments causes an exceptional halt. A byte sequence that would change jump destination analysis cannot execute as an extended instruction.

Difference between a JUMPDEST instruction and PUSH data

In the top example, 0xae 5b, the 5b byte is a JUMPDEST instruction. The extension is invalid because it would take a valid jump destination as immediate data. In 0xae 60 5b and 0xae 61 60 5b, the 5b byte is data belonging to PUSH1 or PUSH2. It is therefore ineligible as a jump destination, and the analysis matches Ethereum L1.

Byte sequence examples

The proposal illustrates how the bytes after 0xae affect JUMPDEST analysis.

Bytes Treatment of JUMPDEST Treatment as an extended instruction
0xae5b... 0x5b is a valid JUMPDEST. Invalid because the immediate arguments contain a valid JUMPDEST.
0xae015b... 0x5b is a valid JUMPDEST. Can be valid as an extended instruction taking 0x01 as its argument.
0xae60 Insufficient trailing data to analyze. Invalid because the PUSH1 immediate is missing.
0xae605b... 0x5b is PUSH1 data and is ineligible as a jump destination. Can be valid using 0x5b as PUSH1 data.
0xae60605b... The final 0x5b is a valid JUMPDEST. Can be valid using 0x60 as the PUSH1 argument.
0xae61605b... 0x5b is PUSH2 data and is ineligible as a jump destination. Can be valid using 0x605b as the PUSH2 argument.
0xae615b The PUSH2 data is incomplete. Invalid because the instruction is truncated.

The interpretation of 0x5b depends on whether it is read as an instruction or as part of a PUSH operand. Under existing EVM rules, the data immediately following PUSH1 through PUSH32 is excluded from instruction decoding. As a result, the 0x5b in 0xae605b... is PUSH1 immediate data and cannot be a jump destination.

Rationale

Why preserve JUMPDEST analysis?

Alternatives included disabling a trailing 0x5b as a jump destination and skipping PUSHx instructions to determine the size of the immediate arguments. Those approaches would require EIP-8163 to specify the size of the EXTENSION immediate.

A future EIP that introduces an opcode with immediate arguments could also create conflicting analysis rules. And if identical bytecode produced different valid destinations on Ethereum L1 and a non-L1 EVM, portability would suffer.

The proposal therefore keeps EXTENSION from affecting JUMPDEST analysis. A sequence such as 0xae5b, where 0x5b remains a valid jump destination, cannot be an extended instruction. In 0xae605b, 0x5b is PUSH1 data and can be used as an immediate argument without changing jump analysis.

Why leave the encoding open?

EIP-8163 reserves a shared prefix for extensions and leaves the bytes after EXTENSION unspecified. Choosing an encoding would constrain what non-L1 EVMs can experiment with. Extended instruction formats and instruction sets can be discussed separately and specified in future proposals where needed.

Why exclude multi-byte instructions from Ethereum L1?

The proposal explicitly prohibits the Ethereum L1 EVM from using EXTENSION to support multi-byte instructions. If Ethereum L1 later adopts the same functionality, a separate EIP can assign a different opcode. This lets experiments outside L1 proceed independently of changes to the Ethereum L1 specification.

How an extension can reach L1

A feature that succeeds as a non-L1 extension could be proposed for Ethereum L1 in a separate EIP with a dedicated opcode.

If the original non-L1 EVM also adopts the L1 EIP, it can retain two ways to access the feature: its original EXTENSION instruction and the new opcode shared with Ethereum L1. This preserves existing non-L1 code while the feature becomes available on L1.

How a non-L1 extension can be adopted on Ethereum L1

The extension prefix provides a place to experiment outside L1. L1 adoption goes through a separate proposal with a different opcode. An EVM that implements both can support the original 0xae path and the shared opcode.

Compatibility

EXTENSION (0xae) is currently invalid on Ethereum. If an existing Ethereum L1 contract executes it, execution continues to fail as it does today.

Because 0xae has no effect on JUMPDEST analysis, the valid jump targets in existing bytecode stay the same. The proposal commits to keeping 0xae invalid on L1.

Test Cases

The proposal plans to provide test cases in Ethereum Execution Layer Specs format. The proposal as described here includes no specific test code.

The main checks are that Ethereum L1 halts exceptionally on 0xae just as it does on INVALID, and that bytecode containing 0xae yields the same JUMPDEST analysis. For non-L1 implementations, tests should also verify that an extension rejects any immediate containing a valid JUMPDEST.

Reference Implementation

The proposal provides no reference implementation because the consensus behavior of Ethereum L1 execution clients stays the same.

Implementations may change non-consensus details such as tracing or display. For example, a disassembler or debugger can label 0xae as EXTENSION without changing execution results.

Security Considerations

Ethereum L1 treats EXTENSION like INVALID, so the reservation adds no consensus risk to L1 execution clients.

Non-L1 implementations need to preserve Ethereum L1 jump analysis. If the immediate arguments of an extended instruction change the results of JUMPDEST analysis, identical bytecode can have different control flow across chains, complicating auditing, portability, and tooling.

Risks when JUMPDEST analysis differs across execution environments

If chains identify different valid JUMPDEST positions for the same bytecode, they can jump to different places and follow different execution paths. Audit conclusions and portability assumptions can then diverge. A non-L1 EVM must preserve Ethereum L1's JUMPDEST analysis even when it implements EXTENSION.

A proliferation of independent instructions can also make the scope of EVM compatibility harder to understand. The proposal recommends that non-L1 implementers coordinate specific uses of EXTENSION in the EIP discussion thread to avoid namespace collisions under the shared 0xae prefix.

References

Conclusion

EIP-8163 keeps 0xae invalid on Ethereum L1 and gives L2s and custom EVM chains a reserved prefix for extension experiments. Its two constraints preserve Ethereum L1 execution behavior and the results of JUMPDEST analysis. Together they give non-L1 EVMs room to experiment while preserving bytecode portability and making analysis easier.

I also publish related articles and resources here.