EIP-4 · Final · Meta · 2015-11-17
EIP-4: EIP Classification
An early meta proposal that sorted standards EIPs into four layers (consensus, networking, API/RPC, applications) so it was clear how hard each change is to deploy.
What problem does it solve?
Ethereum is not one standard but a stack of them. Some rules must be followed by every node or the network splits. Others, like a token interface or an RPC method, are optional conventions that only some software cares about. In 2015 the EIP process treated all of these the same way.
EIP-4 borrows Bitcoin's BIP 123 and groups standards EIPs by the system layer they touch. Lower layers need tighter coordination and are harder to change, so labelling an EIP by layer tells readers how much agreement it needs before it can ship.
How it works
Every standards EIP is placed in one of four layers:
| Layer | What it covers | What disagreement costs |
|---|---|---|
| 1. Consensus | Rules for valid blocks, state and history | A chain split (fork) |
| 2. Networking | The eth wire protocol and the light client protocol (les) |
Nodes cannot talk; new subprotocols can be added side by side |
| 3. API/RPC | Higher-level calls used by applications | Little: competing standards can coexist |
| 4. Applications | Shared conventions such as contract interfaces and data formats | Only apps that opt in are affected |
Within the consensus layer the spec also defines the two kinds of fork:
- Soft fork: some things that used to be valid become invalid. Nothing that was invalid becomes valid.
- Hard fork: some things that used to be invalid become valid. Nodes that do not upgrade reject the new chain.
The spec places RLPx outside the networking layer and leaves it to the devp2p repository.
Sample code
The layers correspond roughly to the category field that standards-track EIPs carry today under EIP-1:
# Consensus layer -> category: Core
eip: 155
type: Standards Track
category: Core
# API/RPC layer -> category: Interface
eip: 695
type: Standards Track
category: Interface
# Application layer -> category: ERC
eip: 20
type: Standards Track
category: ERC
Things to know
- EIP-4 is Final, but it is mostly of historical interest. The live rules for EIP types and categories are in EIP-1, which uses Core, Networking, Interface and ERC instead of numbered layers.
- The idea still holds: a Core change such as EIP-155 needs a coordinated network upgrade, while an application standard such as ERC-20 can be adopted one contract at a time.
- The soft/hard fork definitions here are the classic blockchain ones. In practice almost every Ethereum protocol change has shipped as a scheduled hard fork.