并行执行:Monad 如何突破传统 EVM 体系

marsbitPubblicato 2024-09-25Pubblicato ultima volta 2024-09-26

介绍

Gmonad,欢迎再次深入探讨 ValiDAO!今天,我们将探讨@monad_xyz。尽管细节仍然很少,但我们已尽力收集所有相关信息,并在一篇技术文章中呈现已知信息。如果你在过去一年中上过加密货币推特,你肯定见过 Molandak。但你可能会想:这种炒作从何而来?Monad 到底是什么?Monad 受欢迎只是因为他们有一个非常可爱的吉祥物吗?让我们来一探究竟吧!

Monad

简而言之,Monad 是一个高性能的第 1 层区块链,拥有完整的 EVM 字节码兼容性和无数其他链级优化,使其成为一条非常快速的链。这些优化主要围绕自定义和并行执行、新的共识算法以及称为MonadDB 的自定义状态数据库。通过这些优化,Monad 声称(我们相信)可以实现 10,000 TPS 和单槽终结性,同时保持对验证者的相对较低的硬件要求。

MonadSource: DeSpread, Monad

并行执行

目前,大多数 EVM 实现(例如以太坊及其第 2 层解决方案上的实现)都以串行方式执行任务,迫使网络一次验证一个进程。与这种顺序执行方式不同,并行执行是指利用多个线程和处理器同时运行多个操作。Monad 利用乐观并行执行,假设事务可以并发执行,而无需事先意识到潜在的输入/输出冲突。但它是如何工作的呢?该过程包括几个步骤:

  1. 同时执行多个交易。
  2. 执行后检查是否存在冲突。
  3. 撤销任何检测到的冲突交易。
  4. 按顺序重新执行有冲突的事务。

与以太坊类似,区块内的交易保持线性顺序,Monad 以并行方式执行这些交易,并具有相同的顺序排序的安全保证。交易从一个共同的状态点开始,生成记录输入和输出的待处理结果。这些结果根据原始交易定义提交,然后系统按顺序检查交易及其待处理结果。如果这些输入和输出影响其他交易及其待处理结果,则重新执行,这仅当输入因另一个并行交易的输出而改变时才会发生。为了更好地解释这一点,让我们举一个涉及两个辛勤工作的厨师的例子。厨师 A 正在做沙拉(事务 A),厨师 B 正在做汤(事务 B),其中厨师 B 的任务取决于厨师 A,因为他们想使用一些切碎的蔬菜来做汤。厨师 A 开始切蔬菜,但突然决定中途改变蔬菜类型(可能是因为他们收到了新的指示)。现在,厨师 B 要使用的蔬菜不同了。由于厨师 B 的汤依赖于厨师 A 切碎的蔬菜,这种变化意味着厨师 B 必须重新评估并重新执行部分任务,调整汤以适应新配料。

Monad这种涉及重新执行交易的共识方式非常高效,因为交易的依赖项和输入都是从并行执行中缓存的。这意味着每个交易可能会执行两次:一次并行执行,第二次可能以串行方式执行。Monad 的方法与 Solana 的并行执行方法不同,主要区别在于 Solana 使用访问列表来预先确定哪些交易可以同时执行。它要求交易指定它们将与之交互的状态部分,为每个交易创建访问列表。之后,具有不重叠访问列表的交易可以并行执行,而具有冲突的交易则按顺序处理。在 Monad 的情况下,所有交易都可以并行执行,不兼容的交易则按顺序重新执行。

MonadDB

MonadDB 解决了区块链执行中的一个关键瓶颈:状态访问。传统的区块链系统难以实现高效的状态管理,尤其是在检索存储在磁盘上的智能合约数据时。这个问题严重影响了交易处理速度和整体系统性能,严重限制了大多数当前区块链的性能。

区块链中的状态访问过程涉及检索剩余合约数据,例如用于交换操作的代币余额。在数据库中检索此信息可能非常耗时,每次访问通常需要 10 到 20 微秒。仅仅并行计算而不优化状态访问只能带来微不足道的改进;挑战在于同时优化计算和状态检索。

为了解决这些限制,Monad 开发了 MonadDB,这是一个定制的键值存储,针对以太坊 Merkle 树数据和高效状态管理进行了优化。MonadDB 利用现代硬件功能(包括固态硬盘 (SSD) 和多核处理器)来最大限度地提高性能。它利用 SSD 的全部带宽并支持异步输入/输出 (I/O),采用 Linux 上的 io_uring 等技术来提高运营效率。

与传统的高级键值存储(例如 LevelDB 或 RocksDB)不同,MonadDB 专门针对区块链相关的数据结构和访问模式而设计。这种专业化通过减少状态访问延迟实现了更高效的并行执行。MonadDB 显著缩短了状态检索所需的时间,大大改善了传统系统中通常的 10-20 微秒范围。

