  Ethereum relies on a peer-to-peer overlay network to propagate information.
The knowledge of Ethereum network topology holds the key to understanding
Ethereum's security, availability, and user anonymity. From a measurement
perspective, an Ethereum network's topology is routing-table information hidden
inside individual Ethereum nodes, measuring which poses challenges and remains
an open research problem in the existing literature.
  This paper presents TopoShot, a new method uniquely repurposing Ethereum's
transaction replacement/eviction policies for topology measurement. TopoShot
can be configured to support Geth, Parity, and other major Ethereum clients. As
validated on local nodes, TopoShot achieves 100% measurement precision and high
recall 88% - 97%. To efficiently measure the large Ethereum networks in the
wild, we propose a non-trivial schedule to run pair-wise measurements in
parallel. To enable ethical measurement on Ethereum mainnet, we propose
workload-adaptive configurations of TopoShot to minimize the service
interruption to target nodes/network.
  We systematically measure a variety of Ethereum networks and obtain new
knowledge including the full-network topology in major testnets (Ropsten,
Rinkeby and Goerli) and critical sub-network topology in the mainnet. The
results on testnets show interesting graph-theoretic properties, such as all
testnets exhibit graph modularity significantly lower than random graphs,
implying resilience to network partitions. The mainnet results show biased
neighbor selection strategies adopted by critical Ethereum services such as
mining pools and transaction relays, implying a degree of centralization in
real Ethereum networks.
