Ethna: Analyzing the Underlying Peer-to-Peer Network of the Ethereum Blockchain

Taotao Wang, Chonghe Zhao, Qing Yang, Shengli ZhangarXiv 2020

TL;DR

This paper introduces Ethna, a novel tool for analyzing the Ethereum blockchain's peer-to-peer (P2P) network, which is crucial for its efficiency and security. Ethna reveals that Ethereum's P2P network exhibits characteristics of both small-world and scale-free networks, with a power-law distribution of node degrees and an average transaction broadcast latency of around 200ms.

What Problem Does This Paper Address?

Blockchains, like Ethereum, rely heavily on their underlying peer-to-peer (P2P) networks for communication, transaction propagation, and consensus. The efficiency and security of the entire blockchain system are directly impacted by the structure and behavior of this P2P network. While existing blockchain explorers focus on block and transaction data, they largely ignore the P2P network's topology. Furthermore, analytical methods developed for Bitcoin's unstructured P2P network are not directly applicable to Ethereum, which uses the Kademlia DHT for its P2P network management. This paper aims to fill this gap by providing a tool and methodology to thoroughly analyze Ethereum's P2P network structure and performance.

Methods

The core contribution of this paper is the development of Ethna, an Ethereum Network Analyzer. Ethna employs a novel approach to measure node degrees and analyze message propagation latency.

  • Node Degree Measurement: Instead of relying on methods suitable for unstructured networks, Ethna leverages Ethereum's transaction forwarding protocol. Specifically, it observes how many nodes forward a transaction (downstream peers) and uses this information to estimate the actual node degree. This method is designed to be efficient, requiring only a single probing node.
  • Transaction Propagation Analysis: Ethna analyzes transaction broadcast latency and the number of hops required for messages to propagate. It achieves this by collecting detailed transaction propagation records, including timestamps, transaction hashes, and packet sizes.
  • Ethna Tool: The tool is implemented in Go and deployed on the Ethereum Mainnet. It utilizes two types of probing nodes: NetworkObserverNode (operates in fast-synchronization mode, passively observing) and LocalFullNode (a fully synchronized node that actively participates and forwards transactions).

Datasets

The paper uses data collected from the Ethereum Mainnet by the Ethna tool during specific measurement periods (e.g., June 9-17, 2020, and December 12-20, 2020). This is not a pre-existing benchmark dataset but rather data generated by the authors' own measurement infrastructure.

Key Insights and Ideas

  • Ethereum's P2P Network is Not Bitcoin's: The paper emphasizes that Ethereum's Kademlia DHT-based P2P network requires different analytical approaches than Bitcoin's unstructured network.
  • Scale-Free and Small-World Characteristics: The analysis reveals that Ethereum's P2P network exhibits properties of both scale-free networks (power-law degree distribution) and small-world networks (low average path length, high clustering).
  • "Super Nodes" Exist: While most nodes have relatively low degrees, a few "super nodes" with very high degrees are present, a common characteristic of scale-free networks.
  • Transaction Propagation Efficiency: The average transaction broadcast latency is found to be around 200ms, and messages typically require only 3-4 hops to reach most nodes, indicating efficient propagation.
  • Gas Price Matters for Propagation: The study highlights that transactions with a Gas Price below 18 Gwei are more likely to be missed or discarded, impacting their propagation.
  • Packet Size as an Indicator: The PacketSize field in transaction propagation records is used as an indicator of potential TxPool resetting at the sender node, which can significantly enlarge propagation times.

Key Results

  • Node Degree Distribution: The degree distribution of Ethereum nodes follows a power-law, with an exponent ($\gamma$) around 2.33-2.37, similar to Bitcoin. The average degree of observed nodes was around 47-64, with a maximum peer count of 50.
  • Transaction Broadcast Latency: The average transaction broadcast latency was measured to be approximately 200 ms.
  • Hops for Broadcast: It takes an average of 3-4 hops to broadcast a new block or transaction to the entire Ethereum P2P network.
  • Network Stability: Node degrees were found to be relatively stable over time, fluctuating within a predictable range.
  • Ethna's Accuracy: The paper validates Ethna's node degree measurement method, showing it closely approximates actual node degrees, unlike previous K-bucket-based methods which overestimated them.

Limitations and Future Work

  • Eth64 vs. Eth65: The study primarily focuses on eth65 nodes due to their more consistent transaction propagation behavior. The analysis of eth64 nodes is limited because their forwarding strategy is less predictable for degree measurement.
  • Small-World Verification: While the results suggest a small-world effect, the authors acknowledge that strictly verifying this requires constructing the entire network topology, which is intentionally made difficult in Ethereum to prevent attacks. They leave a rigorous small-world verification as an open problem.
  • Future Work: The authors suggest that their findings can help improve the design of blockchain P2P networks. Further research could explore more advanced network analysis techniques, especially given the evolving nature of blockchain protocols.

Summary updated

BibTeX
@misc{wang2020ethna,
  author = {Taotao Wang and Chonghe Zhao and Qing Yang and Shengli Zhang},
  title = {{Ethna: Analyzing the Underlying Peer-to-Peer Network of the Ethereum Blockchain}},
  year = {2020},
  url = {https://openreview.net/forum?id=vFCxXaAY6l},
}
Figure