Finding Correctness Issues on Ethereum Verkle Tries via Preimage-Aware Differential Testing
Abstract
Stateless Ethereum is proposed to address the challenges of unbounded state growth, which poses centralization risks to Ethereum by imposing considerable operational costs on network participants. This approach enables Ethereum clients to verify and maintain blockchain using only block witnesses, eliminating the need for the underlying state data. Verkle Tries, as the next-generation state trie structure for Ethereum, are set to replace Merkle Patricia Tries to facilitate the stateless Ethereum by significantly reducing the size of block witnesses. Besides, since blockchain maintenance and verification entail intensive read and update operations on state data, ensuring the correctness of state access in Verkle Tries is crucial.In this study, we conduct the first systematic study on the correctness issues in Ethereum Verkle Tries, and define two kinds of such issues. Besides, we design VERDIFF, the first tool for automatically identifying correctness issues in Ethereum Verkle Tries through preimage-aware differential testing. To facilitate the identification of interpretable and reproducible issues, we proposePAL, the first domain-specific language designed to construct semantically valid trie access statements as test inputs for Verkle Tries. During the preimage-aware differential testing, these statements are iteratively generated and mutated based on our novel feedback mechanisms for inducing diverse behaviors when accessing states across varied regions in Verkle Tries at the preimage level. Moreover, we define new correctness issue oracles based on our definitions of these issues to ensure their accurate identification. We implement VERDIFF on Ethereum clients, and conduct extensive experiments to evaluate its effectiveness in identifying correctness issues. Through our evaluation, VERDIFF can uncover eight critical correctness issues, spanning four distinct classes, in Ethereum Verkle Tries across three major Ethereum clients (Go-ethereum, Nethermind, and EthereumJS). Additionally, it achieves at least 23.3% higher code path coverage compared to two baselines. Furthermore, we empirically analyze the security risks posed by the identified correctness issues, and explore their potential security implications, highlighting the critical role of VERDIFF in securing Ethereum Verkle Tries.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.