虽然 Monad 采用了高度专业化的设计方法,但 MonadDB 的架构强调性能和去中心化之间的平衡。它优化了效率,而不需要极端的硬件规格,目标是 32GB 的 RAM,这比其他一些高性能区块链的要求要低得多。这种策略与严重依赖增加 RAM 来缓解状态访问瓶颈的区块链形成了鲜明对比。

Monad该数据库与以太坊的状态结构保持完全兼容,从而能够高效重放以太坊的区块历史,通过执行以太坊测试套件和重放历史数据来确保这一点。

此外,MonadDB 补充了 Monad 的并行执行模型,有助于在处理过程中更快地验证交易输入和输出。高效状态访问和乐观执行之间的这种协同作用支持 Monad 实现每秒超过 10,000 笔交易的目标。

由于键值存储开发的专业性,MonadDB 的开发面临巨大挑战。此外,MonadDB 的细粒度状态访问允许系统区分合约状态的不同组成部分。例如,在 ERC20 代币合约中,影响各种用户余额的交易不会发生冲突。Monad 的这种细粒度方法有助于更有效地并行化交易。

冲突检测发生在尝试并行执行之后,在此期间系统会检查状态的哪些特定部分被访问或修改。然后识别冲突事务并按顺序重新执行,以鼓励更高效的状态访问,因为访问同一状态可以最大限度地减少昂贵的磁盘读取。

MonadBFT

MonadBFT 是 Monad 专有的拜占庭容错共识机制,基于 HotStuff 共识算法的修改版本。其主要目标是实现 1 秒的出块时间和单时隙终结性,重点是交易排序而不是执行。MonadBFT 集成了来自各种 BFT 研究论文的创新,包括分布式异步多领导者容错 (DAMFT) 共识。

该算法利用各种优化来提高共识效率。

  1. 流水线:该技术使各个共识阶段能够重叠,从而提高流程效率。
  2. 延迟执行:这种方法将区块提议与完整状态计算分开。领导者无需包含新的 Merkle 根,从而有更多时间简化执行和共识流程。
  3. 团队通过优化八卦层和点对点网络显著增强了分发机制。此优化侧重于高效广播提案,可能利用先进的树结构。
  4. 概率组装:这种方法减少了数据传输,从而提高了效率。
  5. 数据压缩:该算法采用压缩技术来最小化传输的数据量,包括乐观压缩和概率压缩。

Monad这些优化有几个优点:

  1. 增加执行预算:此功能允许在每个共识回合中有更多的时间执行交易。
  2. 提高资源利用率:提高区块生产过程中计算资源的使用效率。
  3. 减少网络开销:减少达成共识所需的数据传输。
  4. 增加吞吐量的潜力:优化旨在共同支持更高的交易量。

MonadBFT 的设计理念以利用拜占庭容错(BFT)共识的最新研究为中心,优先考虑性能同时确保安全性。

与通常将验证者数量上限设为 100 左右的 Cosmos 链不同,MoandBFT 对活跃验证者的数量没有任何限制。Monad 最初计划推出约 150 名验证者,随着时间的推移,这一数字将不断增长,从而促进更加去中心化的网络,同时保持高性能。

MonadBFT 采用优先 gas 拍卖方法,根据费用水平对交易进行优先排序,从高到低排列。这种方法有助于缩短出块时间并实现单槽最终性,从而实现 Monad 高效交易处理和高吞吐量的目标。

简单来说,MonadBFT 的设计选择包括高度优化的八卦层和对等网络、使用优化的树结构进行高效的提案广播以及概率组装和数据压缩技术的实现。这些选择减少了数据传输并提高了效率,从而有助于实现 Monad 的性能。

结论

Monad 正在积极重写和优化区块链网络的关键组件,以创建一个新的、高效的、可扩展的 Layer 1 区块链。该平台利用乐观的并行执行模型和自定义状态数据库 MonadDB 来增强交易处理。其共识机制 MonadBFT 可确保快速的出块时间和单槽最终性。Monad 的目标是实现每秒 10,000 笔交易的吞吐量,同时保持与以太坊虚拟机 (EVM) 的完全兼容性。这种方法旨在通过提供卓越的速度和高吞吐量来吸引来自 EVM 兼容链的流动性、开发人员和用户。

MonadBeneath the shimmering dance of the aurora borealis, Molandak encounters Wolf in the snow-covered wilderness of Iceland, where the night sky glows with ethereal light

Letture associate

Bankless Co-founder: Why I Sold All My ETH

