Ledger Archivers: State Reconstruction
Reconstruction an EVM network using using its wvm-archiver node instance
Last updated
Reconstruction an EVM network using using its wvm-archiver node instance
Last updated
The World State Trie, also known as the Global State Trie, serves as a cornerstone data structure in Ethereum and other EVM networks. Think of it as a dynamic snapshot that captures the current state of the entire network at any given moment. This sophisticated structure maintains a crucial mapping between account addresses (both externally owned accounts and smart contracts) and their corresponding states.
Each account state in the World State Trie contains several essential pieces of information:
Current balance of the account
Transaction nonce (tracking the number of transactions sent from this account)
Smart contract code (for contract accounts)
Hash of the associated storage trie (linking to the account’s persistent storage)
This structure effectively represents the current status of all assets and relevant information on the EVM network. Each new block contains a reference to the current global state, enabling network nodes to efficiently verify information and validate transactions.
An important distinction exists between the World State Trie database and the Account Storage Trie database. While the World State Trie database maintains immutability and reflects the network’s global state, the Account Storage Trie database remains mutable with each block. This mutability is necessary because transaction execution within each block can modify the values stored in accounts, reflecting changes in account states as the blockchain progresses.
The core focus of this article is demonstrating how WeaveVM Archivers’ data lakes can be leveraged to reconstruct an EVM network’s World State. We’ve developed a proof-of-concept library in Rust that showcases this capability using a customized Revm wrapper. This library abstracts the complexity of state reconstruction into a simple interface that requires just 10 lines of code to implement.
Here’s how to reconstruct a network’s state using our library:
The reconstruction process follows a straightforward workflow:
The library connects to the specified WeaveVM Archive network
Historical ledger data is retrieved from the WeaveVM Archiver data lakes
Retrieved blocks are processed through our custom minimal EVM execution machine
The EVM StateManager applies the blocks sequentially, updating the state accordingly
The final result is a complete reconstruction of the network’s World State
This proof-of-concept implementation is available on GitHub: https://github.com/weaveVM/evm-state-reconstructing
WeaveVM Archivers has evolved beyond its foundation as a decentralized archive node. This proof of concept demonstrates how our comprehensive data storage enables full EVM network state reconstruction - a capability that opens new possibilities for network analysis, debugging, and state verification.
We built this PoC to showcase what’s possible when you combine permanent storage with proper EVM state handling. Whether you’re analyzing historical network states, debugging complex transactions, or building new tools for chain analysis, the groundwork is now laid.