ProtocolVersion
Ethereum wire protocol version identifier for P2P network communication.Overview
ProtocolVersion represents the version of the Ethereum wire protocol used for peer-to-peer communication between nodes. Protocol versions define capabilities and message formats for node synchronization.Type Definition
Protocol Versions
| Constant | Value | Description |
|---|---|---|
ETH_66 | "eth/66" | ETH66 protocol |
ETH_67 | "eth/67" | ETH67 protocol |
ETH_68 | "eth/68" | ETH68 protocol (current) |
SNAP_1 | "snap/1" | Snapshot sync protocol |
Usage
Create Protocol Version
Use Constants
Compare Versions
Convert to String
API Reference
Constructors
| Function | Description |
|---|---|
from(version) | Create from version string |
Methods
| Function | Description |
|---|---|
toString(v) | Convert to string representation |
equals(v1, v2) | Check if versions are equal |
compare(v1, v2) | Compare version ordering (-1, 0, 1) |
Constants
| Constant | Description |
|---|---|
ETH_66 | ETH protocol version 66 |
ETH_67 | ETH protocol version 67 |
ETH_68 | ETH protocol version 68 |
SNAP_1 | Snapshot sync protocol version 1 |
Protocol History
ETH/66 (Berlin)
- Typed transactions support
- Receipt status encoding
ETH/67 (London)
- Removed
GetNodeData/NodeDatamessages - Required for nodes after The Merge
ETH/68 (Current)
- Transaction announcements include type and size
- Improved transaction pool management
SNAP/1
- Snapshot synchronization protocol
- Fast state sync via state snapshots