Author David Hoffman, founder of Bankless, explains his decision to sell all his ETH, despite being a prominent figure in the Ethereum ecosystem. He clarifies that his move is not a bearish take on Ethereum itself, which he remains highly optimistic about as a network. His core argument is that the "ETH is money" thesis, which he helped popularize, has largely played out. Hoffman argues that ETH has achieved the market valuation it deserves based on Ethereum's current success and competitive position. He details several reasons for this view. First, the path for ETH to become global money required nearly flawless execution and sustained dominance across Ethereum's entire technical and social stack—a coordination challenge he now believes had a narrower window for success than anticipated. Second, market data shows a strong correlation between L1 chain activity/fees and the price of its native asset; Ethereum's fee dominance has been challenged by competitors like Solana. Third, the "strong version" of crypto (decentralized, native crypto economies) that ETH's monetary thesis relied upon has struggled to maintain a positive mainstream narrative and stable adoption beyond a brief period. Finally, Ethereum's architecture as a "giver"—providing secure block space and tokenization capabilities at cost to L2s and applications—means it doesn't capture premium value directly. Its rollup-centric roadmap further directs most profits to L2s and applications ("fat app theory"). In conclusion, Hoffman believes the opportunity for ETH to be revalued significantly upward as money has diminished. He sold not because ETH will fail, but because its monetary thesis has matured, and he seeks to allocate capital to other opportunities he finds more compelling.

链捕手1 h fa

Bankless Co-founder: Why I Sold All My ETH

链捕手1 h fa

From Issuer to Infrastructure Owner: Circle's Arc Strategy and the Fatal Gap in the GENIUS Act

Circle raised $222 million for its proprietary Layer-1 blockchain, Arc, positioning itself not just as a stablecoin issuer but as the owner of the settlement infrastructure USDC relies on. This move, backed by investors like BlackRock and Apollo, highlights a significant structural conflict unaddressed by the GENIUS Act of 2025. While the act focuses on stablecoin reserves and issuer oversight, it remains silent on the market structure implications of an issuer controlling the underlying network—a scenario akin to a currency issuer also owning the payment rails. Traditionally, financial regulations separate issuers from settlement infrastructure to ensure neutrality. With Arc, Circle gains control over transaction ordering, fees, and network rules, potentially favoring USDC over competitors. The article argues that this creates a permanent structural temptation, even if no abuse occurs. The solution lies in applying established market infrastructure principles: mandating neutral transaction ordering, transparent fee schedules, and governance separated from Circle’s commercial interests. The current pre-mainnet phase offers a critical window for regulators to establish these rules before Arc becomes entrenched. Once operational, enforcing changes would be costly and disruptive. The core question remains: should a regulated stablecoin issuer be allowed to own the settlement network its competitors must use? The GENIUS Act doesn’t answer this, but Circle’s Arc strategy makes it urgent.

marsbit2 h fa

From Issuer to Infrastructure Owner: Circle's Arc Strategy and the Fatal Gap in the GENIUS Act

marsbit2 h fa

What Are the Key Variables Determining the AI Bull Market?

Title: What Determines the AI Bull Market? Key Variables Revealed Despite rising oil prices above $100/barrel, persistent inflation, and fragile Fed rate cut expectations—a traditionally hostile environment for high-valuation tech stocks—the AI sector continues to drive the market to new highs. According to analysts, the current AI boom is in a phase of "rational fervor": while bubbles exist, they are not yet out of control. The crucial shift is the emergence of Agentic AI, which is evolving from an assisting tool (Copilot) to an autonomous execution tool (Autopilot), creating a clearer commercial path from investment to revenue. This shift accelerates Token consumption and inference computing demand while boosting revenue forecasts for leading firms. The market is now rewarding capital expenditure as it transforms from a burden into a competitive moat, supporting hardware chains like GPUs, optical modules, and storage. However, valuations have already priced in growth expectations for 2027-2028. The forward P/E ratio for the "Magnificent Seven" tech giants is about 35x, compared to 25x for the rest of the S&P 500. This premium implies AI adoption must occur 5 to 8 times faster than past technological revolutions—a scenario with little room for error. The sustainability of the AI bull market hinges on three key variables: 1. **Short-term liquidity shocks**: Risks include sustained high oil prices, resurgent inflation, rising interest rates, and potential unwinding of the yen carry trade. The critical question is whether the upward revision speed of Annual Recurring Revenue (ARR) can outpace the rise in interest rates. 2. **Mid-term industry realization**: Can the actual pace of AI adoption and commercialization match the current lofty valuations? Historically, general-purpose technology revolutions follow a non-linear path with periods of acceleration and deceleration. 3. **Long-term structural constraints**: These include energy and power grid limitations, employment displacement and consumer purchasing power, social acceptance and potential backlash, and potential hardware technology breakthroughs that could disrupt current supply chains. While the long-term prospects for AI remain optimistic with potential for significant productivity gains, the stock market's pricing depends not just on the vision but on the actual speed of realization amid these growing constraints. The direction is clear, but the pace of execution will determine whether the bubble remains controlled or spirals out of control.

marsbit2 h fa

What Are the Key Variables Determining the AI Bull Market?

marsbit2 h fa

Trading

Spot
Futures
活动图片