EIP-7587 · Final · Meta · 2023-12-21
EIP-7587: Reserve Precompile Address Range for RIPs
Reserves precompile addresses 0x100 to 0x1ff for Rollup Improvement Proposals, so precompiles added by L2s never collide with ones Ethereum L1 adds.
What problem does it solve?
Precompiles are built-in contracts at fixed low addresses (0x01 for ecrecover, 0x02 for SHA-256, and so on). Ethereum L1 assigns them through EIPs. Layer 2 rollups have their own standards track, the Rollup Improvement Proposal (RIP) process, and some RIPs add precompiles that L1 does not have.
If both processes picked addresses independently, an L2 could deploy a precompile at an address that L1 later uses for something different. Contracts written for one chain would then behave unexpectedly on another, which is exactly what EVM-equivalent rollups want to avoid.
How it works
The whole specification is one rule:
| Range | Reserved for |
|---|---|
0x0000000000000000000000000000000000000100 to 0x00000000000000000000000000000000000001ff |
Precompiles defined by RIPs |
Everything below 0x100 remains available to the EIP process (255 addresses after 0x00). The RIP process keeps its own registry of what lives in its range, so EIP editors do not have to track L2-only precompiles, and RIP precompiles need not exist on L1 at all.
This is a Meta EIP: it changes no client behaviour and needs no hard fork. It is a coordination agreement between the two processes.
Sample code
A helper a tool or client might use to classify a call target:
type PrecompileOwner = "eip" | "rip" | "none";
export function precompileRange(address: string): PrecompileOwner {
const n = BigInt(address);
if (n >= 0x01n && n <= 0xffn) return "eip"; // L1 precompiles via EIPs
if (n >= 0x100n && n <= 0x1ffn) return "rip"; // reserved for RIPs (EIP-7587)
return "none";
}
precompileRange("0x0000000000000000000000000000000000000001"); // "eip" (ecrecover)
precompileRange("0x0000000000000000000000000000000000000100"); // "rip"
Things to know
- Status is Final.
- The reservation is about avoiding conflicts, not about what any particular rollup supports. Whether a given RIP precompile exists on a given L2 depends on that L2; check its documentation before relying on it.
- A contract that calls an address in
0x100–0x1ffmay succeed on one chain and hit an empty account on another (including L1), so cross-chain code should detect support rather than assume it. - How EIPs and other proposals are organised is described in EIP-1.