Monad: Parallel EVM

AdbL...t2xK
4 Jan 2024
18

Title: Parallel EVM Monad: Balancing Speed and Accuracy

Monad, a high-performance Ethereum-compatible Layer 1 blockchain, introduces a groundbreaking approach to transaction execution, combining parallel processing with optimistic execution. In this blog post, we delve into Monad's optimistic execution strategy and its implications. At its core, Monad executes transactions in parallel, seemingly altering the traditional Ethereum semantics. However, Monad's blocks maintain the linearly ordered set of transactions akin to Ethereum, ensuring consistent results after execution. The key innovation lies in Monad's use of optimistic execution, initiating the execution of transactions before their predecessors conclude. Consider two transactions in a block. Transaction 1 modifies the balance of account A, followed by Transaction 2, which also alters the same balance. When executed in parallel, Transaction 2 might commence before Transaction 1 concludes, potentially leading to incorrect results. Monad addresses this by tracking inputs and comparing them against the outputs of preceding transactions. If discrepancies arise, the transaction is re-executed with accurate data. Optimistic execution, however, poses challenges. In a basic implementation, detection of execution errors occurs only after earlier transactions have completed, causing delays. Monad tackles this issue by identifying non-state-dependent steps, like signature recovery, allowing these processes to persist even in the face of re-execution. Additionally, cached state data minimizes redundant computations during retry attempts. To optimize the execution process further, Monad employs a sophisticated scheduling mechanism. Anticipating transaction dependencies through a static code analyzer, Monad strategically schedules transactions, avoiding unnecessary parallelism that could result in a cascade of failures. While the ideal scenario involves predicting dependencies in advance, Monad gracefully falls back to a naive implementation when necessary. Monad's approach to optimistic execution draws inspiration from computer science concepts like optimistic concurrency control and software transactional memory. By seamlessly blending parallelism, optimistic execution, and efficient scheduling, Monad achieves a remarkable throughput of 10,000 transactions per second, paving the way for a new era of decentralized, high-performance blockchain solutions.

Get fast shipping, movies & more with Amazon Prime

Start free trial

Enjoy this blog? Subscribe to van

0 Comments