This blog post introduces the Besu Fleet, an innovative solution that simplifies RPC service scaling while cutting costs and enhancing efficiency. With features like trie log shipping, lightweight RPC nodes, and a flexible plugin system, Fleet transforms Besu into a modular, high-performance platform for both Ethereum mainnet and Layer 2 networks.
Key advantages include:
Efficient RPC scaling through a captain-follower architecture.
Reduced storage needs and faster deployment with lightweight nodes.
Modular integration via plugins, minimizing changes to Besu’s core.
The Besu team is excited to introduce Fleet as a big step forward for RPC providers. Paired with our versatile plugin system, Fleet unlocks new opportunities to extend and customize Besu, meeting diverse operational needs. This blog post explores these innovations, showing how they optimize processes and deliver value to developers and RPC providers.
Trie log shipping
Bonsai and the concept of trie logs
Before diving into the details of the Fleet solution, let’s set the stage. Besu currently uses Bonsai as its default state storage format. Bonsai offers several advantages, such as reducing the overall database size and paving the way for transaction parallelization. But there’s another compelling data structure Bonsai provides: the trie log.
The trie log is much like a state diff, capturing the differences between two blocks at the account, slot, and code levels. This makes it possible for Bonsai to efficiently roll forward or back the state between blocks.
The creation of trie log shipping
From that point, we began exploring the idea: what if we could send the trie log and make it accessible externally? This would provide an easy way to track all the changes within a block, potentially opening the door to a variety of new features and use cases. This idea led to the concept of trie log shipping.
With the help of a plugin, Besu can send the trie log for each block it generates to an external component. This makes it possible for the component to monitor changes in real time, stay in sync with the blockchain as it evolves, and maintain an up-to-date database, all without the need to re-execute the EVM. This approach provides an efficient and streamlined way to access and utilize the latest blockchain data.
Production use – Linea integration
We've started using this feature with Linea, a zkEVM Layer 2 solution on Ethereum built by Consensys. Linea leverages zero-knowledge proofs to provide scalable and efficient transactions while maintaining full compatibility with Ethereum.
After the EVM executes transactions in Besu, it generates a trie log that captures all state reads and changes within the block. This trie log is then sent to a secondary component called the state manager, which is designed to maintain a zk-friendly representation of the blockchain state. This approach eliminates the need to re-execute the EVM by constructing the zk-friendly state directly from the trie log. Unlike the traditional state trie (Patricia Merkle Trie), the state manager uses a different trie structure (Sparse Merkle Trie) specifically optimized for zero-knowledge proofs.